CPTabBarTemplate constructor

CPTabBarTemplate({
  1. String? title,
  2. required List<CPListTemplate> templates,
})

When creating a CPTabBarTemplate, provide an array of templates for the tab bar to display. CarPlay treats the array’s templates as root templates, each with its own navigation hierarchy. When a tab bar template is the rootTemplate of your app’s interface controller and you use the controller to add and remove templates, CarPlay applies those changes to the selected tab’s navigation hierarchy.

! You can’t add a tab bar template to an existing navigation hierarchy, or present one modally.

Implementation

CPTabBarTemplate({
  this.title,
  required this.templates,
});