buildBottomNavigationPreview function

  1. @Preview(name: 'Bottom Navigation Bar')
Widget buildBottomNavigationPreview()

Implementation

@Preview(name: 'Bottom Navigation Bar')
Widget buildBottomNavigationPreview() => _NavigationPreview(
  title: 'Bottom Navigation Bar',
  builder:
      (
        List<VooNavigationItem> items,
        String selectedId,
        void Function(String) onSelected,
      ) {
        final config = VooNavigationConfig(
          items: items,
          selectedId: selectedId,
          onNavigationItemSelected: onSelected,
        );
        return Scaffold(
          appBar: AppBar(
            title: const Text('Bottom Navigation'),
            backgroundColor: Colors.blue.shade50,
          ),
          body: Center(
            child: Text(
              'Selected: $selectedId',
              style: const TextStyle(fontSize: 24),
            ),
          ),
          bottomNavigationBar: VooAdaptiveBottomNavigation(
            config: config,
            selectedId: selectedId,
            onNavigationItemSelected: onSelected,
          ),
        );
      },
);