iconifyme 1.0.0
iconifyme: ^1.0.0 copied to clipboard
A custom Flutter icon package wrapping SVG assets with named constructors.
example/iconifyme_example.dart
import 'package:flutter/material.dart';
import 'package:iconifyme/iconifyme.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'IconifyMe Example',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const IconGalleryScreen(),
);
}
}
class IconGalleryScreen extends StatelessWidget {
const IconGalleryScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('IconifyMe Gallery'),
elevation: 2,
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'Easily use custom SVG icons as widgets:',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
const SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
// Render home icon with default size/color
const Column(
children: [
Iconify.home(),
SizedBox(height: 8),
Text('Default (Home)'),
],
),
// Render custom sized home icon
const Column(
children: [
Iconify.home(size: 48),
SizedBox(height: 8),
Text('Size: 48'),
],
),
// Render custom colored home icon
Column(
children: [
Iconify.home(size: 48, color: Colors.blue.shade700),
const SizedBox(height: 8),
const Text('Blue (Size: 48)'),
],
),
],
),
const SizedBox(height: 40),
const Text(
'Other Icons:',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
),
const SizedBox(height: 10),
const Wrap(
spacing: 20,
runSpacing: 20,
children: [
Iconify.bell(size: 32, color: Colors.amber),
Iconify.alarm(size: 32, color: Colors.red),
Iconify.icon_4k(size: 32, color: Colors.green),
Iconify.cat(size: 32, color: Colors.brown),
],
),
],
),
),
);
}
}