How to update dart SDK to latest stable version in flutter?

Posted by Jessica Taylor | Updated on | Flutter


If you want to update dart SDK to latest stable version in flutter? Flutter only supports Dart 2.5 rigth now. There is now way to support 2.6. You will have to wait for a new …

How to test Flutter app where there is an async call in initState()?

Posted by Jessica Taylor | Updated on | Flutter


Want to test Flutter app where there is an async call in initState()? Consider using a FutureBuilder if your build method relies on async work. You can also update your test code like this:

TextEditingController makes widget lose its previous state

Posted by Jessica Taylor | Updated on | Flutter


TextEditingController makes widget lose its previous state. The explanation for the observed behavior is the following: CupertinoTextField uses an internal TextEditingController for which the framework automatically sets an AutomaticKeepAlive. This keepAlive is responsible for keeping …

How to use a builder function in flutter?

Posted by Jessica Taylor | Updated on | Flutter


Want to use a builder function in flutter? This is your example with the changes:

Flutter animation how to fade in/out gradually

Posted by Jessica Taylor | Updated on | Flutter


Flutter animation how to fade in/out gradually. I think you’re on the right track, but you should only use one AnimationController per AnimatedWidget. I fixed some bugs in your code.

How to achieve this design of Dropdown in flutter?

Posted by Jessica Taylor | Updated on | Flutter


Want to achieve this design of Dropdown in flutter? The hint for the DropdownButton and the child for the DropdownMenuItem are just widgets like everything else, so you can put whatever you want in there. …

How to disable button after first click in flutter?

Posted by Jessica Taylor | Updated on | Flutter


If you want to disable button after first click in flutter? Instead of using RaisedButton directly, you can turn it into a StatefulWidget. Then use the ChangeNotifier to change it state from enable to disable …

Widget changing but no animation

Posted by Jessica Taylor | Updated on | Flutter


Widget changing but no animation. Try the below example code:

How to prevent ripple effect on surrounding InkWell when tapped on InkWell inside

Posted by Jessica Taylor | Updated on | Flutter


If you want to prevent ripple effect on surrounding InkWell when tapped on InkWell inside. If you want a quick hack, check it out:

How get Json data from firebase notification payload in flutter

Posted by Jessica Taylor | Updated on | Flutter


If you want to get Json data from firebase notification payload in flutter. If you want get data from notification payload then you need to send your data inside “data” -field of the message.

Flutter Text inside an Expanded Widget within a Column overflowing

Posted by Jessica Taylor | Updated on | Flutter


Flutter Text inside an Expanded Widget within a Column overflowing. Try wrapping your column with ‘Flexible’ instead of expandable. I had the same issue with text overflowing in column and wrapping column itself with ‘flexible’ …

No Directionality widget found. InkWell widgets require a Directionality widget ancestor

Posted by Jessica Taylor | Updated on | Flutter


No Directionality widget found. InkWell widgets require a Directionality widget ancestor. You have to add a MaterialApp widget before container, like this:

Local notification flutter

Posted by Jessica Taylor | Updated on | Flutter


Local notification flutter. From the plugin sample code if you wanna schedule a notification you have to use a code like that:

How to make a small rounded rectangle in flutter?

Posted by Jessica Taylor | Updated on | Flutter


Want to make a small rounded rectangle in flutter? You can use your Widget inside Padding. Below is a quick example:

How to make a POST request in a flutter for web API?

Posted by Jessica Taylor | Updated on | Flutter


Want to make a POST request in a flutter for web API? I solved the problem by using following code: