Prepare Android release and refine bookshelf
This commit is contained in:
+90
-54
@@ -139,66 +139,102 @@ class LibraryBookCard extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// A cloth-bound cover with a recessed illustrated panel. The
|
||||
// artwork keeps its natural proportions inside each book.
|
||||
Container(
|
||||
height: 276,
|
||||
padding: const EdgeInsets.fromLTRB(22, 20, 14, 20),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [cloth, Color.lerp(cloth, Colors.black, .2)!],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: cloth.withValues(alpha: .22),
|
||||
offset: const Offset(0, 10),
|
||||
blurRadius: 16,
|
||||
spreadRadius: -5,
|
||||
),
|
||||
],
|
||||
border: Border(
|
||||
left: BorderSide(
|
||||
color: Color.lerp(cloth, Colors.black, .35)!,
|
||||
width: 7,
|
||||
),
|
||||
right: BorderSide(color: light, width: 3),
|
||||
),
|
||||
),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(14),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: light.withValues(alpha: .4)),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.auto_awesome_outlined,
|
||||
size: 18,
|
||||
color: light,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Expanded(
|
||||
child: story.coverAsset == null
|
||||
? Icon(Icons.menu_book, size: 64, color: light)
|
||||
: Image.asset(
|
||||
artworkAsset(story.coverAsset!),
|
||||
fit: BoxFit.contain,
|
||||
excludeFromSemantics: true,
|
||||
errorBuilder: (_, _, _) => Icon(
|
||||
Icons.menu_book,
|
||||
size: 64,
|
||||
color: light,
|
||||
if (story.id == 'mara-island' && story.coverAsset != null)
|
||||
Center(
|
||||
child: AspectRatio(
|
||||
aspectRatio: 1.5,
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
Image.asset(
|
||||
artworkAsset(story.coverAsset!),
|
||||
fit: BoxFit.contain,
|
||||
excludeFromSemantics: true,
|
||||
errorBuilder: (_, _, _) =>
|
||||
Icon(Icons.menu_book, size: 64, color: light),
|
||||
),
|
||||
Center(
|
||||
child: FractionallySizedBox(
|
||||
widthFactor: .49,
|
||||
child: ExcludeSemantics(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: CopyText(
|
||||
'Mara’s\nisland notebook',
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'MaraHand',
|
||||
fontSize: 28,
|
||||
color: Color(0xff5e5140),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
else
|
||||
Container(
|
||||
height: 276,
|
||||
padding: const EdgeInsets.fromLTRB(22, 20, 14, 20),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [cloth, Color.lerp(cloth, Colors.black, .2)!],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: cloth.withValues(alpha: .22),
|
||||
offset: const Offset(0, 10),
|
||||
blurRadius: 16,
|
||||
spreadRadius: -5,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
SizedBox(width: 38, child: Divider(color: light)),
|
||||
],
|
||||
border: Border(
|
||||
left: BorderSide(
|
||||
color: Color.lerp(cloth, Colors.black, .35)!,
|
||||
width: 7,
|
||||
),
|
||||
right: BorderSide(color: light, width: 3),
|
||||
),
|
||||
),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(14),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: light.withValues(alpha: .4)),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.auto_awesome_outlined,
|
||||
size: 18,
|
||||
color: light,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Expanded(
|
||||
child: story.coverAsset == null
|
||||
? Icon(Icons.menu_book, size: 64, color: light)
|
||||
: Image.asset(
|
||||
artworkAsset(story.coverAsset!),
|
||||
fit: BoxFit.contain,
|
||||
excludeFromSemantics: true,
|
||||
errorBuilder: (_, _, _) => Icon(
|
||||
Icons.menu_book,
|
||||
size: 64,
|
||||
color: light,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
SizedBox(width: 38, child: Divider(color: light)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
CopyText(story.title, style: _type(25, serif: true)),
|
||||
const SizedBox(height: 10),
|
||||
|
||||
Reference in New Issue
Block a user