A flexible CLI tool for Flutter component generation
Flint helps Flutter developers accelerate their development by generating reusable UI components from templates. Quickly add buttons, cards, and other UI elements to your project without starting from scratch.
- Component Generation โ Easily add pre-designed UI components to your Flutter projects
- Multiple Component Types โ Currently supports:
- Buttons (
--button) - Cards (
--card)
- Buttons (
- Customizable Templates โ All generated components maintain a consistent structure with separate template and styles files
- Automatic File Naming โ Components are automatically named based on your input
We have big plans for Flint! Here's what we're working on:
- More UI Components โ Adding form components, modals, navigation drawers, and app bars
- Theming Utilities โ Tools to quickly generate and apply custom themes
- Project Starter Templates โ Full application scaffolding with different architecture patterns:
- BLoC / Cubit
- Provider
- Riverpod
- GetX
- Common Service Integrations โ Ready-to-use implementations for:
- Firebase Authentication
- Push Notifications
- Local Storage
- API Clients
- Plugin Ecosystem โ Allow community-contributed templates and components
- Visual Component Builder โ GUI for customizing components before generation
- Analytics and Monitoring โ Templates for implementing analytics and crash reporting
You can install Flint globally using Dart:
# From the flint directory
dart pub global activate --source path .To add a button component:
flint add component --button login_buttonTo add a card component:
flint add component --card user_profileEach command will:
- Create a directory for your component in
lib/components/<component_name>/ - Generate appropriate files based on the component type
- Replace placeholder names with your component name
flint --helpComponents are organized with a consistent structure:
<component_name>_template.dart- The main component implementation<component_name>_styles.dart- Styling constants for the component<component_name>_example.dart- Example usage of the component
New component types can be added by:
- Creating a template directory in
lib/src/templates/components/<type>/ - Adding template files with appropriate naming (
<type>_template.dart, etc.) - Updating the CLI parser in
main.dartto include the new component type flag
- Support for more component types (forms, dialogs, etc.)
- Complete application templates
- Custom theme integration
- State management scaffolding
Flint is open-source and under active development. Contributions, feedback, and feature requests are welcome!
Made with โค๏ธ for Flutter developers.