stfDialog<T> function
Implementation
Future<T?> stfDialog<T>(BuildContext context0, Widget child, {double height = 300}) {
BuildContext context = NavigationService.defaultKey.currentState!.overlay!.context;
return showDialog<T>(
context: context,
barrierDismissible: true,
builder: (context) {
return Material(
child: StatefulBuilder(
builder: (context, setState) {
return Container(
height: height,
width: MediaQuery.of(context).size.width,
child: child,
);
},
),
);
},
);
}