kawsay_icons 0.6.1 kawsay_icons: ^0.6.1 copied to clipboard
Custom icons to complement popular icon sets
import 'package:flutter/material.dart';
import 'package:kawsay_icons/kawsay_icons.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Kawsay Icons Example',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const IconGrid(),
);
}
}
class IconGrid extends StatelessWidget {
const IconGrid({super.key});
@override
Widget build(BuildContext context) {
final Map<IconData, String> iconMap = {
KawsayIcons.chatQuestion: 'Chat Question',
KawsayIcons.clinicalNotes: 'Clinical Notes',
KawsayIcons.dashboard: 'Dashboard',
KawsayIcons.doctor: 'Doctor',
KawsayIcons.home: 'Home',
KawsayIcons.likeDislike: 'Like/Dislike',
KawsayIcons.microscope: 'Microscope',
KawsayIcons.nurse: 'Nurse',
KawsayIcons.peopleQueue: 'People Queue',
KawsayIcons.pharmacy: 'Pharmacy',
KawsayIcons.reportFinance: 'Report Finance',
KawsayIcons.survey: 'Survey',
KawsayIcons.ticket: 'Ticket',
KawsayIcons.user: 'User',
};
return Scaffold(
appBar: AppBar(
title: const Text('Kawsay Icons'),
),
body: GridView.builder(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4,
childAspectRatio: 1.0,
),
itemCount: iconMap.length,
itemBuilder: (context, index) {
final iconData = iconMap.keys.elementAt(index);
final iconName = iconMap[iconData];
return Card(
margin: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
iconData,
size: 64.0,
color: Colors.blue,
),
const SizedBox(height: 8.0),
Text(
iconName ?? 'Icon',
style: const TextStyle(fontSize: 12.0),
textAlign: TextAlign.center,
),
],
),
);
},
),
);
}
}