showPopupWindow<T> function
Future<T?>
showPopupWindow<T>({
- required BuildContext context,
- required Widget popupWindow,
- double elevation = 8.0,
- String? semanticLabel,
- required RelativeRect position,
- bool fullWidth = false,
弹窗方法
Implementation
Future<T?> showPopupWindow<T>({
required BuildContext context,
required Widget popupWindow,
double elevation: 8.0,
String? semanticLabel,
required RelativeRect position,
bool fullWidth: false,
}) {
var label = semanticLabel;
switch (defaultTargetPlatform) {
case TargetPlatform.iOS:
label = semanticLabel;
break;
default:
label = semanticLabel ?? MaterialLocalizations.of(context).popupMenuLabel;
}
return Navigator.push<T>(
context,
new _PopupWindowRoute(
// context: context,
position: position,
child: popupWindow,
elevation: elevation,
semanticLabel: label,
theme: Theme.of(context),
barrierLabel:
MaterialLocalizations.of(context).modalBarrierDismissLabel,
fullWidth: fullWidth,
));
}