From c24f10046cba3399ec0fa9f2d8c16a80ef5abc38 Mon Sep 17 00:00:00 2001 From: Jonasz Bigda Date: Sat, 9 Jan 2021 17:33:16 +0100 Subject: [PATCH] sizetransition --- lib/components/searchResults.dart | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/components/searchResults.dart b/lib/components/searchResults.dart index 18ecc32..9a7e21c 100644 --- a/lib/components/searchResults.dart +++ b/lib/components/searchResults.dart @@ -22,9 +22,12 @@ class SearchResults extends StatefulWidget { } class _SearchResultsState extends State { + GlobalKey _drawerKey = GlobalKey(); + @override Widget build(BuildContext context) { return Scaffold( + key: _drawerKey, body: Container( decoration: BoxDecoration( image: DecorationImage( @@ -114,7 +117,9 @@ class _SearchResultsState extends State { color: Colors.grey, icon: Icons.filter_alt_rounded, text: "Filtruj", - onPressed: () => ScaffoldState().openDrawer(), + onPressed: () { + _drawerKey.currentState.openDrawer(); + }, ), ], ), @@ -124,7 +129,13 @@ class _SearchResultsState extends State { children: [ DrawerHeader( decoration: BoxDecoration(color: Colors.grey[850]), - child: Text('Filtry'), + child: Text( + 'Filtry', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w400, + color: Colors.orange), + ), ) ], ),