pop static method

Future<bool> pop({
  1. bool animated = true,
  2. int count = 1,
})

Removes the top-most template from the navigation hierarchy.

  • If animated is true, CarPlay animates the transition between templates.
  • count represents how many times this function will occur.

Implementation

static Future<bool> pop({bool animated = true, int count = 1}) async {
  FlutterCarPlayController.templateHistory.removeLast();
  return await _carPlayController.reactToNativeModule(
    FCPChannelTypes.popTemplate,
    <String, dynamic>{
      "count": count,
      "animated": animated,
    },
  );
}