flutter_easy_utils 1.0.5
flutter_easy_utils: ^1.0.5 copied to clipboard

A Flutter package to handle dialogs , snakbars , loading , shareprefranse , api requests and more.

Flutter Easy Utils #

This package allows you to setup a powerful Auto Configure App with localization system , Provider and more. and in only a few minutes.

Features #

Here are some features:

  • Easy, lightweight, open-source.
  • Auto configure Localization.
  • Auto configure MaterialApp.
  • Auto configure Colors and Fonts.
  • Dark and Light mode.
  • Change languages.
  • Listen to internet connection.
  • easy tools.
  • getString etc from SharedPreference.
  • prepared dialogs.
  • prepared snackBars.
  • prepared admob ads (reward , banner and full screen).
  • prepared navigate to screen with page transaction.
  • size config to responsive screen dimensions.
  • Powerful API response handler
  • and more ...
  • MIT licensed.
  • Easily extensible.

Getting Started #

Installing #

Add this to your package's pubspec.yaml file:

dependencies:
  flutter_easy_utils: ^1.0.3

Import #

import 'package:flutter_easy_utils/flutter_easy_utils.dart';

How to use #

First, initialize EasyApp in your App:

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return EasyApp(
          builder: (context) => Home(),
        );
  }
}

Then you create a folder named languages in your assets directory with the defined languages in it. An example structure could be :

assets
└── languages
    ├── en.json
    └── ar.json

Here's an example of en.json :

{
  "hello": "Hello !"
}

and an example of ar.json :

{
  "hello": "مرحبا بك"
}

Admob #

Android Specific Setup #

Update your AndroidManifest.xml

Add your AdMob App ID to your app's AndroidManifest.xml file by adding the <meta-data> tag shown below. You can find your App ID in the AdMob UI. For android:value insert your own AdMob App ID in quotes, as shown below.

You can use these test App ID's from Admob for development:

Android: ca-app-pub-3940256099942544~3347511713
iOS: ca-app-pub-3940256099942544~1458002511
<manifest>
  <application>
    <meta-data
      android:name="com.google.android.gms.ads.APPLICATION_ID"
      android:value="ca-app-pub-3940256099942544~3347511713"/>
  </application>
</manifest>

Then, enjoy yourself:

old #

Navigator.of(context).push(PageTransition(child: HomeScreen(), type: PageTransitionType.leftToRight));

with Easy Utils #

goTo(context, HomeScreen(), trans: PageTransitionType.leftToRight);

translate text #

old #

EzLocalization.of(context)!.get('hello');

now :) #

tran(context , "hello");

it's really easy :)

  • You can say Thank You, Donate to the developer.