Releases: Daniel-Ioannou/flutter_adaptive_action_sheet
Releases · Daniel-Ioannou/flutter_adaptive_action_sheet
v2.0.3
In this version:
- Add
useRootNavigator
parameter (optional) to set useRootNavigator ofshowCupertinoModalPopup
(Default true) and useRootNavigator ofshowModalBottomSheet
(Default false)showAdaptiveActionSheet( context: context, title: const Text('Title'), useRootNavigator: true, actions: <BottomSheetAction>[ BottomSheetAction(title: const Text('Item 1'), onPressed: (context) {}), BottomSheetAction(title: const Text('Item 2'), onPressed: (context) {}), BottomSheetAction(title: const Text('Item 3'), onPressed: (context) {}), ], cancelAction: CancelAction(title: const Text('Cancel')),// onPressed parameter is optional by default will dismiss the ActionSheet );
- Wrap the content of
showMaterialBottomSheet
with a SafeArea
v2.0.2
In this version:
- Add context to 'onPressed' for BottomSheetAction.
showAdaptiveActionSheet( context: context, title: const Text('Title'), actions: <BottomSheetAction>[ BottomSheetAction(title: const Text('Item 1'), onPressed: (context) {}), BottomSheetAction(title: const Text('Item 2'), onPressed: (context) {}), BottomSheetAction(title: const Text('Item 3'), onPressed: (context) {}), ], cancelAction: CancelAction(title: const Text('Cancel')),// onPressed parameter is optional by default will dismiss the ActionSheet );
v2.0.0
In this version:
- Migrated to null safety
v1.1.0
In this version:
Breaking change:
- Change
title
type from String to Widget
Version 1.1.0 or later | Version 1.0.12 or earlier |
---|---|
BottomSheetAction(
title: const Text(
'Title',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w500,
),
),
onPressed: () {},
leading: const Icon(Icons.add, size: 25),
), |
BottomSheetAction(
title: 'Title',
textStyle: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w500,
),
onPressed: () {},
leading: const Icon(Icons.add, size: 25),
), |
v1.0.12
In this version:
- Fix issues when trailing or leading widget require a Material widget ancestor.
v1.0.11
In this version:
- Add options for leading and trailing widget
- Add options for text align
showAdaptiveActionSheet( context: context, actions: <BottomSheetAction>[ BottomSheetAction( title: 'Add', onPressed: () {}, leading: const Icon( Icons.add, size: 25, ), trailing: const Icon( Icons.delete, size: 25, color: Colors.red, ), textAlign: TextAlign.start, ), ], cancelAction: CancelAction(title: 'Cancel'), );
v1.0.10
In this version:
- Support web platform
v1.0.9
In this version:
- [Android] Fix default material background color.
- [Android] Fix the padding on the top if title not set.
- [iOS] Use
showCupertinoModalPopup
instead ofshowModalBottomSheet
v1.0.8
In this version:
- Update documentation
- Format project
v1.0.7
In this version:
- Add optional
textStyle
parameter for each action.showAdaptiveActionSheet( context: context, actions: <BottomSheetAction>[ BottomSheetAction( title: 'Item 1', onPressed: () {}, textStyle: const TextStyle( fontSize: 25, color: Colors.blueAccent, ), ), BottomSheetAction(title: 'Item 2', onPressed: () {}), ], cancelAction: CancelAction(// onPressed parameter is optional by default will dismiss the ActionSheet title: 'Cancel', textStyle: const TextStyle( fontSize: 25, color: Colors.blueAccent, ), ), );