sdga_design_system library

Classes

AlphaColorScheme
Manages alpha transparency color values for both light and dark themes.
BackgroundColorScheme
Defines background colors for various UI elements and states.
BorderColorScheme
Manages the appearance of borders across different elements.
ButtonColorScheme
Defines colors for button components in different states.
ControlsColorScheme
Manages colors for control elements like checkboxes and switches.
FormColorScheme
Defines colors for form elements and their states.
GlobalColorScheme
Provides global color values used across the application.
HijriCalendarDelegate
A CalendarDelegate implementation for the Hijri (Islamic) calendar system.
HijriDateFormat
A formatter and parser for Hijri (Islamic) calendar dates.
HijriDateTime
A DateTime extension that provides Hijri (Islamic) calendar support.
IconColorScheme
Manages colors for icon elements throughout the interface.
LinkColorScheme
Defines colors for hyperlink elements and their states.
SDGAAccordion<T>
The accordion is used to collapse and expand content to organize it more efficiently. It allows for hiding and displaying content as needed. It reduces clutter and helps maintain the user’s focus by showing only the relevant content at a time. The body of the accordion is only visible when it is expanded.
SDGAAccordionList<T>
A widget that displays a list of expandable accordion items.
SDGAAction
A highly customizable interactive widget that provides rich state-based styling and gesture handling.
SDGAAlertDialog
A SDGA Design alert dialog.
SDGAAnimatedWidget<T>
A widget that implicitly animates changes to a value of type T.
SDGAAppBar
A customizable app bar widget that implements SDGA Design specifications.
SDGAAppBarAction
A customizable action button widget typically used within SDGAAppBar.
SDGAAvatar
A widget that displays a customizable avatar with different presentation types.
SDGAAvatarGroup
A widget that displays a group of avatars with customizable layout options.
SDGABadge
A compact badge widget designed for navigation bars and other UI elements.
SDGABanner
A banner widget that displays some content with customizable styling.
SDGAButton
A customizable button widget that follows the Platform Code design system.
SDGACalendarDatePicker
An SDGA calendar date picker widget following the SDGA design system.
SDGACard
A card serves as a container for information and actions related to a specific concept or object. It typically resembles a rectangular box that combines images, text, and potentially some interactive elements.
SDGACheckbox
A customizable checkbox widget that follows SDGA Design guidelines.
SDGACheckboxListTile
A widget that combines a list tile with a checkbox.
SDGAColor
A color swatch implementation that provides standardized shade variations for the SDGA design system.
SDGAColors
Represents the base colors of the SDGA design system.
SDGAColorScheme
Represents the comprehensive color scheme for the SDGA design system.
SDGAConstants
A collection of constant values used for design system spacing and border radius.
SDGAContentDialog
A widget that displays a content dialog following SDGA design guidelines.
SDGAContentSwitcher<T>
A widget that displays a content switcher, allowing the user to switch between different items.
SDGACupertinoDatePicker
An SDGA date picker widget following the SDGA design system.
SDGACupertinoPicker
An SDGA wheel/spinner picker widget following the SDGA design system.
SDGACupertinoPickerDefaultSelectionOverlay
A default selection overlay for SDGACupertinoPickers.
SDGACupertinoTimerPicker
An SDGA countdown timer picker widget following the SDGA design system.
SDGACustomBorder
A base class for SDGA border implementations that enables smooth transitions between different border states.
SDGADashedBorder
A border that creates a dashed line effect around a container.
SDGADatePickerDialog
An SDGA date picker dialog widget following the SDGA design system.
SDGADateRangePickerDialog
An SDGA date range picker dialog widget following the SDGA design system.
SDGADialog
A customized dialog widget for the SDGA design system.
SDGADivider
A thin horizontal line widget that follows the SDGA design system, with padding on either side.
SDGADoubleBorder
A border that combines and draws two separate borders simultaneously.
SDGADraggableScrollable
A draggable and scrollable widget that automatically calculates its maximum height based on its child content.
SDGADrawer
A customizable drawer widget for displaying a list of items with an optional header.
SDGADrawerHeader
A widget that displays a header for the SDGADrawer.
SDGADrawerItem
A widget that represent a drawer item in the SDGADrawer.
SDGADrawerSubItem
A widget that represent a sub-item for the SDGADrawerItem.expandable.
SDGADropdownInput<T>
A customizable dropdown input widget for single or multi selections.
SDGADropdownItem<T>
Defines a SDGADropdownInput menu button that represents one item view in the dropdown.
SDGAExpandIcon
A widget that displays an animated expand/collapse icon.
SDGAFeaturedIcon
A widget that displays an icon with a styled background container.
SDGAFeedbackIcon
A widget that displays a feedback icon with various customization options.
SDGAFile<T>
A generic class that represents a file with its associated metadata for SDGAFileInput.files.
SDGAFileInput<T>
A widget for selecting and managing files.
SDGAFileState
Represents the state of a file in SDGAFileInput.
SDGAIndicatorBorder
A border that draws lines with rounded ends and padding from the edges.
SDGAInlineAlert
A widget that displays an inline alert with customizable appearance and behavior.
SDGAInputAffix
A widget that represents a custom prefix or suffix element in an input field.
SDGAInputDatePickerFormField
A SDGATextFormField configured to accept and validate a date entered by a user.
SDGAInputDecoration
The labels, icons, and styles used to an input field.
SDGAInputDecorator
Defines the appearance of an input field.
SDGAInputDropdownAffix<T>
A widget that represents a dropdown prefix or suffix element in an input field.
SDGAInputHelper
A widget that displays helper text below an input field.
SDGAInputTextAffix
A widget that represents a text prefix or suffix element in an input field.
SDGALabel
A widget that displays a label with customizable size, required indicator, and font weight.
A widget that displays an interactive link with customizable styling.
SDGAListTile
A customized list tile widget that displays a row of content with optional leading and trailing widgets.
SDGAMenu
A widget that creates a menu that will open positioned relative to the child.
SDGAMenuController
A controller to manage a menu created by a SDGAMenu.
SDGAMenuItem
A widget that is typically used within the SDGAMenu.
SDGAModal
A widget that displays a modal dialog with a customizable header and actions.
SDGANavigationBar
A widget that implements a navigation bar with selectable items.
SDGANavigationBarItem
This class represents a single tab item that can be displayed in SDGANavigationBar.
SDGANotificationToast
A widget that displays a notification toast with customizable appearance and behavior.
SDGANumbers
A collection of standard numerical values for sizes, spacings and radii used throughout the SDGA design system.
SDGANumbersNotifications
A collection of specific numerical values for notification-related components in the SDGA design system.
SDGAPagination
A widget that displays pagination controls for navigating through pages.
SDGAPickerSelectionBorder
A custom border for the SDGA Cupertino picker selection overlay.
SDGAPlaceholder
A widget that displays a placeholder with customizable dimensions and message.
SDGARadio<T>
A widget that displays a customizable radio button following SDGA design guidelines.
SDGARadioListTile<T>
A widget that combines a list tile with a radio button.
SDGARatingBar
A widget that displays a rating bar.
SDGAScaffold
Implements the basic Material Design visual layout structure with SDGA styling.
SDGAShadows
A utility class that defines the standard shadow configurations for the SDGA design system.
SDGASimpleDialog
A widget that displays a simple SDGA design dialog.
SDGASimpleDialogOption
An option used in a SDGASimpleDialog styled with SDGA components.
SDGASpinner
A widget that displays an animated loading spinner.
SDGAStep
Represents a single step in the SDGAStepper.
SDGAStepper
A widget that displays a stepper with customizable steps and styles.
SDGASwitch
A customized switch widget that follows SDGA design guidelines.
SDGASwitchListTile
A list tile that contains a switch.
SDGATab
This class represents a single tab item that can be displayed in SDGATabBar.
SDGATabBar
A widget that displays a set of tabs for navigation or content organization.
SDGATag
A versatile tag widget that follows the Platforms Code Design system.
SDGATextField
A SDGA Design text field.
SDGATextFormField
A FormField that contains a SDGATextField.
SDGATextStyle
A default text style that inherits from Flutter's TextStyle while enforcing the SDGA design system's typography guidelines.
SDGATextStyles
Defines the complete set of text styles used in the SDGA design system.
SDGATheme
An extension for ThemeData that provides a set of color schemes specifically designed for the Saudi Digital Government Authority (SDGA).
SDGAToggleableLayout
A widget that provides a standardized layout for toggleable inputs with supporting content.
SDGATooltip
A widget that displays a customizable tooltip when triggered by user interaction.
SDGATooltipState
Contains the state for a SDGATooltip.
SDGAUtils
Some utils used in this library
SDGAVerticalDivider
A vertical divider widget that follows the SDGA design system.
SDGAYearPicker
A scrollable grid year picker following the SDGA design system.
StepperColorScheme
Manages colors for stepper components and their states.
TableColorScheme
Defines colors for table components and their states.
TagColorScheme
Manages colors for tag/chip components.
TextColorScheme
Defines colors for text elements throughout the application.
TooltipColorScheme
Manages colors for tooltip components.

Enums

SDGAAccordionIconAffinity
Where to place the arrow icon in accordion widgets.
SDGAAlertType
Defines the types of alerts in the SDGA design system.
SDGAAvatarSizes
Defines the available size presets for SDGAAvatar.
SDGAAvatarType
Defines the type of content to be displayed in an SDGAAvatar.
SDGAButtonStyle
Defines the available visual styles for standard SDGA buttons.
SDGACardEffect
The visual effect to be applied to the card.
SDGACheckBoxSize
Defines the available size options for checkbox components.
SDGACloseButtonSize
Defines the available sizes for close buttons in the SDGA design system.
SDGADestructiveButtonStyle
Defines the available styles for destructive actions in the SDGA design system.
SDGAFabButtonStyle
Defines the available styles for floating action buttons (FABs) in the SDGA design system.
SDGAFeaturedIconSizes
Predefined size configurations for featured icons.
SDGAFeaturedIconStyle
Defines the visual style variants available for featured icons.
SDGAFeedbackIconType
Defines the types of feedback icons in the SDGA design system.
SDGAInputAffixStyle
Defines the visual style of an input affix.
SDGAInputDecorationStyle
Defines the visual style variants for the input decoration.
SDGALabelSize
Defines the size of the label.
SDGALinkSize
Defines the available sizes for an SDGALink.
SDGASpinnerSizes
Predefined sizes for spinner components.
SDGAStepperStyle
Defines the style of the stepper indicator.
SDGATagColor
Defines the color scheme for a tag.
SDGATagSize
Defines the size variations available for tags.
SDGATagStatus
Defines the status indicators for status-type tags.
SDGATagStyle
Defines the visual style variations available for tags.
SDGAToggleableStyle
Defines the visual style variants for toggleable components.
SDGATooltipPosition
Defines the preferred position for the tooltip relative to the child widget.
SDGAWidgetColor
Defines the color variants for SDGA widgets.
SDGAWidgetSize
Defines the size variants for SDGA widgets.
SDGAWidgetStyle
Defines the style variants for SDGA widgets.
SmartDashesType
Indicates how to handle the intelligent replacement of dashes in text input.
SmartQuotesType
Indicates how to handle the intelligent replacement of quotes in text input.

Extensions

HijriDateExtension on DateTime
Extension on DateTime to convert it to HijriDateTime.
ThemeDataEx on ThemeData
Extension methods for ThemeData to easily apply SDGA theming.

Functions

showSDGADatePicker({required BuildContext context, DateTime? initialDate, required DateTime firstDate, required DateTime lastDate, DateTime? currentDate, DatePickerEntryMode initialEntryMode = DatePickerEntryMode.calendar, SelectableDayPredicate? selectableDayPredicate, String? cancelText, String? confirmText, Locale? locale, bool barrierDismissible = true, String? barrierLabel, bool useRootNavigator = true, RouteSettings? routeSettings, TextDirection? textDirection, TransitionBuilder? builder, DatePickerMode initialDatePickerMode = DatePickerMode.day, String? errorFormatText, String? errorInvalidText, String? fieldHintText, String? fieldLabelText, TextInputType? keyboardType, Offset? anchorPoint, ValueChanged<DatePickerEntryMode>? onDatePickerModeChange, Icon? switchToInputEntryModeIcon, Icon? switchToCalendarEntryModeIcon, CalendarDelegate<DateTime> calendarDelegate = const GregorianCalendarDelegate()}) → Future<DateTime?>
Shows a dialog containing an SDGA date picker following the SDGA design system.
showSDGADateRangePicker({required BuildContext context, DateTimeRange<DateTime>? initialDateRange, required DateTime firstDate, required DateTime lastDate, DateTime? currentDate, DatePickerEntryMode initialEntryMode = DatePickerEntryMode.calendar, String? helpText, String? cancelText, String? confirmText, String? saveText, String? errorFormatText, String? errorInvalidText, String? errorInvalidRangeText, String? fieldStartHintText, String? fieldEndHintText, String? fieldStartLabelText, String? fieldEndLabelText, Locale? locale, bool barrierDismissible = true, String? barrierLabel, bool useRootNavigator = true, RouteSettings? routeSettings, TextDirection? textDirection, TransitionBuilder? builder, Offset? anchorPoint, TextInputType keyboardType = TextInputType.datetime, Icon? switchToInputEntryModeIcon, Icon? switchToCalendarEntryModeIcon, SelectableDayForRangePredicate? selectableDayPredicate, CalendarDelegate<DateTime> calendarDelegate = const GregorianCalendarDelegate()}) → Future<DateTimeRange<DateTime>?>
Shows a dialog containing an SDGA date range picker following the SDGA design system.
showSDGADialog<T>({required BuildContext context, required WidgetBuilder builder, bool useRootNavigator = true, bool barrierDismissible = true, bool useSafeArea = true, String? barrierLabel, RouteSettings? routeSettings, Offset? anchorPoint}) → Future<T?>
Shows a modal SDGA dialog.
showSDGAModal<T>({required BuildContext context, required ScrollableWidgetBuilder builder, bool useRootNavigator = false, bool isDismissible = true, bool shouldCloseOnMinExtent = true, bool snap = true, double? minExtent}) → Future<T?>
Shows a modal SDGA bottom sheet.

Typedefs

SDGAAccordionCallback = void Function(int accordionIndex, bool isExpanded)
Signature for the callback that's called when an SDGAAccordion is expanded or collapsed.
SDGAMenuBuilder = Widget Function(BuildContext context, SDGAMenuController controller, Widget? child)
The type of builder function used by SDGAMenu.builder to build the widget that the SDGAMenu surrounds.
SDGAMenuBuildItems = List<Widget> Function(BuildContext context, SDGAMenuController controller)
The type of builder function used by SDGAMenu.buildItems to build the widget that the SDGAMenu surrounds.
SDGAMenuIndexedWidgetBuilder = Widget? Function(BuildContext context, int index)
Signature for a function that creates a widget for a given index, e.g., in a list, but may return null.