EzRunner class

The class for starting a EZ Flutter app.

It calls the runApp method with a MaterialApp or CupertinoApp adding a EzTranslationsDelegate and the locales as supported locales.

title is the title of the app. blocs are custom BLOCs that can be added to the EzGlobalBloc to be accessable within the app. cupertino defines if the runner should use CupertinoApp instead of MaterialApp. locales are the supported languages. The default is 'EN'. initialRoute initial application route. routes The application's top-level routing table. locale The appilcation locale. envPath is the path for the environment configuration. applicationPath is the path for your application configuration. externalUrl is the url for external configuration. queryParameters are the queryParameters to use while fetching the external configuration. headers are the headers to use while fetching the external configuration. materialThemeData the material theme data to add to the MaterialApp cupertinoThemeData the material theme data to add to the CupertinoApp

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
  • It will only add the default blocs from EZ Flutter to the EzGlobalBloc
void main() async =>
     await EzRunner.run(MyHomePage(), "EZ Flutter App");

Constructors

EzRunner()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

run(Widget app, String title, {String? initialRoute, Map<String, WidgetBuilder> routes = const <String, WidgetBuilder>{}, Locale? locale, bool cupertino = false, List<Locale> locales = const [Locale('en')], String? envPath, String? applicationPath, ThemeData? materialThemeData, CupertinoThemeData? cupertinoThemeData, String? externalUrl, Map<String, String>? queryParameters, Map<String, String>? headers, bool displayDebugBadge = true, List<ThemeData>? materialThemes, List<CupertinoThemeData>? cupertinoThemes}) Future<void>