health_icons 0.0.2
health_icons: ^0.0.2 copied to clipboard
A Flutter package for health icons as Static font.
HealthIcons: Your Go-To Package for Open Source Health-Related Icons #
HealthIcons is a Flutter package that provides easy access to a comprehensive set of open-source health-related icons from healthicons.org. Whether you're building a health application, a medical platform, or any project that needs clear and intuitive health-themed visuals, HealthIcons has you covered.
✨ Features #
- Extensive Icon Set: Access hundreds of carefully designed health icons covering various medical fields, conditions, and concepts.
- Easy Integration: Seamlessly integrate icons into your Flutter application with a simple
Iconwidget. - Customizable: Just like standard Flutter
Iconwidgets, you can easily customize the size, color, and other properties of HealthIcons. - Open Source: Built upon the high-quality, openly licensed icons from healthicons.org, ensuring freedom of use and community support.
🚀 Getting Started #
Installation #
Add health_icons to your pubspec.yaml file:
dependencies:
health_icons: ^latest_version # Replace with the latest version from pub.dev
Then, run flutter pub get in your terminal.
Or directly add latest version using terminal:
flutter pub add health_icons
Migration Guide #
If you're using an older version of HealthIcons and want to upgrade to the latest version, follow these steps:
- Update the
health_iconsdependency in yourpubspec.yamlfile to the latest version. - Run
flutter pub getin your terminal to fetch the updated package. - Review the changelog for the latest version to see if there are any breaking changes or new features you'd like to use.
- Update your code to use the new API if necessary.
- If you're using any of the older icons, you may need to update your code to use the new naming convention. For example,
HealthIcons.heartis nowHealthIcons.heartFilled.
Usage #
Using HealthIcons is straightforward. Simply import the package and use the HealthIcons class to access the available icons:
import 'package:flutter/material.dart';
import 'package:health_icons/health_icons.dart'; // Import the package
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('HealthIcons Demo'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Example 1: Basic Heart Icon
Icon(
HealthIcons.heartFilled, //Pass IconData to Icon widget
size: 60.0,
color: Colors.red,
),
SizedBox(height: 20),
// Example 2: Medical Advice Icon
Icon(
HealthIcons.medicalAdviceFilled,
size: 50.0,
color: Colors.blue,
),
SizedBox(height: 20),
// Example 2: Blood type A+ Icon
Icon(
HealthIcons.bloodAPFilled,
size: 50.0,
color: Colors.blue,
),
SizedBox(height: 20),
// Example 4: Rx (Prescription) Icon
Icon(
HealthIcons.rxFilled,
size: 45.0,
color: Colors.green,
),
SizedBox(height: 20),
// You can find a comprehensive list of all available icons
// by Browse the `lib/health_icons.dart` file in the package,
// or by referring to the healthicons.org website for icon names.
Text('Explore more health icons!'),
],
),
),
),
);
}
}
Finding Icons #
The best way to find the specific icon you need is to visit healthicons.org. Each icon on their website corresponds directly to an icon in this package. For example, if you see an icon named "heart" on their site, you'll likely find it as HealthIcons.heart in this package. Many icons also have _fill and _outline variants. (currently this package only support filled)
🤝 Contributing #
Contributions are welcome! If you find a bug or have a suggestion for an improvement, please open an issue or submit a pull request on the GitHub repository.
When contributing, please ensure your changes align with the project's goals and maintain code quality.
📄 License #
This package is released under the MIT License. The icons themselves are sourced from healthicons.org and are licensed under the CC0 License.
🙏 Acknowledgements #
A huge thank you to the creators and contributors of healthicons.org for providing such a valuable resource of open-source health icons!