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

outdated

A new Flutter package project.

example/lib/main.dart

import 'package:asyncstate/asyncstate.dart';
import 'package:example/components/my_loadig.dart';
import 'package:flutter/material.dart';

import 'home/home_page.dart';

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

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: [
        AsyncState.observer
      ], //TODO Add Observer navigator para pegar o contexto.
      theme: ThemeData.dark(),
      home: HomePage(),
    );
  }
}
51
likes
0
pub points
88%
popularity

Publisher

verified publisherleonardoserrano.dev

A new Flutter package project.

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on asyncstate