popToRoot static method

Future<bool> popToRoot({
  1. bool animated = true,
})

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 {
  final bool? isCompleted = await _carPlayController.flutterToNativeModule(
    FCPChannelTypes.popToRootTemplate,
    animated,
  );

  return isCompleted ?? false;
}