asyncstate 0.0.1 copy "asyncstate: ^0.0.1" to clipboard
asyncstate: ^0.0.1 copied to clipboard

outdated

A new Flutter package project.

Async State

Platform


Installing #

1. Depend on it #

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

dependencies:
  async_loader: ^0.0.1

2. Install it #

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

3. Import it #

Now in your Dart code, you can use:

import 'package:asyncstate/asyncstate.dart;'

Usage #

AsyncStateClass:

void main() {
  AsyncStateClass.onInitAsyncState(
    defaultDialogWidget:
        const MyLoading(), //TODO Seta o Widget de loading inicial.
  );
  runApp(const MyApp());
}         

Difine your Widget with Loading default.


 class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      themeMode: ThemeMode.dark,
      navigatorObservers: [
        AsyncStateClass.observer //TODO Here
      ], 
      theme: ThemeData.dark(),
      home: HomePage(),
    );
  }
}

Add "AsyncStateClass.observer" on MaterialApp.

Bugs or Requests #

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket on GitHub and I'll look into it. Pull request are also welcome.

Contributors #


Leonardo Serrano


Marcus Brasizza

If you like what I do, maybe consider buying me a coffee/tea πŸ₯ΊπŸ‘‰πŸ‘ˆ

Buy Me A Coffee

50
likes
0
pub points
89%
popularity

Publisher

verified publisherleonardoserrano.dev

A new Flutter package project.

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on asyncstate