Files
flutter-samples/packages/chatty/lib/ui/common/loading_view.dart
T
Neevash Ramdial (Nash) 030c3eb428 Improve repo structure (#22)
* app updated

* readme updated

* rename base folder

* update chatty's readme

* move apps to packages dir

* update repo overview

Co-authored-by: diegoveloper <diego.velasquez.lopez@gmail.com>
2021-03-10 15:18:00 -04:00

31 lines
605 B
Dart

import 'package:flutter/material.dart';
class LoadingView extends StatelessWidget {
final bool isLoading;
final Widget child;
const LoadingView({
Key key,
@required this.child,
this.isLoading = false,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: [
child,
if (isLoading)
Container(
color: Colors.black26,
child: Center(
child: CircularProgressIndicator(),
),
),
],
),
);
}
}