CNSearchScaffold constructor

const CNSearchScaffold({
  1. Key? key,
  2. required List<CNSearchScaffoldItem> items,
  3. required int currentIndex,
  4. required ValueChanged<int> onTap,
  5. required List<Widget> children,
  6. Color? tint,
  7. Color? unselectedTint,
  8. ValueChanged<String>? onSearchChanged,
  9. ValueChanged<String>? onSearchSubmit,
  10. ValueChanged<bool>? onSearchActiveChanged,
  11. String searchPlaceholder = 'Search',
  12. CNTabBarSearchController? searchController,
})

Creates a search scaffold with native iOS 26 liquid glass support.

Implementation

const CNSearchScaffold({
  super.key,
  required this.items,
  required this.currentIndex,
  required this.onTap,
  required this.children,
  this.tint,
  this.unselectedTint,
  this.onSearchChanged,
  this.onSearchSubmit,
  this.onSearchActiveChanged,
  this.searchPlaceholder = 'Search',
  this.searchController,
}) : assert(
       items.length == children.length,
       'items and children must have same length',
     ),
     assert(items.length >= 2, 'Must have at least 2 items');