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’s 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’s 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’t 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’s 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

Lock Device Orientation in Flutter

We may have noticed, in some mobile apps, we just can’t rotate them. Even if auto-rotation (or whatever thing it is) on, we can’t rotate the phone while we’re using those apps. To be honest, I first used this feature, just because I was too lazy to create a UI for landscape mode 😊. So I locked it and people will never be able to on Landscape mode. In Flutter, It is quite easy to implement this....

April 26, 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