hugeicons_pro 0.0.3
hugeicons_pro: ^0.0.3 copied to clipboard
Hugeicons Flutter is a free icon library featuring over 4,400+ icons in two styles: solid and stroke. It is designed for Flutter projects and provides a wide range of icons for various use cases.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:hugeicons_pro/hugeicons.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Hugeicons Example',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const IconShowcase(),
);
}
}
class IconShowcase extends StatelessWidget {
const IconShowcase({super.key});
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 2,
child: Scaffold(
appBar: AppBar(
title: const Text('Hugeicons Pro'),
bottom: const TabBar(
tabs: [
Tab(text: 'Stroke'),
Tab(text: 'Solid'),
],
),
),
body: const TabBarView(
children: [
_IconGrid(style: _IconStyle.stroke),
_IconGrid(style: _IconStyle.solid),
],
),
),
);
}
}
enum _IconStyle { stroke, solid }
class _IconGrid extends StatelessWidget {
const _IconGrid({required this.style});
final _IconStyle style;
@override
Widget build(BuildContext context) {
final icons = style == _IconStyle.stroke ? _strokeIcons : _solidIcons;
return GridView.builder(
padding: const EdgeInsets.all(16),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4,
mainAxisSpacing: 16,
crossAxisSpacing: 16,
),
itemCount: icons.length,
itemBuilder: (context, index) {
final entry = icons[index];
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(entry.icon, size: 32),
const SizedBox(height: 6),
Text(
entry.label,
style: Theme.of(context).textTheme.labelSmall,
textAlign: TextAlign.center,
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
],
);
},
);
}
}
class _IconEntry {
const _IconEntry(this.label, this.icon);
final String label;
final IconData icon;
}
const _strokeIcons = [
_IconEntry('home01', HugeIconsStroke.home01),
_IconEntry('home02', HugeIconsStroke.home02),
_IconEntry('search01', HugeIconsStroke.search01),
_IconEntry('notification01', HugeIconsStroke.notification01),
_IconEntry('settings01', HugeIconsStroke.settings01),
_IconEntry('calendar01', HugeIconsStroke.calendar01),
_IconEntry('clock01', HugeIconsStroke.clock01),
_IconEntry('mail01', HugeIconsStroke.mail01),
_IconEntry('camera01', HugeIconsStroke.camera01),
_IconEntry('bookmark01', HugeIconsStroke.bookmark01),
_IconEntry('location01', HugeIconsStroke.location01),
_IconEntry('shoppingCart01', HugeIconsStroke.shoppingCart01),
_IconEntry('addCircle', HugeIconsStroke.addCircle),
_IconEntry('heartAdd', HugeIconsStroke.heartAdd),
_IconEntry('starCircle', HugeIconsStroke.starCircle),
_IconEntry('accountSetting01', HugeIconsStroke.accountSetting01),
];
const _solidIcons = [
_IconEntry('home01', HugeIconsSolid.home01),
_IconEntry('home02', HugeIconsSolid.home02),
_IconEntry('search01', HugeIconsSolid.search01),
_IconEntry('notification01', HugeIconsSolid.notification01),
_IconEntry('settings01', HugeIconsSolid.settings01),
_IconEntry('calendar01', HugeIconsSolid.calendar01),
_IconEntry('clock01', HugeIconsSolid.clock01),
_IconEntry('mail01', HugeIconsSolid.mail01),
_IconEntry('camera01', HugeIconsSolid.camera01),
_IconEntry('bookmark01', HugeIconsSolid.bookmark01),
_IconEntry('location01', HugeIconsSolid.location01),
_IconEntry('shoppingCart01', HugeIconsSolid.shoppingCart01),
_IconEntry('addCircle', HugeIconsSolid.addCircle),
_IconEntry('heartAdd', HugeIconsSolid.heartAdd),
_IconEntry('starCircle', HugeIconsSolid.starCircle),
_IconEntry('accountSetting01', HugeIconsSolid.accountSetting01),
];