Easy Dialogs using GetX

Intro I you have read my post about snackBars using GetX, You already know how easy is it to work with GetX in Flutter. Dialogs are an essential part of mobile Apps. They help to convey alerts and important messages as well as to do certain actions. Normally in Flutter, shown below is a sample code for showing and Alert Dialog. showDialog( context: context, builder: (context) => AlertDialog( title: Text( "Alert", ), content: Text( "This is sample Content", ), ), ); That鈥檚 too many Lines of code for a Simple Dialog like this....

May 3, 2021 路 3 min 路 Muhammed Mukhthar CM

Check App on Different Screen Sizes and Orientations

You have successfully created a mobile app. And now you have to see how it may work on another device with different screen size. Grab your friend鈥檚 phone and Install the App on it. Right? The flutter package ecosystem has an amazing package named device_preview which can help you with that. It allows us to view our App on Different form factors (phone, laptop, tablet, desktop) and different Operating Systems. App running with Device Preview...

May 1, 2021 路 3 min 路 Muhammed Mukhthar CM

Sharing Files in Flutter

Sharing is an integral part of mobile apps. Millions of digital content are produced and consumed every minute. Because of this, we can鈥檛 avoid a feature like this on our mobile apps. There is a package named share in Flutter to do just this. it can be used to share just text or even Files. First, let鈥檚 add the package to our pubspec.yaml file. dependencies: flutter: sdk: flutter share: ^2.0.1 # add the latest version from pub....

April 28, 2021 路 2 min 路 Muhammed Mukhthar CM

Create an Image from Widget in Flutter

Intro In one of my recent projects, I had a task to create an Image from a Flutter Widget. The App was essentially one to show results for some competitions. I had to make a poster out of each Result. It consists of the program name, its category, the names of participants who got the first 3 places. Anyway, It was the first time I was doing it. Prerequisites First of all, we have to add the path_provider package to our pubspec....

April 24, 2021 路 3 min 路 Muhammed Mukhthar CM

Exit Confirmation in Flutter

We don鈥檛 want our users to Accidentally close our App. So, Confirmation Popups are a common feature in any Mobile App. We have a widget in Flutter for doing this. In Flutter, we have a widget Named WillPopScope. We just have to wrap our Page in this widget and provide a function to its onWillPop argument. It will be triggered when the user tries to close the current route. The onWillPop will accept a Future<bool> Function....

April 21, 2021 路 2 min 路 Muhammed Mukhthar CM