custom_scaffold_plus 1.0.4

SDKflutter
Platformandroidioswindowslinuxmacosweb

A powerful, flexible, and production-ready alternative to Flutter's native Scaffold with features like scrollable content, background images, and more.

🧱 custom_scaffold_plus

A powerful, flexible, and production-ready alternative to Flutter's native Scaffold.
custom_scaffold_plus provides features like scrollable content with pull-to-refresh, light/dark mode background images, keyboard unfocus gesture, drawer support, bottom navigation, floating action buttons, and more — all in one place.


✨ Features

  • 🎨 Light & Dark mode background image support with smooth transitions
  • 🔄 Optional scrollable body with pull-to-refresh
  • 🎯 Keyboard dismiss on outside tap
  • 🧭 Padding, AppBar, FAB, Drawer, BottomNav
  • 📱 Responsive layout with mobile, tablet, and desktop support
  • 🔧 Custom FAB positioning & inset behavior
  • 📦 Easy to drop in your existing projects
  • 🌈 Custom background gradients
  • 🖼️ Overlay image support
  • 📐 Flexible height control
  • ⚡ Customizable animations

✨ Examples

Basic Usage

import 'package:custom_scaffold_plus/custom_scaffold_plus.dart';

// Basic usage
CustomScaffoldPlus(
  body: Center(
    child: Text('Hello World!'),
  ),
)

With Background Image

CustomScaffoldPlus(
  isDark: true, // Use dark mode background
  darkBackgroundAsset: 'assets/bg_dark.jpg',
  lightBackgroundAsset: 'assets/bg_light.jpg',
  body: Center(
    child: Text('Hello with background!'),
  ),
)

With Scrolling and Refresh

CustomScaffoldPlus(
  scrolling: true,
  onRefresh: () async {
    // Handle refresh
    await fetchNewData();
  },
  body: Column(
    children: [
      // Your scrollable content
    ],
  ),
)

With Gradient Background

CustomScaffoldPlus(
  backgroundGradient: LinearGradient(
    colors: [Colors.blue, Colors.purple],
    begin: Alignment.topLeft,
    end: Alignment.bottomRight,
  ),
  body: Center(
    child: Text('Gradient Background'),
  ),
)

With Responsive Layout

ResponsiveLayout(
  mobile: CustomScaffoldPlus(
    // Mobile layout configuration
    body: MobileContent(),
  ),
  tablet: CustomScaffoldPlus(
    // Tablet layout configuration
    body: TabletContent(),
  ),
  desktop: CustomScaffoldPlus(
    // Desktop layout configuration
    body: DesktopContent(),
  ),
)

🚀 Getting Started

Add the dependency to your pubspec.yaml:

dependencies:
  custom_scaffold_plus: ^1.0.1

📋 Available Properties

PropertyTypeDescription
bodyWidget?The main content of the scaffold
scrollingboolWhether to wrap content in a scroll view
paddingEdgeInsetsGeometryPadding around the body
appBarPreferredSizeWidget?App bar widget
onRefreshFunction()?Callback for pull-to-refresh gesture
backgroundColorColorBackground color (used if no image is provided)
darkBackgroundAssetString?Background image for dark mode
lightBackgroundAssetString?Background image for light mode
isDarkboolWhether the app is in dark mode
floatingActionButtonWidget?Floating action button
floatingActionButtonLocationFloatingActionButtonLocation?Location of the floating button
resizeToAvoidBottomInsetbool?Whether to resize when keyboard is open
extendBodyboolWhether to extend the body behind bottom widgets
drawerWidget?Optional drawer widget
bottomNavigationBarWidget?Optional bottom navigation widget
backgroundGradientGradient?Optional gradient for the background
heightFactordouble?Optional height factor to control the body height (0.0 to 1.0)
overlayAssetString?Optional overlay image asset path
showOverlayboolWhether to show the overlay image
bodyAlignmentAlignmentAlignment of the body content
animationDurationDurationDuration for theme change animations
animationCurveCurveCurve for theme change animations