Skip to content

Commit

Permalink
updated code by new flutter version
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzmitry Kasianiuk authored and Dzmitry Kasianiuk committed Nov 27, 2023
1 parent eb05616 commit b38d815
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/src/popover.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ Future<T?> showPopover<T extends Object?>({
Duration transitionDuration = const Duration(milliseconds: 200),
double radius = 8,
List<BoxShadow> shadow = const [
BoxShadow(color: Color(0x1F000000), blurRadius: 5)
BoxShadow(
color: Color(0x1F000000),
blurRadius: 5,
)
],
double arrowWidth = 24,
double arrowHeight = 12,
Expand Down Expand Up @@ -116,11 +119,8 @@ Future<T?> showPopover<T extends Object?>({
return Navigator.of(context, rootNavigator: true).push<T>(
RawDialogRoute<T>(
pageBuilder: (_, animation, __) {
return WillPopScope(
onWillPop: () {
onPop?.call();
return Future.value(true);
},
return PopScope(
onPopInvoked: (_) => onPop?.call(),
child: PopoverItem(
transition: transition,
child: Builder(builder: bodyBuilder),
Expand All @@ -142,8 +142,8 @@ Future<T?> showPopover<T extends Object?>({
);
},
barrierDismissible: barrierDismissible,
barrierLabel: barrierLabel ??=
MaterialLocalizations.of(context).modalBarrierDismissLabel,
// ignore: lines_longer_than_80_chars
barrierLabel: barrierLabel ??= MaterialLocalizations.of(context).modalBarrierDismissLabel,
barrierColor: barrierColor,
transitionDuration: transitionDuration,
settings: routeSettings,
Expand Down

0 comments on commit b38d815

Please sign in to comment.