fixed drawer safe area
This commit is contained in:
parent
5b018fbe75
commit
dbe5a4aa7c
1 changed files with 57 additions and 51 deletions
|
@ -19,43 +19,45 @@ class AllCollectionDrawer extends StatelessWidget {
|
||||||
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
|
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
|
||||||
children: [
|
children: [
|
||||||
DrawerHeader(
|
DrawerHeader(
|
||||||
child: Column(
|
child: SafeArea(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Row(
|
children: [
|
||||||
children: [
|
Row(
|
||||||
CircleAvatar(
|
children: [
|
||||||
child: Padding(
|
CircleAvatar(
|
||||||
padding: EdgeInsets.only(top: 6.0),
|
child: Padding(
|
||||||
child: SvgPicture.asset(
|
padding: EdgeInsets.only(top: 6.0),
|
||||||
'assets/aves_logo.svg',
|
child: SvgPicture.asset(
|
||||||
width: 64,
|
'assets/aves_logo.svg',
|
||||||
|
width: 64,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
radius: 44,
|
||||||
|
),
|
||||||
|
SizedBox(width: 16),
|
||||||
|
Text(
|
||||||
|
'Aves',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 44,
|
||||||
|
fontFamily: 'Concourse Caps',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
backgroundColor: Colors.white,
|
],
|
||||||
radius: 44,
|
),
|
||||||
),
|
SizedBox(height: 16),
|
||||||
SizedBox(width: 16),
|
Row(
|
||||||
Text(
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'Aves',
|
children: [
|
||||||
style: TextStyle(
|
Row(children: [Icon(Icons.photo_library), SizedBox(width: 4), Text('${collection.imageCount}')]),
|
||||||
fontSize: 44,
|
Row(children: [Icon(Icons.video_library), SizedBox(width: 4), Text('${collection.videoCount}')]),
|
||||||
fontFamily: 'Concourse Caps',
|
Row(children: [Icon(Icons.photo_album), SizedBox(width: 4), Text('${collection.albumCount}')]),
|
||||||
),
|
Row(children: [Icon(Icons.label), SizedBox(width: 4), Text('${collection.tagCount}')]),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
SizedBox(height: 16),
|
),
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Row(children: [Icon(Icons.photo_library), SizedBox(width: 4), Text('${collection.imageCount}')]),
|
|
||||||
Row(children: [Icon(Icons.video_library), SizedBox(width: 4), Text('${collection.videoCount}')]),
|
|
||||||
Row(children: [Icon(Icons.photo_album), SizedBox(width: 4), Text('${collection.albumCount}')]),
|
|
||||||
Row(children: [Icon(Icons.label), SizedBox(width: 4), Text('${collection.tagCount}')]),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).accentColor,
|
color: Theme.of(context).accentColor,
|
||||||
|
@ -87,23 +89,27 @@ class AllCollectionDrawer extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
_buildFilteredCollectionNavTile({BuildContext context, Widget leading, String title, bool Function(ImageEntry) filter}) {
|
_buildFilteredCollectionNavTile({BuildContext context, Widget leading, String title, bool Function(ImageEntry) filter}) {
|
||||||
return ListTile(
|
return SafeArea(
|
||||||
leading: leading,
|
top: false,
|
||||||
title: Text(title),
|
bottom: false,
|
||||||
dense: true,
|
child: ListTile(
|
||||||
onTap: () {
|
leading: leading,
|
||||||
Navigator.pop(context);
|
title: Text(title),
|
||||||
Navigator.push(
|
dense: true,
|
||||||
context,
|
onTap: () {
|
||||||
MaterialPageRoute(
|
Navigator.pop(context);
|
||||||
builder: (context) => FilteredCollectionPage(
|
Navigator.push(
|
||||||
collection: collection,
|
context,
|
||||||
filter: filter,
|
MaterialPageRoute(
|
||||||
title: title,
|
builder: (context) => FilteredCollectionPage(
|
||||||
|
collection: collection,
|
||||||
|
filter: filter,
|
||||||
|
title: title,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
},
|
||||||
},
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue