popToRoot static method
Removes all of the templates from the navigation hierarchy except the root template. If animated is true, CarPlay animates the presentation of the template.
Implementation
static Future<bool> popToRoot({bool animated = true}) async {
FlutterCarPlayController.templateHistory = [
FlutterCarPlayController.currentRootTemplate
];
return await _carPlayController.reactToNativeModule(
FCPChannelTypes.popToRootTemplate,
animated,
);
}