flutter_overlay_loader
リモートデータの取得や、長時間実行される非同期タスク中にオーバーレイロードを管理するためのシンプルなFlutterパッケージです。Flutterオーバーレイローダーは使いやすいです。
将来のタスク完了時にオーバーレイローダーまたは進行状況インジケーターを表示したい開発者向けの新しいFlutterパッケージ。
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
A simple Flutter package for managing loader when fetching remote data or any long running async task. Flutter overlay loader is easy to use. You can show loader using only write two lines of code.
Overlay loader without overlaying Appbar


Overlay Loader without overlaying BottomAppBar and also overlaying AppBar

dependencies:
flutter_overlay_loader: ^1.0.8
import 'package:flutter_overlay_loader/flutter_overlay_loader.dart';
When start network call then call this line of code..
Loader.show(context,progressIndicator:LinearProgressIndicator());
After finished network call then call :
Loader.hide();
You can customize this loader..
Loader.show(context,
isSafeAreaOverlay: false,
isBottomBarOverlay: false,
overlayFromBottom: 80,
overlayColor: Colors.black26,
progressIndicator: CircularProgressIndicator(backgroundColor: Colors.red),
themeData: Theme.of(context)
.copyWith(colorScheme: ColorScheme.fromSwatch().copyWith(secondary: Colors.green))
);
You can also check loader is showing or not using the property : Loader.isShown and you can
prevent back pressed like this snippet:
WillPopScope(
child: //TODO ,
onWillPop:()async => !Loader.isShown
)
Finally dispose call hide method on dispose method :
@override
void dispose() {
Loader.hide();
super.dispose();
}
依存関係一覧 3 件
{"sdk":"flutter"}{"sdk":"flutter"}^2.0.0用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗