Skip to content

Commit

Permalink
Use SafeArea instead of useSafeArea
Browse files Browse the repository at this point in the history
  • Loading branch information
amantoux committed May 3, 2024
1 parent a536717 commit 0fa9c69
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions packages/fleather/lib/src/widgets/link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,28 +111,29 @@ Future<LinkMenuAction> _showMaterialMenu(
BuildContext context, String link) async {
final result = await showModalBottomSheet<LinkMenuAction>(
clipBehavior: Clip.hardEdge,
useSafeArea: true,
context: context,
builder: (ctx) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
_MaterialAction(
title: 'Open',
icon: Icons.language_sharp,
onPressed: () => Navigator.of(context).pop(LinkMenuAction.launch),
),
_MaterialAction(
title: 'Copy',
icon: Icons.copy_sharp,
onPressed: () => Navigator.of(context).pop(LinkMenuAction.copy),
),
_MaterialAction(
title: 'Remove',
icon: Icons.link_off_sharp,
onPressed: () => Navigator.of(context).pop(LinkMenuAction.remove),
),
],
return SafeArea(
child: Column(

Check warning on line 117 in packages/fleather/lib/src/widgets/link.dart

View check run for this annotation

Codecov / codecov/patch

packages/fleather/lib/src/widgets/link.dart#L116-L117

Added lines #L116 - L117 were not covered by tests
mainAxisSize: MainAxisSize.min,
children: [
_MaterialAction(

Check warning on line 120 in packages/fleather/lib/src/widgets/link.dart

View check run for this annotation

Codecov / codecov/patch

packages/fleather/lib/src/widgets/link.dart#L119-L120

Added lines #L119 - L120 were not covered by tests
title: 'Open',
icon: Icons.language_sharp,
onPressed: () => Navigator.of(context).pop(LinkMenuAction.launch),

Check warning on line 123 in packages/fleather/lib/src/widgets/link.dart

View check run for this annotation

Codecov / codecov/patch

packages/fleather/lib/src/widgets/link.dart#L123

Added line #L123 was not covered by tests
),
_MaterialAction(

Check warning on line 125 in packages/fleather/lib/src/widgets/link.dart

View check run for this annotation

Codecov / codecov/patch

packages/fleather/lib/src/widgets/link.dart#L125

Added line #L125 was not covered by tests
title: 'Copy',
icon: Icons.copy_sharp,
onPressed: () => Navigator.of(context).pop(LinkMenuAction.copy),

Check warning on line 128 in packages/fleather/lib/src/widgets/link.dart

View check run for this annotation

Codecov / codecov/patch

packages/fleather/lib/src/widgets/link.dart#L128

Added line #L128 was not covered by tests
),
_MaterialAction(

Check warning on line 130 in packages/fleather/lib/src/widgets/link.dart

View check run for this annotation

Codecov / codecov/patch

packages/fleather/lib/src/widgets/link.dart#L130

Added line #L130 was not covered by tests
title: 'Remove',
icon: Icons.link_off_sharp,
onPressed: () => Navigator.of(context).pop(LinkMenuAction.remove),

Check warning on line 133 in packages/fleather/lib/src/widgets/link.dart

View check run for this annotation

Codecov / codecov/patch

packages/fleather/lib/src/widgets/link.dart#L133

Added line #L133 was not covered by tests
),
],
),
);
},
);
Expand Down

0 comments on commit 0fa9c69

Please sign in to comment.