First step form implement loading
parent
4390e96270
commit
c41669ec4e
@ -0,0 +1,50 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:progress_hud_v2/progress_hud.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class AppLoaderWidget extends StatefulWidget {
|
||||||
|
AppLoaderWidget({Key key, this.title}) : super(key: key);
|
||||||
|
|
||||||
|
final String title;
|
||||||
|
|
||||||
|
@override
|
||||||
|
_AppLoaderWidgetState createState() => new _AppLoaderWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AppLoaderWidgetState extends State<AppLoaderWidget> {
|
||||||
|
ProgressHUD _progressHUD;
|
||||||
|
|
||||||
|
// bool _loading = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
_progressHUD = new ProgressHUD(
|
||||||
|
backgroundColor: Colors.black12,
|
||||||
|
color: Colors.black,
|
||||||
|
// containerColor: Colors.blue,
|
||||||
|
borderRadius: 5.0,
|
||||||
|
// text: 'Loading...',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
// void dismissProgressHUD() {
|
||||||
|
// setState(() {
|
||||||
|
// if (_loading) {
|
||||||
|
// _progressHUD.state.dismiss();
|
||||||
|
// } else {
|
||||||
|
// _progressHUD.state.show();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// _loading = !_loading;
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
return Positioned(child: _progressHUD) ;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue