🚀
A new update of the HugeIcons Flutter package will be available soon with additional features and improvements.
Pro Package Installation
To install the HugeIcons Pro package, you will find the installation instructions at your HugeIcons account (opens in a new tab).
Installation
You can install the HugeIcons package by adding it to your pubspec.yaml
file:
dependencies:
hugeicons: ^0.0.1
After adding the package to your pubspec.yaml
file, run the following command to install the package:
flutter pub get
or
dart pub get
Basic Usage
Import the package into your Flutter project:
import 'package:hugeicons/hugeicons.dart';
Here's an example of how to use HugeIcons in a Flutter application:
import 'package:flutter/material.dart';
import 'package:hugeicons/hugeicons.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Welcome to HugeIcons'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
HugeIcon(
icon: HugeIcons.bulk_rounded_abacus,
color: Colors.red,
size: 100.0,
),
HugeIcon(
icon: HugeIcons.duotone_rounded_home_02,
color: Colors.blue,
size: 100.0,
),
HugeIcon(
icon: HugeIcons.stroke_sharp_home_01,
color: Colors.green,
size: 100.0,
),
],
),
),
),
);
}
}
In the example above, the HugeIcon
widget is included in a Flutter application with custom size and color.
Customizing Icons
You can customize icons further by using the color
, size
, variant
, and type
properties:
HugeIcon(
icon: HugeIcons.bulk_rounded_abacus,
color: Colors.red,
size: 100.0,
),