save_points_screen_builder 1.0.1 copy "save_points_screen_builder: ^1.0.1" to clipboard
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 empty
  • email() - Valid email format
  • phone() - Valid phone format
  • url() - Valid URL format
  • minLength(int) - Minimum character length
  • maxLength(int) - Maximum character length
  • password() - Password strength validation
  • numeric() - Numeric value only
  • pattern(RegExp) - Custom regex pattern
  • match(getValue, fieldName) - Match another field
  • otp(length) - OTP code validation
  • combine(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 #


Version: 1.0.1
Status: โœ… Production Ready
Last Updated: February 2026

Made with Flutter ๐Ÿ’™ and Material 3 ๐ŸŽจ

1
likes
0
points
255
downloads

Publisher

unverified uploader

Weekly Downloads

A modular, configuration-driven screen generator for common Flutter application flows with Material 3 support.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, flutter

More

Packages that depend on save_points_screen_builder