over_screen_widget 1.0.0+1 over_screen_widget: ^1.0.0+1 copied to clipboard
Allow you to place another widget over other. Eg create loading.
import 'package:over_screen_widget/over_screen_widget.dart';
...
OverScreenWidget(
keepChildVisible: true,
// Main content
builder: (controller) {
// After 5 seconds, hide content that is over main content
Future.delayed(Duration(seconds: 5)).then((_) => controller.hide());
// return main content
return Center(
child: Text('Main content')
);
},
// Content over main content
overScreenContent: Container(
color: Colors.grey.withOpacity(0.5),
alignment: Alignment.center,
// Loading over main content
child: CircularProgressIndicator(),
),
);