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

outdated

This package will help you to call a loading in your async methods very easyly, and you don't need to worrie when it's is starting or finishing.

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.setLoaderPersonalized(
    defaultLoaderWidget: const MyLoading(),

    /// Here you can customize your default loading that will show every transaction
    /// Leave it and it will show a simple CircularProgress indicator
  );
  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],

      /// Add Observer navigatowr para pegar o contexto.
      theme: ThemeData.dark(),
      home: HomePage(),
    );
  }
}
51
likes
0
pub points
88%
popularity

Publisher

verified publisherleonardoserrano.dev

This package will help you to call a loading in your async methods very easyly, and you don't need to worrie when it's is starting or finishing.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on asyncstate