import 'package:flutter/material.dart';
import 'package:progress_hud_v2/progress_hud.dart';

/* 
 *@author: Elham Rababah 
 *@Date:19/4/2020  
 *@param: 
 *@return: Positioned
 *@desc:   AppLoaderWidget to create loader
 */
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;
  @override
  void initState() {
    super.initState();
/* 
 *@author: Elham Rababah 
 *@Date:19/4/2020  
 *@param: 
 *@return:
 *@desc:   create loader the desing
 */
    _progressHUD = new ProgressHUD(
      backgroundColor: Colors.black12,
      color: Colors.black,
      // containerColor: Colors.blue,
      borderRadius: 5.0,
      // text: 'Loading...',
    );
  }

  @override
  Widget build(BuildContext context) {
    return Positioned(child: _progressHUD);
  }
}
