From 9633693c9b815b8413890347757ed3ee7b59354f Mon Sep 17 00:00:00 2001 From: h7x4abk3g Date: Thu, 16 Jul 2020 14:08:02 +0200 Subject: [PATCH] Remove center widget --- lib/screens/kanji_search.dart | 64 +++++++++++++++++------------------ 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/lib/screens/kanji_search.dart b/lib/screens/kanji_search.dart index a59211e..03f9100 100644 --- a/lib/screens/kanji_search.dart +++ b/lib/screens/kanji_search.dart @@ -30,42 +30,40 @@ class KanjiView extends StatelessWidget { class KanjiViewBar extends StatelessWidget { @override Widget build(BuildContext context) { - return Center( - child: Container( - child: Row( - children: [ - IconButton( - icon: Icon(Icons.arrow_back), - onPressed: () => BlocProvider.of(context) - .add(ReturnToInitialState()), - ), - Expanded( - child: Padding( - padding: EdgeInsets.symmetric(vertical: 10.0), - child: TextField( - onSubmitted: (text) => - BlocProvider.of(context).add(GetKanji(text)), - decoration: new InputDecoration( - prefixIcon: Icon(Icons.search), - hintText: 'Search for kanji', - fillColor: Colors.white, - filled: true, - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(100.0)), - ), + return Container( + child: Row( + children: [ + IconButton( + icon: Icon(Icons.arrow_back), + onPressed: () => BlocProvider.of(context) + .add(ReturnToInitialState()), + ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric(vertical: 10.0), + child: TextField( + onSubmitted: (text) => + BlocProvider.of(context).add(GetKanji(text)), + decoration: new InputDecoration( + prefixIcon: Icon(Icons.search), + hintText: 'Search for kanji', + fillColor: Colors.white, + filled: true, + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(100.0)), ), ), ), - IconButton( - icon: Icon(Icons.star_border), - onPressed: null, - ), - IconButton( - icon: Icon(Icons.add), - onPressed: null, - ), - ], - ), + ), + IconButton( + icon: Icon(Icons.star_border), + onPressed: null, + ), + IconButton( + icon: Icon(Icons.add), + onPressed: null, + ), + ], ), ); }