save_points_screen_builder 1.0.1
save_points_screen_builder: ^1.0.1 copied to clipboard
A modular, configuration-driven screen generator for common Flutter application flows with Material 3 support.
Save Points Screen Builder ๐ #
A modular, configuration-driven screen generator for Flutter 3 applications with modern Material 3 design system. Build beautiful, production-ready screens with minimal code using the builder pattern.
โจ Features #
- ๐จ Modern Material 3 Design System - Professional color scheme, typography, and spacing system
- ๐๏ธ Builder Pattern API - Fluent, chainable APIs for all screen types
- ๐ Form Engine - Dynamic form generation with enhanced UI components
- ๐ฆ List Engine - Declarative list/grid layouts with modern card designs
- ๐ฏ Type Safe - Strong typing and null safety throughout
- ๐ง Highly Extensible - Easy to customize and extend with reusable UI components
- ๐ฑ Responsive - Adaptive layouts for mobile, tablet, and desktop
- โฟ Accessible - WCAG AA compliant with proper contrast ratios
- ๐ Dark Mode - Complete light and dark theme support
- โจ Modern UI Components - 15+ reusable components (cards, buttons, badges, etc.)
๐ฆ Installation #
Add this to your package's pubspec.yaml file:
dependencies:
save_points_screen_builder: ^1.0.1
Then run:
flutter pub get
๐ฏ Supported Screen Types #
Static Screens (5) #
- โ Splash Screen - Modern animated splash
- โ Onboarding - Multi-page with smooth transitions
- โ Welcome Screen - Eye-catching landing page
- โ Success Screen - Confirmation with animations
- โ Error Screen - User-friendly error handling
Form-Based Screens (5) #
- โ Sign In - Gradient backgrounds, social login
- โ Sign Up - Multi-step registration
- โ OTP/Verification - Code input with auto-focus
- โ Forgot Password - Password reset flow
- โ Edit Profile - User profile management
List-Based Screens (5) #
- โ Product Lists - Modern grid with enhanced cards
- โ Shopping Cart - Item management with totals
- โ Settings - Grouped settings with icons
- โ Profile - User stats and information
- โ Notifications - Categorized notification list
๐ Quick Start #
Setup Theme (Required) #
First, apply the modern Material 3 theme:
import 'package:flutter/material.dart';
import 'package:save_points_screen_builder/save_points_screen_builder.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'My App',
debugShowCheckedModeBanner: false,
theme: AppTheme.lightTheme, // ๐จ Modern light theme
darkTheme: AppTheme.darkTheme, // ๐ Modern dark theme
themeMode: ThemeMode.system, // ๐ Auto-switch based on system
home: const HomePage(),
);
}
}
1. Splash Screen #
import 'package:save_points_screen_builder/save_points_screen_builder.dart';
SplashScreenBuilder()
.headline('My App')
.subtitle('Welcome')
.colorScheme(ColorScheme.fromSeed(seedColor: Colors.indigo))
.animation(SplashAnimation.fadeIn)
.duration(const Duration(seconds: 3))
.onFinish(() => Navigator.pushReplacementNamed(context, '/home'))
.build();
2. Sign In Screen (Modern UI) #
SignInScreenBuilder()
.title('Welcome Back')
.subtitle('Sign in to continue')
.submitButton(
label: 'Sign In',
onSubmit: (formData) async {
await authService.signIn(
email: formData['email'],
password: formData['password'],
);
},
)
.onForgotPassword(() => Navigator.pushNamed(context, '/forgot-password'))
.onSignUp(() => Navigator.pushNamed(context, '/sign-up'))
.socialLogin([
SocialLoginButton.google(() => handleGoogleSignIn()),
SocialLoginButton.apple(() => handleAppleSignIn()),
])
.build();
Features:
- โจ Gradient background (Primary โ Tertiary)
- ๐ฑ Responsive layout (max-width: 480dp on large screens)
- ๐จ Elevated form card with modern shadows
- ๐ Enhanced password field with show/hide toggle
- ๐ Social login buttons with modern styling
3. Product List Screen (Enhanced Cards) #
ProductListScreenBuilder()
.title('Products')
.layout(ListLayout.grid(columns: 2, aspectRatio: 0.7))
.dataLoader(() async => await api.getProducts())
.itemBuilder(ProductCardBuilder()) // Uses built-in modern card design
.onItemTap((product) => Navigator.push(
context,
MaterialPageRoute(
builder: (_) => ProductDetailScreen(product),
),
))
.enableRefresh()
.build();
The ProductCardBuilder() provides:
- ๐จ Gradient placeholders for missing images
- ๐ท๏ธ Category badges directly on cards
- โญ Star ratings with review counts
- โค๏ธ Gradient favorite button container (optional)
- ๐ Gradient add-to-cart button (optional)
- ๐ฆ Modern shadows and border styling
Custom Product Cards:
// If you need custom styling
ListScreenBuilder<Product>()
.itemBuilder(
CustomItemBuilder<Product>(
(context, product, index) => Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.network(product.imageUrl),
Padding(
padding: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(product.name, style: TextStyle(fontWeight: FontWeight.bold)),
Text('\$${product.price.toStringAsFixed(2)}'),
],
),
),
],
),
),
),
)
.build();
4. Using Modern UI Components #
import 'package:save_points_screen_builder/save_points_screen_builder.dart';
// Modern Card
ModernCard(
child: YourContent(),
onTap: () => print('Tapped!'),
)
// Gradient Button
GradientButton(
label: 'Get Started',
icon: Icons.rocket_launch,
onPressed: () {},
)
// Empty State
EmptyState(
icon: Icons.inbox_outlined,
title: 'No items found',
subtitle: 'Start by adding your first item',
action: FilledButton(
onPressed: () {},
child: Text('Add Item'),
),
)
// Modern List Tile
ModernListTile(
leadingIcon: Icons.settings,
title: 'Settings',
subtitle: 'App preferences',
onTap: () {},
)
๐ Documentation #
๐ Complete Documentation #
- Design System Guide - Complete design system documentation (500+ lines)
- Quick Start Guide - Get started in 5 minutes
- Redesign Summary - Overview of all UI improvements
Architecture Overview #
The package follows clean architecture principles with clear separation of concerns:
save_points_screen_builder/
โโโ lib/
โ โโโ src/
โ โ โโโ core/ # Base classes & configuration
โ โ โโโ design_system/ # ๐จ Modern theme & UI components
โ โ โโโ form_engine/ # Form field configs & validators
โ โ โโโ list_engine/ # List layouts & item builders
โ โ โโโ screens/
โ โ โ โโโ static/ # Static screen builders
โ โ โ โโโ forms/ # Form-based screen builders
โ โ โ โโโ lists/ # List-based screen builders
โ โ โโโ utils/ # Theme extensions & animations
โ โโโ save_points_screen_builder.dart # Main export file
Core Concepts #
1. ScreenBuilderConfig
Global configuration for customizing screens:
final config = ScreenBuilderConfig(
seedColor: Colors.blue,
fontFamily: 'Roboto',
spacing: 8.0,
borderRadius: 12.0,
useSafeArea: true,
pagePadding: EdgeInsets.all(16.0),
);
SignInScreenBuilder()
.configuration(config)
.build();
2. Form Engine
Dynamic form generation from field configurations:
FormFieldConfig.email(
id: 'email',
label: 'Email Address',
hint: 'Enter your email',
required: true,
validator: Validators.combine([
Validators.required(),
Validators.email(),
]),
)
Available Field Types:
- text, email, password, phone, number
- multiline, search, url, otp
- dropdown, checkbox, switchToggle, slider
- date, time, datetime
Built-in Validators:
required()- Field cannot be emptyemail()- Valid email formatphone()- Valid phone formaturl()- Valid URL formatminLength(int)- Minimum character lengthmaxLength(int)- Maximum character lengthpassword()- Password strength validationnumeric()- Numeric value onlypattern(RegExp)- Custom regex patternmatch(getValue, fieldName)- Match another fieldotp(length)- OTP code validationcombine(validators)- Combine multiple validators
3. List Engine
Declarative list building with multiple layouts:
ListLayout.grid(
columns: 2,
aspectRatio: 0.75,
crossAxisSpacing: 16,
mainAxisSpacing: 16,
)
ListLayout.list(spacing: 8)
ListLayout.adaptive() // Responsive columns based on screen size
Item Builders:
All item builders accept a single WidgetBuilder function that returns the complete widget:
// Card-based list items
CardItemBuilder<Product>(
(context, product, index) => Card(
child: Column(
children: [
Image.network(product.imageUrl),
Text(product.name),
Text(product.description),
Text(product.priceFormatted),
],
),
),
)
// List tile items
ListTileItemBuilder<Item>(
(context, item, index) => ListTile(
leading: Icon(item.icon),
title: Text(item.title),
trailing: Icon(Icons.chevron_right),
onTap: () => handleTap(item),
),
)
// Grid tile items
GridTileItemBuilder<Product>(
(context, product, index) => GridTile(
child: Column(
children: [
Image.network(product.imageUrl),
Text(product.name),
],
),
),
)
// Custom items - Full flexibility
CustomItemBuilder<T>(
(context, item, index) => YourCustomWidget(
item: item,
index: index,
),
)
๐จ Design System #
Modern Material 3 Theme #
The package includes a complete, production-ready Material 3 design system:
Color System:
- Professional color palette (Primary, Secondary, Tertiary)
- Semantic colors (Error, Success, Warning, Info)
- Complete light and dark themes
- WCAG AA compliant contrast ratios
Typography:
- 13 text styles from Display (57sp) to Label (11sp)
- Optimized line heights and letter spacing
- Clear visual hierarchy
Spacing System:
- 4dp base spacing (4, 8, 12, 16, 20, 24, 32, 40, 48, 64dp)
- Predefined padding constants
- Consistent spacing throughout
Components:
- Border radius system (8dp, 12dp, 16dp, 24dp)
- Shadow system (Small, Medium, Large)
- Modern UI components library
Available UI Components #
// Cards
ModernCard() // Elevated card with shadow
GlassCard() // Glass morphism effect
// Buttons
GradientButton() // Gradient with loading state
IconButtonWithBackground()
// Text Fields
ModernTextField() // Enhanced input field
ModernSearchField() // Search with clear button
// Chips & Badges
ModernFilterChip() // Filter with selection
ModernBadge() // Badge for labels
// States
EmptyState() // Beautiful empty state
ModernLoadingIndicator()
// Lists
ModernListTile() // Enhanced list tile
SectionDivider() // Section divider
// Avatars
ModernAvatar() // Avatar with gradient
// Snackbars
ModernSnackBar.showSuccess()
ModernSnackBar.showError()
ModernSnackBar.showInfo()
Theme Customization #
You can still customize the theme if needed:
ScreenBuilderConfig(
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.indigo,
brightness: Brightness.dark,
),
textTheme: GoogleFonts.poppinsTextTheme(),
appBarConfig: AppBarConfig(
centerTitle: true,
elevation: 0,
),
)
Custom Field Types #
FormFieldConfig(
id: 'custom',
type: FormFieldType.custom,
customBuilder: (context, config, controller) {
return YourCustomFieldWidget(
controller: controller,
config: config,
);
},
)
Custom Item Builders #
Create custom item builders by extending ItemBuilderBase:
class MyCustomItemBuilder<T> extends ItemBuilderBase<T> {
@override
Widget build(BuildContext context, T item, int index) {
return MyCustomWidget(
item: item,
index: index,
onTap: () => handleTap(item),
);
}
}
// Usage
ListScreenBuilder<MyItem>()
.itemBuilder(MyCustomItemBuilder())
.build();
Or use the simpler CustomItemBuilder:
ListScreenBuilder<MyItem>()
.itemBuilder(
CustomItemBuilder<MyItem>(
(context, item, index) => Container(
padding: EdgeInsets.all(16),
child: Row(
children: [
CircleAvatar(child: Text(item.initial)),
SizedBox(width: 16),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(item.title, style: TextStyle(fontWeight: FontWeight.bold)),
Text(item.subtitle),
],
),
),
Icon(Icons.chevron_right),
],
),
),
),
)
.build();
๐ฑ Examples #
Check out the /example folder for a complete demo app showcasing all 15 screen types with modern UI.
Example App Features:
- ๐จ Modern home screen with categorized navigation
- ๐ฑ 15 fully functional screen examples
- ๐ Light and dark theme support
- ๐ All screens demonstrate best practices
Run the example:
cd example
flutter run
The example app now features:
- Modern card-based navigation with gradient icons
- Categorized sections (Static, Form, List screens)
- Count badges showing number of screens per category
- Large scrollable app bar with smooth animations
- Professional typography and spacing throughout
๐ฏ What's New in v1.0.1 #
๐จ Complete UI/UX Redesign #
- โจ Modern Material 3 design system (865 lines of theme code)
- ๐งฉ 15+ reusable UI components (796 lines)
- ๐ฑ Enhanced form screens with gradient backgrounds
- ๐๏ธ Redesigned list screens with modern cards
- ๐ Modern home screen with categorized navigation
- ๐ Optimized dark mode support
- โฟ WCAG AA accessibility compliance
๐ Documentation #
- Complete design system guide (500+ lines)
- Quick start guide for developers
- Comprehensive UI redesign summary
- Best practices and usage examples
๐ง Code Quality #
- โ Zero compiler warnings or errors
- ๐ฏ Type-safe implementation
- ๐ฆ Clean architecture with separation of concerns
- ๐งช Production-ready code
๐ค Contributing #
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
๐ License #
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments #
Built with โค๏ธ using Flutter 3 and Material 3 design principles.
Special thanks to the Flutter community for inspiration and support.
๐ Support #
- ๐ Issues: GitHub Issues
- ๐ Documentation: See
UI_DESIGN_SYSTEM.mdfor complete design guide - ๐ฌ Discussions: GitHub Discussions
Version: 1.0.1
Status: โ
Production Ready
Last Updated: February 2026
Made with Flutter ๐ and Material 3 ๐จ