Let’s start

Hi coders. Yes, we can navigate without context easily with simple steps. GetX make it simple as well as reliable.

pubspec.yaml

get: ^3.23.1 

get dependencies using,

flutter pub get

import

import 'package:get/get.dart'; 

Now, just replace your MaterialAppwith GetMaterialApp inside main.dart

void main() {
runApp(GetMaterialApp();
}

Navigate to new screen:

Get.to(NextScreen());

Navigate to new screen with name.

Get.toNamed('/details');

To close snackbars, dialogs, bottomsheets, or anything you would normally close with Navigator.pop(context);

Get.back();

This package helps developers to reduce boilerplates form their code & makes the development faster, i know it will reduces irritation of yours.

That’s why i suggested that !!

Thanks me later.

For Reference go to the link below.

https://pub.dev/packages/get

If you like this article, just give me a Clap

Happy Coding !


Hello Folks

Flutter made it easy by providing razorpay payment gateway. In this article I’ll show you how to implement payment gateway of razorpay. First off all you need to Signup with razorpay to generate API key. Go to the link here to generate that key.

Note : Will use the test key for debug, so that no payment will deducted from your account while UT.

Also note that, razorpay requires min API level 19 or higher.

First we have to add razorpay package to our pubspec.yaml file like this.

pubspec.yaml

razorpay_flutter: ^1.2.3

get dependency using

flutter pub get

imports


Hello guys,

In this article I’ll show you how to implement Sign-in-with-google in Flutter.

First we have to setup the connection with Firebase, so let’s start

Go to firebase console and add a new project to the firebase. Enter the project name and click on continue.

Then, you just click on the all checkboxes and create a project.


Hello everyone

In this article I’ll show you how to upload a file(image/video) to the server in form of multipart. Multipart means file will be distributed in parts, then will be uploaded to the server. For this task, we are using http restful client. First we need to add http package like this.

pubspec.yaml

http: ^0.12.2

get dependency using

 flutter pub get

imports

import 'package:http/http.dart';

Now we are ready, the code below used to create multipart-post request

var request = new http.MultipartRequest(
"POST", Uri.parse('your api url here'));

Adding file path to the request, where ‘profile_pic’ is the key for your…


Hello everyone.

Its an amazing task to not allow user to take a screenshot of a particular widget. It make our app more secure. In flutter, it is very easy to allow user to not to take screenshots. A package is available in flutter, which makes it easy to prevent screenshot capturing.

Let’s begin.

First you need to add a package in your pubspec.yaml file

flutter_windowmanager: ^0.0.2

get dependency

$ flutter pub get

imports

import 'package:flutter_windowmanager/flutter_windowmanager.dart';

Now using the code snippet below, you can disable the screenshots for that particular widget.

await FlutterWindowManager.addFlags(FlutterWindowManager.FLAG_SECURE);

You can use the code inside initState().Here's…


What’s up coders…

Whenever we want to refresh the screen while writing apps, either we click on side menu of dashboard, or we implement a button to refresh our screen to fetch new data available.

But, does this really make any sense??

Nope, we can implement pull down to refresh the screen of our screen if there is new data available or any change in data. It boost our app performance as well as UI improvement.

For this kind of functionality, a package is available which provider a smart refresher to pull down to refresh the screen.

So. Let’s implement…


Hello all,

Here is the shortcut to download image file from URL. For all those lazy programmers. A Flutter package makes this task simple.

Start

pubspec.yaml

image_downloader: ^0.20.1

get dependencies using,

flutter pub get

import

import 'package:image_downloader/image_downloader.dart';

Add this permission in AndroidManifest.xml

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

User this code below, where you want to download image from server.

try {
var imageId = await ImageDownloader.downloadImage(url);
if (imageId == null) {
return;
}
var path = await ImageDownloader.findPath(imageId);
} on PlatformException catch (error) {
print(error);
}

You can also set your custom path where you wanna store that file

await ImageDownloader.downloadImage(url,                        destination: AndroidDestinationType.custom(directory:'sample'));


Let’s Start

A shimmer effect is used to enhance the UI of our app while fetching data. A package provides an easy way to add shimmer effect in Flutter project.

Yeah ! …. That’s what I’m looking for.

Let’s create a shimmer,

Add package to your pubspec.yaml

pubspec.yaml

shimmer: ^1.1.2

get dependencies using,

flutter pub get

imports

import 'package:shimmer/shimmer.dart';

Now, let’s apply the shimmer widget.

Shimmer.fromColors(
baseColor: Colors.grey[300],
highlightColor: Colors.grey[100],
enabled: _enabled,
child: // your child,
);

Use like that for better user. (List)

Shimmer.fromColors(
baseColor: Colors.grey[300],
highlightColor: Colors.grey[100],
enabled: _enabled,
child: ListView.builder(…

Akshay Papneja

Flutter Developer Since 2019

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store