showActionSheet static method
It will present CPActionSheetTemplate modally.
- template is to present modally.
- If animated is true, CarPlay animates the presentation of the template.
!
CarPlay can only present one modal template at a time.
Implementation
static void showActionSheet({
required CPActionSheetTemplate template,
bool animated = true,
}) {
_carPlayController.methodChannel.invokeMethod(
CPEnumUtils.stringFromEnum(FCPChannelTypes.setActionSheet.toString()),
<String, dynamic>{
'rootTemplate': template.toJson(),
'animated': animated,
}).then((value) {
if (value) {
FlutterCarPlayController.currentPresentTemplate = template;
}
});
}