buildNavigationLabelPreview function

  1. @Preview(name: 'Navigation Label')
Widget buildNavigationLabelPreview()

Implementation

@Preview(name: 'Navigation Label')
Widget buildNavigationLabelPreview() => MaterialApp(
  theme: ThemeData(
    colorScheme: ColorScheme.fromSeed(seedColor: Colors.indigo),
    useMaterial3: true,
  ),
  home: Scaffold(
    appBar: AppBar(
      title: const Text('Navigation Labels'),
      backgroundColor: Colors.indigo.shade50,
    ),
    body: Padding(
      padding: const EdgeInsets.all(16),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          _buildSectionTitle('Label States'),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: [
              VooNavigationLabel(label: 'Unselected'),
              VooNavigationLabel(label: 'Selected', isSelected: true),
              VooNavigationLabel(
                label: 'Disabled',
                color: Colors.grey,
                style: TextStyle(color: Colors.grey),
              ),
            ],
          ),
          const SizedBox(height: 32),
          _buildSectionTitle('Custom Styles'),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: [
              VooNavigationLabel(
                label: 'Bold',
                style: TextStyle(fontWeight: FontWeight.bold),
              ),
              VooNavigationLabel(
                label: 'Colored',
                style: TextStyle(color: Colors.purple.shade700),
              ),
              VooNavigationLabel(
                label: 'Large',
                style: TextStyle(fontSize: 18),
              ),
            ],
          ),
        ],
      ),
    ),
  ),
);