flutter_addons library
Flutter Addons Library v3.0.0 Developed by AR Rahman
Copyright (c) 2025 - Licensed under Apache License 2.0 Initial Release: March 20, 2025 | Last Update: October 8, 2025
A curated suite of professional Flutter extensions and UI components engineered to enhance productivity and ensure code consistency across responsive, theme-compliant application development.
Classes
- AddLifecycleManager
-
AppData<
T> - AppError
-
AppFailure<
T> -
AppLoading<
T> -
AppState<
T> - AuthorSpeech
- Hey there, developer! 👋 If you're reading this, it means you're exploring the source code. That's awesome! Keep up the good work! 🚀 This list contains motivational messages for developers. Whenever you feel stuck or need a boost, just pick a random message from this list and let it brighten your day. I hope you find these messages helpful and inspiring. Remember, coding is not just about solving problems, it's also about enjoying the journey and having fun along the way.
- BootstrapDarkColors
- ============================== 🌙 Bootstrap Dark Theme
- BootstrapLightColors
- ============================== ☀️ Bootstrap Light Theme
- BoxDecorations
- Extension for Fluent Input Decoration
- BrandKolors
- A minimal yet comprehensive 12-color system for easy branding Covers all essential needs for any app without complexity
- BrandTypo
- Abstract class defining typography styles (Users only extend this) Abstract class defining typography styles for Soul
- BreadConstant
- BreadConstantData
- Breadcrumb
- reusable breadcrumb widget.
- BreadcrumbItem
- Represents each breadcrumb item.
- Breakpoints
- ButtonStyles
- ColorMap
- Represents a color palette generated from quantization.
- ColorVolumeBox
- Represents a color volume box for quantization.
- ConsoleLogger
- Using Console Logger for colorful and structured logging in the console. Supports different log levels, section headers, key-value pairs, and more. Inspired by various logging libraries but implemented from scratch for simplicity.
- CoreScale
- Singleton class that initializes and coordinates all scaling modes.
- CurtainPainter
- CustomScrollBehavior
- Custom Scroll Behavior
- DarkSoulColors
- ============================== 🌙 Soul Dark Theme
- DataImageProvider
- Debug
- Global Debug utility
- DesertCactusPainter
- DesignFrame
- DisplayFlex
- DisplayFlexMedia
- Core responsive flex system for calculating media data.
- EightBitSkullPainter
-
Err<
T, E> - ExceptionHandler
- Fake
- FakeConversation
- FakeData
- FakePerson
- FakeProduct
- FakeUsers
- FallBackTypography
- DefaultTypography provides a fallback set of typography styles. Default implementation of SoulTypography
- FlexSpacing
- FutureUtils
- Future Helpers
- GoogleMaterialDarkColors
- ============================== 🌙 Google Material Dark Theme
- GoogleMaterialLightColors
- ============================== ☀️ Google Material Light Theme
- HackerCatPainter
- InputDecorations
- InputForm
- IOSBrandDarkColors
- ============================== 🌙 iOS Dark Theme
- IOSBrandLightColors
- Core 12-color palette abstraction.
- KeyboardVisibilityBuilder
- A widget that rebuilds when the keyboard visibility changes.
- KeyboardVisibilityController
- A lightweight widget and controller to detect keyboard visibility using MediaQuery. No platform channel or external dependency required. Controller for tracking keyboard visibility using ChangeNotifier.
- Kolors
- Label
- LanguageData
- A registry of supported languages
- LanguageUtils
- A high-level localization utility class
- LightSoulColors
- ============================== ☀️ Soul Light Theme
- MediaInfo
- and allows building adaptive layouts with a single builder function.
- MiniProgressBar
- Helper class to provide easy and structured navigation methods
- navigation operations with optional animations.
- NeutralDarkColors
- ============================== 🌙 Neutral Gray Dark Theme
- NeutralLightColors
- ============================== ☀️ Neutral Gray Light Theme
- NotificationService
-
Ok<
T, E> - OtpDecoration
- PageAnimation
- Palette
- Abstract class for All kolors
- Patterns
- Predefined Patterns for different validation
- PixelPerfectGridOverlay
- A professional overlay that draws a pixel-perfect grid on top of a child widget. Useful for designers and developers to align UI elements.
-
PriorityQueue<
T> - A generic priority queue implementation.
- ResponsiveBuilder
- ResponsivePage
- ResponsiveScope
- ResponsiveScope widget
- ResponsiveSliver
- ResponsiveTransitionBuilder
-
Result<
T, E> - Represents either a success (Ok) or a failure (Err)
- Section
- SectionItem
- A layout-aware widget representing a section item in a responsive grid.
- Seed
-
Generate Color Schema Based of Seed Color - SoulTheme
- A helper class to manage component themes.
- SoulThemeEngine
- Soul is a theme engine I designed to streamline and enhance theming in apps, making it easier to implement structured color palettes, typography, and component styles while supporting dynamic theming and custom extensions.
- Swatch
-
Generate Color Schema Based of Material Swatch Color - SystemUI
- System UI Utilities
- TailwindDarkColors
- ============================== 🌙 Tailwind Dark Theme
- TailwindLightColors
- ============================== ☀️ Tailwind Light Theme
- TextSize
- TextWeight
- ThemeHelper
- Centralized theme, text, color, and media query access. Initialize once at app root with ThemeHelper.init(context).
- ThemeMaker
- Manages the application's theme settings, including colors and typography. Implements the SoulThemeEngine interface for centralized theme handling.
- ThemeManager
- Base class for managing theme logic, exposing core functionality. This class is designed to be extended by the user. It provides methods to set and toggle themes, as well as to refresh the theme based on system settings. It also includes an abstract method for updating the theme, which must be implemented by the user.
- TimeFormatter
- TwitterDarkColors
- ============================== 🌙 Twitter Dark Theme
- TwitterLightColors
- This is Default Color Palette Light Theme Color Palette
- Ui
- Global design system access point.
- UiAccordion
- UiAlertDialog
- UiAvatar
- UiAvatarCircle
- A circular avatar widget with optional border, tap handling, and status badge.
- UiBlur
- A reusable frosted-glass blur wrapper that blurs the background behind child.
- UiBorderBox
- UiButton
- UiCheckbox
- UiContainer
- UIContext
- UiDivider
- UiDrawer
- Professional reusable Drawer widget
-
UiDropdown<
T> - UiErrorPage
- UiFeedback
- UiFlatButton
- A reusable flat button widget with various styles and configurations. This widget supports filled, outlined, and text styles, with options for loading state, icon, and custom colors.
- UiIconButton
- UiInlinePopup
- UiInlinePopupItem
- Model for each menu item
- UiLabel
- Simple UiLabel widget that uses MyTextStyle
- UiLabelTextStyle
- UiLanguageSelectionSheet
- A reusable language selection sheet. Shows a list of supported locales and allows selecting one.
- UiListTile
- A professional and customizable list tile for menus, settings, and drawers.
- UiListView
- Flexible ListView with Wrap inside a scroll view. Supports horizontal or vertical layout.
- UiOtpField
- UiPageIndicator
- UiProductCard
-
UiRadioButton<
T> - UiShapes
- UiTextField
- A modern, customizable text field component with extensive styling options and built-in functionality like password visibility toggle.
- UiTextFieldBorder
- Configuration class for customizing text field borders
- UiTheme
- A unified registry of all available UI brand themes. Easily switch between different design systems and their light/dark variants.
- UiThemeSwitch
- Validator
-
A utility class that provides common form field validators.
All validators return
nullif the input is valid, otherwise return a string error message. - YaruCircularProgressIndicatorTheme
- YaruCircularProgressIndicatorThemeData
- YaruLoader
- YaruProgressIndicator
-
YaruProgressIndicatorThemeData<
T extends YaruProgressIndicatorThemeData< T> > - Zero
Enums
- AlertAnimation
- Available alert animations
- AnimationType
- Enum for available animations
- AppOrientationLock
- Enum representing different orientation lock modes
- BorderShape
- BorderStyleType
- BreakpointMapper
- Enum that maps to the Breakpoints class for consistent screen sizing.
- CarrotDirection
- ErrorScreen
- error page design
- FlexDisplayType
- Defines whether a flex item is visible or hidden in a responsive context.
- IndicatorShape
- LogLevel
- Log levels
- NotificationType
- OSType
- Enum for OS type.
- OtpValidationState
- ResponsiveTransition
- RouteAnimations
- ScaleMode
- ScreenType
- Enum for screen type.
- TimeOfDayGreeting
- ToastAnimation
- Still Developing Available toast animations
- ToastPosition
- UiLabelTextType
Extensions
- AbsoluteValue on num
-
AddIfAbsent
on Map<
K, V> - AddonsLifecycle on BuildContext
-
AngleBetweenVectors
on List<
num> - AnimatedOpacityWidget on Widget
- AppOrientationLockExtension on AppOrientationLock
-
AsyncUtilities
on Future<
T> - Async Utilities Functions
-
AverageList
on List<
num> - BlurEffectWidget on Widget
- Extension to easily apply a blur/glass effect around any widget.
- BoolExtensions on bool
-
Extension for boolean (
bool) values to provide utility methods for common operations like toggling, conditionally executing actions, and converting to different string representations. - BorderRadiusWidget on Widget
- BoxDecorationDSL on BoxDecoration
- BoxDecoration extensions for DSL-style configuration
- BrandAdaptiveColors on BuildContext
- Adaptive Color Helpers
- BrandColorsExtension on BuildContext
- Clean Brand Color System
- BrandStylingExtension on BuildContext
- Brand Layout & Styling Tokens
- BrandThemeExtension on BuildContext
-
Extension on BuildContext to provide convenient access
to theme-related properties such as current theme mode.
Professional Brand Design SystemComprehensive theme extensions with actual brand color semantics Core theme access - CenterWidget on Widget
-
ChunkList
on List<
T> - CircularWidget on Widget
- ClampValue on num
- ColorExtensions on Color
-
Extension on
Colorto provide additional utility methods for color manipulation and analysis. - ColorTextStyleExtension on Color
- Extension on Color to create text styles with specific colors.
- ColumnWidget on Widget
- ContainerDSL on Container
-
ContainsAny
on List<
T> - ContextTextStyles on BuildContext
-
Extension on
BuildContextfor easy access toTextTheme. - CountChar on String
- CurrencyExtension on num
- DateExtension on DateTime
-
Extension for
DateTimeproviding utility methods for common date-time operations. - DecorationWidget on Widget
- DegreesToRadians on num
-
DistinctBy
on Iterable<
T> - DurationUtils on Duration
- EmojiExtension on String
-
EuclideanDistance
on Point<
num> - Exponential on num
- ExtendJson on Map
- Factorial on int
-
FindIndex
on List<
T> -
FindOrDefault
on List<
T> - Focus on BuildContext
- IntExtensions on int?
- IntToDuration on int
-
IsSorted
on List<
T> -
JoinList
on List<
T> -
LastElement
on List<
T> -
ListExtension
on List<
T> -
Extension on List to add
mapIndexedutility. - ListGenerator on int
- ListViewGeneratorForList on List
- LogExtension on Object
-
MapStringToInt
on Map<
String, String> -
MapToList
on Map<
T, V> - MarginWidget on Widget
-
MaxMinIndex
on List<
T> -
Mean
on List<
num> -
Median
on List<
num> -
MergeList
on List<
T> -
MultiFilterList
on List<
T> - Navigator helper extensions for adding animations and context-based navigation
- NetworkExtensions on String
- Network Utilities Extensions for Dart & Flutter
- NetworkStatus on InternetAddress
- NotificationExtension on BuildContext
- OnTapGesture on Widget
- PaddingWidget on Widget
- Power on num
- RadiansToDegrees on num
- RandomRange on int
- RangeList on int
-
RemoveDuplicates
on List<
T> -
RemoveFirstOccurrence
on List<
T> -
RemoveNulls
on List<
T?> -
RepeatList
on List<
T> - ResponsiveColumn on Column
-
Extension for
Columnwidget to provide responsive padding and spacing - ResponsiveExtension on BuildContext
- ResponsiveRow on Row
-
Extension for
Rowwidget to provide responsive padding and spacing - ResponsiveSpacing on num
- Extension for converting units and handling responsive sizing based on device dimensions.
-
ResultFutureExtension
on Future<
Result< T, AppError> > -
ResultUtils
on Future<
T> -
ReverseList
on List<
T> - RoundedWidget on Widget
- RoundToDecimal on num
- SafeAreaInsets on BuildContext
- ScrollableWidget on Widget
- ScrollControllerExtensions on ScrollController
- Extension for ScrollController providing additional scroll functionality.
-
SeparatedIterable
on Iterable<
Widget> - ShadowWidget on Widget
- ShapeWidget on Widget
-
ShuffleList
on List<
T> - SignOfNumber on num
- SizedBoxWidget on Widget
- SmartScalerExtension on num
-
SortBy
on List<
T> - SplitFixedLength on String
- SquareRoot on num
-
StackAvatars
on List<
Widget> -
StreamExtensions
on Stream<
T> - Batch Processing & Mapping for Streams
- StringExt on String
- String Extensions
- StringExtension on String
- String Extension to add useful utility methods
-
StringListToMap
on List<
String> - TextStyleBuilder on num
- A comprehensive text style extension for Flutter that provides a fluent interface for building and customizing text styles.
- TextStyleEnhancements on TextStyle
- Extension on TextStyle for additional modifications and utilities.
-
ToListOfMaps
on Iterable<
T> - TooltipWidget on Widget
- UnifiedMarginPadding on num
- Provides convenient spacing extensions on num for unified margin, padding, and sized box creation using a fixed unit.
- VisibilityWidget on Widget
- Extension on Widget to simplify launching from context with animation.
- WidgetStackExtensions on Widget
- WidgetToBox on Widget
Constants
-
rtlLanguages
→ const List<
String> - List of Right-to-Left (RTL) languages
Properties
- alphaRegExp → RegExp
-
Regular Expression for Alphabet characters
final
- errorIcon → String
-
final
- flexColumns → int
-
no setter
- flexSpacing → double
-
Global getters for your flex grid system.
no setter
- flutterAddons → String
-
final
-
flutterWidgets
→ HashSet<
String> -
final
-
tailwindSafeColors
↔ Map<
String, dynamic> -
getter/setter pair
- testBackground → String
-
final
Functions
-
colorTW(
List< String> params) → Color? -
customAppBar(
BuildContext context, {required Widget child, bool applySafeAreaPadding = true, double height = 60.0, Color? statusBarColor, Brightness? statusBarIconBrightness, bool? blur = false}) → PreferredSize - A customizable AppBar widget with support for safe area padding, transparency, status bar styling, and height configuration.
-
debug(
String? message, {String? tag}) → void -
extend(
Map target, Map source, [Iterable< Map> ? sources]) → Map -
extendAll(
Map target, Iterable< Map> sources) → Map -
fontSizeTW(
List< String> params) → double? -
fontWeightTW(
List< String> params) → FontWeight? -
getPaletteFromBytes(
Uint8List imageData, int width, int height, [int? colorCount, int? quality]) → Future< List< List< ?>int> > - Extracts a color palette from raw image bytes.
-
getPaletteFromImage(
Uint8List imageData, int colorCount, int quality) → Future< List< Color> > -
Extracts a color palette from an
Imageobject. -
isRtlLanguage(
String languageCode) → bool - Utility function to check if a language is RTL
-
quantize(
List< List< pixels, int maxColors) → ColorMap?int> > - Quantizes an image's colors using the Median Cut Algorithm.
-
textAlignTW(
List< String> params) → TextAlign? -
textOverflowTW(
List< String> params) → TextOverflow? -
textStyle(
List< String> props) → TextStyle
Typedefs
- KeyboardVisibilityWidgetBuilder = Widget Function(BuildContext context, bool isKeyboardVisible)
-
Signature for the builder function which returns
isKeyboardVisible. - ResendButtonBuilder = Widget Function(BuildContext context, VoidCallback onResend, int remainingSeconds, bool isEnabled)
- A professional and customizable OTP input field component.
- ResponsiveBuilderType = Widget Function(BuildContext context, Orientation orientation, ScreenType screenType)
- unified widget function
Exceptions / Errors
- HttpException
- Exception for network-related issues such as no internet connection, server unavailability, or connection timeout.