popModal static method
Removes a modal template. Since CPAlertTemplate and CPActionSheetTemplate are both modals, they can be removed. If animated is true, CarPlay animates the transition between templates.
Implementation
static Future<bool> popModal({bool animated = true}) async {
FlutterCarPlayController.currentPresentTemplate = null;
return await _carPlayController.reactToNativeModule(
FCPChannelTypes.closePresent,
animated,
);
}