sizetransition

This commit is contained in:
2021-01-09 17:33:16 +01:00
parent b262fbb973
commit c24f10046c

View File

@@ -22,9 +22,12 @@ class SearchResults extends StatefulWidget {
} }
class _SearchResultsState extends State<SearchResults> { class _SearchResultsState extends State<SearchResults> {
GlobalKey<ScaffoldState> _drawerKey = GlobalKey();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
key: _drawerKey,
body: Container( body: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
@@ -114,7 +117,9 @@ class _SearchResultsState extends State<SearchResults> {
color: Colors.grey, color: Colors.grey,
icon: Icons.filter_alt_rounded, icon: Icons.filter_alt_rounded,
text: "Filtruj", text: "Filtruj",
onPressed: () => ScaffoldState().openDrawer(), onPressed: () {
_drawerKey.currentState.openDrawer();
},
), ),
], ],
), ),
@@ -124,7 +129,13 @@ class _SearchResultsState extends State<SearchResults> {
children: [ children: [
DrawerHeader( DrawerHeader(
decoration: BoxDecoration(color: Colors.grey[850]), decoration: BoxDecoration(color: Colors.grey[850]),
child: Text('Filtry'), child: Text(
'Filtry',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w400,
color: Colors.orange),
),
) )
], ],
), ),