LuckyUI Flutter
A comprehensive Flutter design system package created by Waveful, providing scalable and consistent UI components for modern Flutter applications.
Overview
LuckyUI is a complete design system that offers a cohesive set of components, themes, and design tokens to help developers build beautiful and consistent Flutter applications. Built with scalability and maintainability in mind, LuckyUI provides everything you need to create professional-grade mobile and web applications.
Features
🎨 Design System Foundation
- Comprehensive Color Palette: Pre-defined color tokens with semantic naming
- Typography System: Consistent text styles and hierarchy
- Spacing & Layout: Standardized spacing tokens and layout utilities
- Theme Support: Light and dark mode support out of the box
🧩 UI Components
Buttons & Interactions
LuckyButton- Primary, secondary, and variant button stylesLuckyTextButton- Text-based button componentsLuckyIconButton- Icon-only buttons with various sizesLuckySwitch- Customizable toggle switchesLuckyAppBar- Consistent app bar implementation
Form & Input Components
LuckyTextField- Text field wrapper with validation supportLuckySearchBar- Search input with built-in functionalityLuckyListItems- Standardized list item components
Navigation & Layout
LuckyNavBar- Bottom navigation bar componentLuckyTabBar- Tab navigation implementationLuckyModal- Modal dialog systemLuckyBottomSheet- Bottom sheet componentsLuckyFilters- Filter and selection components
Indicators & Feedback
LuckyBadge- Notification badges and labelsLuckyProgressBar- Progress indicatorsLuckyRedDot- Notification dotsLuckyIcons- Icon system integrationLuckyToast- Toast notification system
Typography
LuckyHeading- Heading text componentsLuckyBody- Body text componentsLuckySmallBody- Small text components
Utilities
LuckyDivider- Consistent divider components
🎭 Animations
LuckyTapAnimation- Interactive tap animations
Getting Started
Installation
Add LuckyUI to your pubspec.yaml:
dependencies:
luckyui: ^0.0.1
Then run:
flutter pub get
Basic Usage
Import the package in your Dart file:
import 'package:luckyui/luckyui.dart';
Quick Start Example
import 'package:flutter/material.dart';
import 'package:luckyui/luckyui.dart';
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'LuckyUI Demo',
theme: LuckyTheme.light,
home: Scaffold(
appBar: LuckyAppBar(
title: 'My App',
actions: [
LuckyIconButton(
icon: Icons.search,
onPressed: () {},
),
],
),
body: Column(
children: [
LuckyHeading('Welcome to LuckyUI'),
LuckyBody('This is a sample app using LuckyUI components.'),
LuckyButton(
text: 'Get Started',
onPressed: () {},
),
],
),
),
);
}
}
Component Examples
Buttons
// Primary button
LuckyButton(
text: 'Primary Action',
onPressed: () {},
)
// Secondary button
LuckyButton(
text: 'Secondary Action',
variant: ButtonVariant.secondary,
onPressed: () {},
)
// Text button
LuckyTextButton(
text: 'Text Action',
onPressed: () {},
)
Forms
LuckyTextField(
controller: TextEditingController(),
heading: "Username",
description: "Enter your username",
hintText: "@username",
style: LuckyTextFieldStyleEnum.standard,
)
Navigation
LuckyNavBar(
currentIndex: 0,
onTap: (index) {},
items: [
LuckyNavBarItem(icon: Icons.home, label: 'Home'),
LuckyNavBarItem(icon: Icons.search, label: 'Search'),
LuckyNavBarItem(icon: Icons.person, label: 'Profile'),
],
)
Theming
LuckyUI provides a comprehensive theming system:
// Light theme
MaterialApp(
theme: LuckyTheme.light,
home: MyHomePage(),
)
// Dark theme
MaterialApp(
theme: LuckyTheme.dark,
home: MyHomePage(),
)
// Custom theme
MaterialApp(
theme: LuckyTheme.light.copyWith(
// Customize theme properties
),
home: MyHomePage(),
)
Design Tokens
LuckyUI includes a comprehensive set of design tokens:
- Colors: Semantic color system with light/dark variants
- Typography: Consistent text styles and hierarchy
- Spacing: Standardized spacing values
- Border Radius: Consistent corner radius values
- Shadows: Elevation and shadow system
Showcase
The package includes a comprehensive showcase (LuckyShowcasePage) that demonstrates all available components and their variations. This is perfect for:
- Exploring component capabilities
- Understanding component APIs
- Testing different themes and configurations
Requirements
- Flutter >= 1.17.0
- Dart SDK >= 3.9.2
Dependencies
hugeicons: ^1.1.1- For comprehensive icon support
Contributing
We welcome contributions to LuckyUI! Please feel free to submit issues, feature requests, or pull requests.
License
This project is licensed under the terms specified in the LICENSE file.
Support
For support, questions, or feature requests, please visit our GitHub repository or contact the Waveful team.
Made with ❤️ by Waveful
Libraries
- animations/lucky_tap_animation
- components/buttons/lucky_appbar
- components/buttons/lucky_list_items
- components/buttons/lucky_radios
- components/buttons/lucky_switch
- components/fields/lucky_search_bar
- components/fields/lucky_text_field
- components/indicators/lucky_avatar
- components/indicators/lucky_badge
- components/indicators/lucky_icons
- components/indicators/lucky_loading
- components/indicators/lucky_progress_bar
- components/indicators/lucky_pull_to_refresh
- components/indicators/lucky_red_dot
- components/layout/lucky_card
- components/layout/lucky_divider
- components/lucky_toast
- components/navigation/lucky_bottom_sheet
- components/navigation/lucky_filters
- components/navigation/lucky_modal
- components/navigation/lucky_tab_bar
- components/typography/lucky_body
- components/typography/lucky_heading
- components/typography/lucky_markdown
- components/typography/lucky_small_body
- lucky_showcase
- luckyui
- theme/lucky_colors
- theme/lucky_theme
- theme/lucky_tokens