buildNavigationIconPreview function
Widget
buildNavigationIconPreview(
)
Implementation
@Preview(name: 'Navigation Icon')
Widget buildNavigationIconPreview() => MaterialApp(
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.teal),
useMaterial3: true,
),
home: Scaffold(
appBar: AppBar(
title: const Text('Navigation Icon Variations'),
backgroundColor: Colors.teal.shade50,
),
body: Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildSectionTitle('Default Icons'),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
VooNavigationIcon(icon: Icons.home_outlined),
VooNavigationIcon(icon: Icons.home, isSelected: true),
VooNavigationIcon(
icon: Icons.home,
isSelected: true,
selectedColor: Colors.purple,
),
],
),
const SizedBox(height: 32),
_buildSectionTitle('Custom Sizes'),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
VooNavigationIcon(icon: Icons.settings, size: 20),
VooNavigationIcon(icon: Icons.settings, size: 28),
VooNavigationIcon(icon: Icons.settings, size: 36),
],
),
],
),
),
),
);