Getting Started

Installation

Update pubspec.yaml and add the following line to your dependencies. Replace $version with the latest version of this package.

dependencies:
  ez_flutter: 0.4.0

Update your pubspec.yaml file and add the following assets locations.

flutter:
  assets:
   - assets/
   - locale/

Import it.

import 'package:ez_flutter/ez_flutter.dart';

Run the EZ Flutter app

Use the EzRunner to run an EZ Flutter app.

import 'package:ez_flutter/ez_flutter.dart';

void main() async =>
    await EzRunner.run(MyHomePage(title: 'EZ Flutter Home'));

EzRunner

EzRunner is the class for starting a EZ Flutter app. It calls the runApp method with a MaterialApp or CupertinoApp adding a TranslationsDelegate and the locales as supported locales.

It will autoload configuration from different sources. Running the application with default settings.

  • It will only load the EZ Flutter settings stored in the assets/ez_settings.json file
  • It will only support EN as a language for translation
  • It will run a MaterialApp
  • It will use the default values of ThemeData

See the example page for more examples.