flutter_easy_utils 1.0.3+2 flutter_easy_utils: ^1.0.3+2 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": "مرحبا بك"
}
Then, enjoy yourself:
Navigate to HomeScreen
#
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.