Skip to content

Commit 666e263

Browse files
committed
💄 Unify the back button in the picker
1 parent 08be1f2 commit 666e263

File tree

1 file changed

+4
-24
lines changed

1 file changed

+4
-24
lines changed

lib/src/delegates/asset_picker_builder_delegate.dart

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -452,30 +452,10 @@ abstract class AssetPickerBuilderDelegate<A, P> {
452452
Widget backButton(BuildContext context) {
453453
return Padding(
454454
padding: const EdgeInsets.symmetric(vertical: 4.0),
455-
child: () {
456-
if (isAppleOS) {
457-
return GestureDetector(
458-
onTap: Navigator.of(context).maybePop,
459-
child: Container(
460-
margin: isAppleOS
461-
? const EdgeInsets.symmetric(horizontal: 20.0)
462-
: null,
463-
child: IntrinsicWidth(
464-
child: Center(
465-
child: Text(
466-
Constants.textDelegate.cancel,
467-
style: const TextStyle(fontSize: 18.0),
468-
),
469-
),
470-
),
471-
),
472-
);
473-
}
474-
return IconButton(
475-
onPressed: Navigator.of(context).maybePop,
476-
icon: const Icon(Icons.close),
477-
);
478-
}(),
455+
child: IconButton(
456+
onPressed: Navigator.of(context).maybePop,
457+
icon: const Icon(Icons.close),
458+
),
479459
);
480460
}
481461

0 commit comments

Comments
 (0)