How can we change appbar background color in flutter

Declare your Color: const primaryColor = Color(0xFF151026); In the MaterialApp level (will change the AppBar Color in the whole app ) change primaryColor return MaterialApp( title: ‘Flutter Demo’, theme: ThemeData( primaryColor: primaryColor, ), home: MyApp(), ); and if you want to change it on the Widget level modify the backgroundColor appBar: AppBar( backgroundColor: primaryColor, ),

How to Animate Collapsing Elements in Flutter

If you want to collapse a widget to zero height or zero width that has a child that overflow when collapsed, I would recommend SizeTransition or ScaleTransition. Here is an example of the ScaleTransition widget being used to collapse the container for the four black buttons and status text. My ExpandedSection widget is used with … Read more

Display SnackBar in Flutter

In my case i had code like this (in class state) final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>(); void showInSnackBar(String value) { _scaffoldKey.currentState.showSnackBar(new SnackBar(content: new Text(value))); } but i didn’t setup the key for scaffold. so when i add key: _scaffoldKey @override Widget build(BuildContext context) { return new Scaffold( key: _scaffoldKey, body: new SafeArea( snackbar start … Read more

How to get timezone, Language and County Id in flutter by the location of device in flutter?

Flutter locales explained First of all, you should understand the difference between system settings and your application settings: System settings – what the system provides to your app as user preferences for your information. Application settings – what you decided (explicitly or implicitly) to be the application locale. You may allow your users to select … Read more