ui_framework_kit library

ui_framework_kit — a comprehensive Flutter UI component library.

Importing this single file exposes every public widget, theme, color token, extension, and config helper in the package, plus a convenience re-export of `flutter_screenutil` (the responsive sizing engine the kit depends on).

Classes

AccessibilityConfig
Runtime-configurable accessibility defaults for ui_framework_kit.
AppColors
Semantic color tokens used across ui_framework_kit.
AppRadius
Semantic corner-radius tokens for ui_framework_kit.
AppSpacing
Semantic spacing tokens for ui_framework_kit.
AsyncBuilder<T>
A typed wrapper around FutureBuilder that swaps automatically between loading, success, and error states using kit defaults (shimmer skeletons + RetryableErrorWidget).
AuthorDecorationConfig
Optional border, background, and radius applied to AuthorListTileWidget.
AuthorImageConfig
Avatar source and sizing for AuthorListTileWidget.
AuthorListTileModel
Composite model used to drive AuthorListTileWidget.
AuthorListTileWidget
A flexible list-tile that pairs an avatar with title/description rows.
AuthorTitleConfig
Styling for a title/description line inside AuthorListTileWidget.
AvatarBoxDecorationWidget
A circular container with theme-aware background and optional border, used to wrap avatar children.
BannerWidget
An in-flow banner that surfaces a short, severity-coloured message inside a layout (e.g. "You're offline" or "Saved successfully").
BuildBit
A piece of HTML being built.
BuildOp
A building operation to customize how a DOM element is rendered.
BuildTree
A tree of BuildBits.
CachedNetworkImageWidget
A network image with disk caching, placeholder, and error widget already wired up.
CheckBoxWidget
A theme-aware checkbox with an optional inline label.
CircularCachedNetworkImage
A circular avatar that loads a cached network image with an initials-based fallback when the URL is empty or fails to load.
CloseConfig
Configuration for the optional close button on DynamicMessageWidget.
ColorModel
A color token that pairs a light-mode shade with a dark-mode shade.
ColumnMode
A render mode that builds HTML into a Column widget.
ConfirmDialogWidget
A reusable yes/no confirmation dialog.
CssBlock
A CSS block.
CssBorder
A border of a box.
CssBorderSide
A side of a border of a box.
CssColor
CssLength
A length measurement.
CssLengthBox
A set of length measurements.
CssRadius
A radius.
CssShadow
A single shadow.
CssSizing
A CSS sizing widget.
CssSizingHint
CssSizingValue
A CssSizing value.
DatePickerTextField
A read-only text field that opens a date-picker on tap.
DefaultListShimmerWidget
A vertical list of ShimmerWidget placeholders, useful for loading states where the content count is unknown or fixed.
DefaultNameImageWidget
A circular avatar showing the first letter of name on a colored background.
DefaultPlaceholderImageWidget
A circular placeholder showing a centered SVG asset, used when an avatar URL is missing or unavailable.
DefaultSpacerWidget
A 10dp tall spacer painted in the kit's light-grey divider color.
DividerWidget
A thin horizontal divider that adapts to the active theme.
DottedBorderWidget
A container that paints a dotted/dashed rounded-rectangle border around its child.
A generic single-select dropdown for any type T.
DynamicMessageBannerWidget
A swipeable image carousel with auto-play and dot indicators.
DynamicMessageWidget
A dismissible message card with title, description, network image, and close button. State (visible/hidden) is per-instance, so multiple banners can co-exist.
DynamicMsgImageConfig
Network image block (with placeholder + error fallback) used by DynamicMessageWidget.
DynamicMsgTitleConfig
HTML title/description block placed above or below the image inside DynamicMessageWidget.
DynamicMsgYoutubePlayerConfig
Optional YouTube embed shown alongside title/description.
EmptyStateWidget
A reusable empty-state placeholder for "no results", "no data yet", or terminal error screens.
ErrorMessageWidget
A red inline error banner shown when absNormalStatus is AbsNormalStatus.error.
Flattened
A flattened bit.
FontSizeResolvers
HorizontalMargin
HtmlDetails
HtmlDetailsContents
HtmlDetailsMarker
HtmlFlex
HtmlLayoutBuilder
Builds a widget tree that can depend on the parent widget's size.
HtmlListItem
A list item widget.
HtmlListMarker
A list marker.
HtmlRuby
A RUBY widget.
HtmlSummary
HtmlTable
A TABLE widget.
HtmlTableCaption
A table caption widget.
HtmlTableCell
A TD (table cell) widget.
HtmlWidget
A widget that builds Flutter widget tree from HTML with support for IFRAME, VIDEO and many other tags.
HtmlWidgetState
State for a HtmlWidget.
ImageMetadata
An image.
ImageSource
An image source.
InheritanceResolvers
A set of resolvers for InheritedProperties.
InheritedProperties
A set of inherited properties.
InlineCustomWidget
A custom inline Widget.
InputButtonWidget
A versatile button widget with optional icon, theming, loading state, and built-in tap debounce to prevent double-taps.
ItemPosition
Position information for an item in the list.
ItemPositionsListener
Provides a listenable iterable of itemPositions of items that are on screen and their locations.
ItemScrollController
Controller to jump or scroll to a particular position in a ScrollablePositionedList.
LabelConfig
Styling options for a label row inside ValueHighLightWidget.
LinkPreviewWidget
Renders a rich preview card (open-graph metadata) for a given URL. Tapping the card launches the URL in the default browser.
ListViewMode
A render mode that builds HTML into a ListView widget.
ListViewWidget<T>
A ListView.separated wrapper with sensible defaults (theme-aware separator, keep-alive, repaint boundaries).
LocalImageConfig
Configuration for a leading icon shown next to a LabelConfig row.
LockableList<T>
A collection of values, that may be locked to prevent modification.
MCQAnswerConfig
A single answer inside an MCQConfig.
McqAnswerWidget
A single answer row inside McqWidget, styled by selected/correct /incorrect state.
MCQConfig
Configuration for a single multiple-choice question rendered by McqWidget.
McqWidget
A multiple-choice question widget that handles selected/correct/ incorrect state internally and reports taps via callback.
MultipleItemSelector<T>
A read-only field that opens a checkbox dialog to pick multiple items of type T.
MultiSelectDropDownWidget<T>
A multi-select dropdown that lets users pick zero or more items of type T.
NormalLineHeight
The default height of text.
OtpInputWidget
A row of single-digit input boxes for OTP / PIN entry.
PasswordSuffixIcon
A trailing eye icon that toggles password visibility on tap and reports the resulting obscureText state via passwordCallBack.
ReadMoreText
Add read more button to a long text
ReadMoreTextState
State for ReadMoreText; toggles between collapsed and expanded text.
RebuildFactors
REdgeInsets
REdgeInsetsDirectional
RenderHtmlFlex
RenderHtmlWidget
Renders an HTML string as Flutter widgets.
RenderMode
A render mode.
RetryableErrorWidget
A vertically centered error block with an icon, message, and a "Retry" button — designed to slot into a body that has failed to load.
RPadding
RSizedBox
ScreenUtil
ScreenUtilInit
ScrollablePositionedList
A scrollable list of widgets similar to ListView, except scroll control and position reporting is based on index rather than pixel offset.
ScrollOffsetController
Controller to scroll a certain number of pixels relative to the current scroll offset.
ScrollOffsetListener
Provides an affordance for listening to scroll offset changes.
ScrollPositionListViewWidget<T>
A ScrollablePositionedList.separated wrapper that exposes position controllers for jump-to-index and scroll observation.
SearchTextFieldWidget
A pre-styled search field with built-in clear button and theme-aware icons.
ShimmerWidget
A single shimmer placeholder. Pick a ShimmerType preset to control the silhouette (card, list item, message, etc.).
SliverListMode
A render mode that builds HTML into a SliverList widget.
SuccessMessageWidget
A green inline success banner shown when absNormalStatus is AbsNormalStatus.success.
SvgImageRenderWidget
Renders an SVG asset, tinted with a theme-aware color when provided.
SwitchWidget
A theme-aware on/off switch with optional label.
TextBit
A simple text bit.
TextFieldWidget
A pre-styled text field with theme-aware borders, password toggle, validation, and consistent label/hint behavior.
TextOptions
Fine-grained style overrides for TextWidget.
TextScaleFactor
The number of font pixels for each logical pixel.
TextStyleBackground
The background of text.
TextStyleDecorationColor
The text decoration color.
TextStyleLineHeight
The height of text.
TextStyleShadows
The shadows of text.
TextWidget
A themed text widget driven by TextTypeConstants semantic size levels.
TimePickerTextField
A read-only text field that opens a time-picker dialog on tap.
TitleDescriptionWithImageWidget
A card-like row that pairs a title and description with an optional image.
UiFrameworkConfig
Global configuration for ui_framework_kit.
ValignBaseline
A valign=baseline widget.
ValignBaselineContainer
ValueHighLightWidget
A label/value row with optional icon and decoration.
ViewAllWidget
A section header with a title and a tappable "View all" affordance.
WebViewWidget
A lightweight in-app web browser widget powered by flutter_inappwebview.
WhitespaceBit
A whitespace bit.
WidgetBit<T>
A widget bit.
WidgetFactory
A factory to build widgets with WebView, VideoPlayer, etc.
WidgetPlaceholder
A widget builder that can be extended with callbacks.
YoutubePlayerConfig
Configuration for YoutubePlayerWidget — a YouTube URL plus an optional placeholder image shown before playback starts.
YoutubePlayerWidget
Embeds a YouTube video using youtube_player_iframe with a thumbnail placeholder + tap-to-play behaviour.

Enums

AbsNormalStatus
AppTheme
BannerSeverity
Severity levels used by BannerWidget to pick the icon and tint.
CssLengthUnit
Length measurement units.
CssWhitespace
The whitespace behavior.
DeviceType
HtmlListMarkerType
List marker types.
ShimmerType
Preset shimmer skeletons recognised by ShimmerWidget.
TextTypeConstants
ToastEnum
TrimMode
TrimMode enum

Mixins

NonInheritedPropertiesOwner
A mixin that can manage non-inherited properties.
SU

Extensions

AccessibilityContext on BuildContext
Ergonomic accessibility helpers on top of MediaQuery + the kit-wide AccessibilityConfig.
BoolExtension on bool
BorderRadiusExtension on BorderRadius
BoxConstraintsExtension on BoxConstraints
BuildContextExension on BuildContext
BuildMetadataLegacy on BuildMetadata
CssAngleTermExtension on AngleTerm
An extension on css.AngleTerm.
CssDeclarationExtension on Declaration
An extension on css.Declaration.
CssFunctionTermExtension on FunctionTerm
An extension on css.FunctionTerm.
CssLiteralTermExtension on LiteralTerm
An extension on css.LiteralTerm.
CssNumberTermExtension on NumberTerm
An extension on css.NumberTerm.
CssPercentageTermExtension on PercentageTerm
An extension on css.PercentageTerm.
CssStyleSheetExtension on StyleSheet
An extension on css.StyleSheet.
DateTimeExt on DateTime
DomElementExtension on Element
An extension on dom.Element.
EdgeInsetsExtension on EdgeInsets
FirstOrNull on Iterable<T?>
FirstWhereOrNull on Iterable<T>
FontStyleExtension on BuildContext
BuildContext extension that resolves the active font style.
Hex on Color
IntExtension on int
ItemAtIndexOrNull on Iterable<T>
LegacyTextStyleBuilder on TextStyleBuilder
LegacyTextStyleHtml on TextStyleHtml
LegacyWidgetFactory on WidgetFactory
RadiusExtension on Radius
SizeExtension on num
StringExtension on String
ThemeExtension on ThemeData
WidgetExtension on Widget

Constants

kPriorityDefault → const int
kPriorityInlineBlockDefault → const int
kShouldBuildAsync → const int
The default character threshold to build widget tree asynchronously.
widget0 → const SizedBox
A no op widget.

Properties

appThemeData Map<AppTheme, ThemeData>
no setter
darkTheme ThemeData
no setter
kAppBarHeight double
getter/setter pair
kAppBarWidth double
getter/setter pair
kDefault10HorizontalSpace double
getter/setter pair
kDefault10VerticalSpace double
getter/setter pair
kDefault20HorizontalSpace double
getter/setter pair
kDefault20VerticalSpace double
getter/setter pair
kDefaultBorderRadius double
getter/setter pair
kDefaultBorderWidth double
getter/setter pair
kStatusBarHeight double
getter/setter pair
lightTheme ThemeData
no setter

Functions

boxDecorationDefault({BorderRadiusGeometry? borderRadius, Color? color, Gradient? gradient, BoxBorder? border, BoxShape? shape, BlendMode? backgroundBlendMode, List<BoxShadow>? boxShadow, DecorationImage? image}) Decoration
boxDecorationRoundedWithShadow(int radiusAll, {Color backgroundColor = Colors.white, Color? shadowColor, double? blurRadius, double? spreadRadius, Offset offset = const Offset(0.0, 0.0), LinearGradient? gradient, BoxBorder? boxBorder}) Decoration
rounded box decoration with shadow
boxDecorationWithRoundedCorners({Color backgroundColor = Colors.white, BorderRadius? borderRadius, LinearGradient? gradient, BoxBorder? border, List<BoxShadow>? boxShadow, DecorationImage? decorationImage, BoxShape boxShape = BoxShape.rectangle}) Decoration
rounded box decoration
boxDecorationWithShadow({Color backgroundColor = Colors.white, Color? shadowColor, double? blurRadius, double? spreadRadius, Offset offset = const Offset(0.0, 0.0), LinearGradient? gradient, BoxBorder? border, List<BoxShadow>? boxShadow, DecorationImage? decorationImage, BoxShape boxShape = BoxShape.rectangle, BorderRadius? borderRadius}) Decoration
box decoration with shadow
bytesFromDataUri(String dataUri) Uint8List?
Returns Uint8List by decoding dataUri.
currentMillisecondsTimeStamp() int
return current time in milliseconds
currentTimeStamp() int
return current timestamp
daysInMonth(int monthNum, int year) int
defaultBoxShadow({Color? shadowColor, double? blurRadius, double? spreadRadius, Offset offset = const Offset(0.0, 0.0)}) List<BoxShadow>
default box shadow
defaultInputDecoration({String? hint, String? label, TextStyle? textStyle}) InputDecoration
returns default InputDecoration for AppTextField widget
dialogShape([double? borderRadius]) ShapeBorder
getColorByTheme({required BuildContext context, required ColorModel colorClass}) Color
getMonthOnly(String date) String
getTimeAgo(String? date) String
getWeekDay(String dateTime) → (String, String)
hideKeyboard() → void
inputDecoration({VoidCallbackWithValue<bool>? passwordCallBack, required BuildContext context, String? labelText, String? hintText, Widget? prefixIcon, Widget? suffixIcon, bool isPassword = false}) InputDecoration
leapYear(int year) bool
return true if given year is an leap year
listOrNull<T>(T? x) Iterable<T>?
Returns List<T> if x is provided or null otherwise.
parseDate(String dateString) String
parseDateWithoutTime(String dateString) String
parseFullDateTime(String date) String
parseYearMonthDay(DateTime dateTime) String
radius([double? radius]) BorderRadius
returns Radius
radiusCircular([double? radius]) Radius
returns Radius
radiusOnly({double? topRight, double? topLeft, double? bottomRight, double? bottomLeft}) BorderRadius
returns custom Radius on each side
removeAnyFocus() → void
tryParseDoubleFromMap(Map<dynamic, String> map, String key) double?
Parses key from map as an double literal and return its value.
tryParseIntFromMap(Map<dynamic, String> map, String key) int?
Parses key from map as an integer literal and return its value.

Typedefs

Baselines = Map<int, List<_ValignBaselineRenderObject>>
BuildMetadata = BuildTree
A legacy tree of BuildBits.
CustomStylesBuilder = StylesMap? Function(Element element)
A callback to specify custom styling.
CustomWidgetBuilder = Widget? Function(Element element)
A callback to render custom widget for a DOM element.
DatePickerBuilder = Future<DateTime?> Function(BuildContext context, DateTime currentDate)
Signature for a custom date-picker dialog.
DefaultStyles = StylesMap Function(Element element)
The callback that should return default styling map.
EnsureVisible = Future<bool> Function(String id, {Curve curve, Duration duration, Curve jumpCurve, Duration jumpDuration})
A callback to scroll the anchor identified by id into the viewport.
FontSizeResolver = double Function(num fontSize, ScreenUtil instance)
InheritanceResolverCallback<T> = InheritedProperties Function(InheritedProperties resolving, T input)
A callback to resolve an InheritedProperties.
OnErrorBuilder = Widget? Function(BuildContext context, Element element, dynamic error)
A builder function that is called if an error occurs during a complicated element rendering.
OnLoadingBuilder = Widget? Function(BuildContext context, Element element, double? loadingProgress)
A builder that specifies the widget to display to the user while a complicated element is still loading.
OnParsed = BuildTree Function(BuildTree tree)
The callback that will be called when child elements have been processed.
OnRenderBlock = Widget Function(BuildTree tree, WidgetPlaceholder placeholder)
The callback that will be called during widget build.
OnRenderedBlock = void Function(BuildTree tree, Widget block)
The callback that will be called after widget has been built.
OnRenderedChildren = WidgetPlaceholder? Function(BuildTree tree, Iterable<WidgetPlaceholder> children)
The callback that will be called after children widgets has been built.
OnRenderInline = void Function(BuildTree tree)
The callback that will be called before flattening.
OnRenderInlineBlock = Widget Function(BuildTree tree, Widget child)
The callback that will be called after all child nodes have been parsed.
OnVisitChild = void Function(BuildTree tree, BuildTree subTree)
The callback that will be called before processing a child element.
RebuildFactor = bool Function(MediaQueryData old, MediaQueryData data)
ScreenUtilInitBuilder = Widget Function(BuildContext context, Widget? child)
StylesMap = Map<String, String>
A collection of style's key and value pairs.
TextStyleBuilder<T> = InheritanceResolvers
A legacy HTML styling builder.
TextStyleHtml = InheritedProperties
A legacy HTML styling set.
VoidCallbackWithValue<T> = void Function(T? value)?
WidgetPlaceholderBuilder = Widget? Function(BuildContext context, Widget child)
A callback for WidgetPlaceholder.