basf_flutter_components library

Lib

Classes

$AssetsImagesGen
$AssetsRiveGen
AdaptiveSpacer
Auto adjusts space
AnimatedGearIcon
Settings gear icon animated
AnimatedSegmentedProgress
Animated Segmented Progress
AppCircularProgress
Circular progress
AppDivider
Diving line
AppRoute
App Route for router Just create a list of static routes in your app and you'll get same behavior as with the enums
AppSnackBar
Basf AppSnackBar
AssetGenImage
AssetGenImageAnimation
BasfAlertDialog
A BASF-styled customized alert dialog
BasfAssets
BasfButton
Basf styled buttons button
BasfCheckbox
BasfCheckbox
BasfColors
This class contains every official BASF Color and their swatches.
BasfComponentsLocalizations
Callers can lookup localized strings with an instance of BasfComponentsLocalizations returned by BasfComponentsLocalizations.of(context).
BasfComponentsLocalizationsDe
The translations for German (de).
BasfComponentsLocalizationsDeRlp
The translations for German (de_rlp).
BasfComponentsLocalizationsEn
The translations for English (en).
BasfComponentsLocalizationUtils
BasfDropDownInput
A BASF-styled dropdown input with support for unselected values
BasfIcons
BASF custom Icons
BasfInputThemes
A collection of Input values being used in the BASF themes
BasfOutlinedButton
A BasfButton with outline
BasfRive
BasfRiveAnimationAsset
BasfRiveAnimationStateMachineAsset
BasfShadows
A list of shadows being used in the BASF widgets
BasfTextButton
A BASF-style text button
BasfTextField
A BASF-styled text field input
BasfTextStyles
A collection of BASF Text Styles
BasfThemes
Core of BASF Themes
Bloc<Event, State>
Takes a Stream of Events as input and transforms them into a Stream of States as output.
BlocBase<State>
An interface for the core functionality implemented by both Bloc and Cubit.
BlocBuilder<B extends StateStreamable<S>, S>
BlocBuilder handles building a widget in response to new states. BlocBuilder is analogous to StreamBuilder but has simplified API to reduce the amount of boilerplate code needed as well as bloc-specific performance improvements. Please refer to BlocListener if you want to "do" anything in response to state changes such as navigation, showing a dialog, etc...
BlocBuilderBase<B extends StateStreamable<S>, S>
Base class for widgets that build themselves based on interaction with a specified bloc.
BlocConsumer<B extends StateStreamable<S>, S>
BlocConsumer exposes a builder and listener in order react to new states. BlocConsumer is analogous to a nested BlocListener and BlocBuilder but reduces the amount of boilerplate needed. BlocConsumer should only be used when it is necessary to both rebuild UI and execute other reactions to state changes in the bloc.
BlocEventSink<Event extends Object?>
An ErrorSink that supports adding events.
BlocListener<B extends StateStreamable<S>, S>
Takes a BlocWidgetListener and an optional bloc and invokes the listener in response to state changes in the bloc. It should be used for functionality that needs to occur only in response to a state change such as navigation, showing a SnackBar, showing a Dialog, etc... The listener is guaranteed to only be called once for each state change unlike the builder in BlocBuilder.
BlocListenerBase<B extends StateStreamable<S>, S>
Base class for widgets that listen to state changes in a specified bloc.
BlocObserver
An interface for observing the behavior of Bloc instances.
BlocProvider<T extends StateStreamableSource<Object?>>
Takes a create function that is responsible for creating the Bloc or Cubit and a child which will have access to the instance via BlocProvider.of(context). It is used as a dependency injection (DI) widget so that a single instance of a Bloc or Cubit can be provided to multiple widgets within a subtree.
BlocSelector<B extends StateStreamable<S>, S, T>
BlocSelector is analogous to BlocBuilder but allows developers to filter updates by selecting a new value based on the bloc state. Unnecessary builds are prevented if the selected value does not change.
ButtonStyles
BASF button styles
ButtonWithLoader
A custom button widget that can display a loading indicator.
CameraEdges
Camera edges
CentralInfoMessage
info message to show in the center
Change<State>
A Change represents the change from one State to another. A Change consists of the currentState and nextState.
Closable
An object that must be closed when no longer in use.
CollapsibleList
Cubit<State>
A Cubit is similar to Bloc but has no notion of events and relies on methods to emit new states.
CustomAppBar
This AppBar just allows us to reuse same style in the app
CustomScaffold
Scaffold with custom appbar
CustomTextStyle
Custom text style used at BASF Themes
DataBind
A data bind option for a Rive file.
Dimens
Defines the default Dimens for padding to be used as guidelines
DottedLine
Dotted line
DottedSeparator
Dotted separator
DoubleItemsRow
Double items row
EditableInfoTile
Editable info tile
Emittable<State extends Object?>
An object that can emit new states.
EmittableStateStreamableSource<State>
A StateStreamableSource that can emit new states.
Emitter<State>
An Emitter is a class which is capable of emitting new states.
ErrorAnimatedIcon
ErrorSink
A generic destination for errors.
Factory
Factory for creating Rive rendering objects.
Fade
Hides and shows child Widget with a beautiful Curves.easeOut animation
FavoriteButton
Favorite button
FavoriteData
Data for favorite button
FontFamily
GENERATED CODE - DO NOT MODIFY BY HAND
GradientBackground
Standard basf gradient background
HomeTile
Home tile
HorizontalSpacer
HorizontalSpacer creates a horizontal separation between Widgets the same way you would use a SizedBox, but with predefined values from Dimens
HorizontalSpacerWithText
HorizontalSpacerWithText creates a horizontal separation between Widgets with a text in between
HydratedAesCipher
Default encryption algorithm. Uses AES256 CBC with PKCS7 padding.
HydratedBloc<Event, State>
Specialized Bloc which handles initializing the Bloc state based on the persisted state. This allows state to be persisted across hot restarts as well as complete app restarts.
HydratedCipher
Abstract cipher can be implemented to customize encryption.
HydratedCubit<State>
Specialized Cubit which handles initializing the Cubit state based on the persisted state. This allows state to be persisted across application restarts.
HydratedStorage
Implementation of Storage which uses package:hive_ce to persist and retrieve state changes from the local device.
HydratedStorageDirectory
A platform-agnostic storage directory representation.
InfoTileItem
info tile
InputFormatter
Extension InputFormatter to be used in TextFields
LabeledWidget
A reusable widget to label text fields, dropdowns, etc.
LogisticsBoxAnimation
LogoutButton
Logout button
MessageRiveAnimation
ModalBody
Modal body
ModalBottomSheetWidget
Bottom sheet widget
ModalHeader
Modal header
ModalParent
Modal parent widget used as a default bottom-sheet shell.
ModalParentForScrollableChild
Variant of ModalParent for scrollable body children.
MultiBlocListener
Merges multiple BlocListener widgets into one widget tree.
MultiBlocObserver
A BlocObserver which supports registering multiple BlocObserver instances. This is useful when maintaining multiple BlocObserver instances for different functions e.g. LoggingBlocObserver, ErrorReportingBlocObserver.
MultiBlocProvider
Merges multiple BlocProvider widgets into one widget tree.
MultiRepositoryProvider
Merges multiple RepositoryProvider widgets into one widget tree.
NoCameraIcon
No camera icon
OnOffStandardScannerOverlay
Overlay which can disable camera
OptionButton
Option button used on Radio
Paddings
BASF custom Paddings
PersistedInputCubit
Controller to save data from persisted input
PersistedInputData
Data model for PersistedInputCubit
PersistedTextField
TextField that prompts auto-filled values based on previous inputs, also has favorite inputs.
QrRiveAnimation
RadioOptions<T>
Radio option row with BASF Style
RepositoryProvider<T>
Takes a create function that is responsible for creating the repository and a child which will have access to the repository via RepositoryProvider.of(context). It is used as a dependency injection (DI) widget so that a single instance of a repository can be provided to multiple widgets within a subtree.
RiveEmojiIcon
RiveGenImage
RiveNative
ScanCameraIconButton
Scanner camera icon button
Scanner
!!! Read this to setup camera access https://pub.dev/packages/mobile_scanner !!! Requires ScannerCubit to be provided above this widget HydratedStorage must also be initialized on app launch Main launch logic for scanner
ScannerBlackoutSquare
Black transparent overlay for scanner
ScannerCoolDown
Cooldown widget
ScannerCubit
Camera cubit
ScannerDefaultErrorLayout
Default error layout
ScannerDisabled
Disabled state
ScannerEnabled
Enabled state
ScannerNoCameraLayout
Shown when no camera is available
ScannerNoPermissionLayout
Layout for no permission to use camera
ScannerState
Camera controller state
ScannerSuccessLayout
Shown after scan if no cooldown
ScanSupportText
Scan text
SearchCriteriaModalLayout
Modal layout for search criteria.
SearchCriteriaModalUiModel
SearchCriteriaModalUiModelDatePicker
SearchCriteriaModalUiModelInfoTileItem
SearchCriteriaModalUiModelSwitch
SearchCriteriaModalUiModelTextField
SearchLoopAnimation
SettingsTile
Tile with icon and arrow
SingleItem
Single item
SliderButton
A BASF-styled slider button
StandardBottomActions
Standard bottom actions
StandardScannerOverlay
Standard overlay for scanner
StateStreamable<State>
A Streamable that provides synchronous access to the current state.
StateStreamableSource<State>
A StateStreamable that must be closed when no longer in use.
Storage
Interface which is used to persist and retrieve state changes.
Streamable<State extends Object?>
An object that provides access to a stream of states over time.
SuccessAnimatedIcon
SystemThemes
SystemTheme for BASF apps
TextFieldData
Class representing data for a text field Can be used to make text fields depending on same behavior
TextFieldUpdateData
TextFieldUpdateData
ToggleDirectionIconButton
Toggle flashlight icon button
ToggleFlashIconButton
Toggle flashlight icon button
Transition<Event, State>
A Transition is the change from one state to another. Consists of the currentState, an event, and the nextState.
UnitsScannerOverlay
Overlay which shows next expected scan
VerticalSpacer
VerticalSpacer creates a vertical separation between Widgets the same way you would use a SizedBox, but with predefined values from Dimens
ViewModelInstanceColor
A Rive view model property of type Color that represents a color value.
WarningAnimatedIcon
WarningModalLayout
Warning modal layout
WelcomeHeader
Welcome header

Enums

AppDividerType
App Divider enum type
BasfThemeType
All BASF Theme types, each one holding the primary color that will be used in the theme
ButtonType
BASF button types
HydrationErrorBehavior
Describes the various caching behaviors when a hydration error occurs.
RiveEmoji
rive emoji animations
StorageDirectory
Corresponds to constants defined in Androids android.os.Environment class.
TextButtonConstructorType
A BASF-style text button

Mixins

HydratedMixin<State>
A mixin which enables automatic state persistence for Bloc and Cubit classes.
TextButtonHelper
mixing for text button

Extensions

Checks on Object?
Extension on Objects
DetailedWhere on Map<K, V>
Allows us to find an entry
JoinedWidgets on List<Widget>
A collection of usefull extensions on List<Widget>
Log on Object
Emit a log event of the current object
ReadContext on BuildContext
Exposes the read method.
SelectContext on BuildContext
Adds a select method on BuildContext.
SnackbarActions on AppSnackBar
Shows an AppSnackBar
StringCasingExtension on String
A collection of usefull extensions on String
StringNullableExtensions on String?
ThemeExtension on BuildContext
Allows access to the current theme data
WatchContext on BuildContext
Exposes the watch method.

Properties

disablePathProviderPlatformOverride bool
no getter

Functions

defaultOnHydrationError(Object error, StackTrace stackTrace) HydrationErrorBehavior
The default hydration onError implementation. Returns HydrationErrorBehavior.overwrite.
getApplicationCacheDirectory() Future<Directory>
Path to a directory where the application may place application-specific cache files.
getApplicationDocumentsDirectory() Future<Directory>
Path to a directory where the application may place data that is user-generated, or that cannot otherwise be recreated by your application.
getApplicationSupportDirectory() Future<Directory>
Path to a directory where the application may place application support files.
getDownloadsDirectory() Future<Directory?>
Path to the directory where downloaded files can be stored.
getExternalCacheDirectories() Future<List<Directory>?>
Paths to directories where application specific cache data can be stored externally.
getExternalStorageDirectories({StorageDirectory? type}) Future<List<Directory>?>
Paths to directories where application specific data can be stored externally.
getExternalStorageDirectory() Future<Directory?>
Path to a directory where the application may access top level storage.
getLibraryDirectory() Future<Directory>
Path to the directory where application can store files that are persistent, backed up, and not visible to the user, such as sqlite.db.
getTemporaryDirectory() Future<Directory>
Path to the temporary directory on the device that is not backed up and is suitable for storing caches of downloaded files.
lookupBasfComponentsLocalizations(Locale locale) BasfComponentsLocalizations
showCustomModalBottomSheet<T>({required BuildContext context, required WidgetBuilder builder, double ratio = 0.9, BoxConstraints? constraints, bool isDismissible = true, bool showDragHandle = false, bool? enableDrag, Color? backgroundColor, Color? barrierColor, double? elevation}) Future<T?>
Show modal sheet

Typedefs

BlocBuilderCondition<S> = bool Function(S previous, S current)
Signature for the buildWhen function which takes the previous state and the current state and is responsible for returning a bool which determines whether to rebuild BlocBuilder with the current state.
BlocListenerCondition<S> = bool Function(S previous, S current)
Signature for the listenWhen function which takes the previous state and the current state and is responsible for returning a bool which determines whether or not to call BlocWidgetListener of BlocListener with the current state.
BlocWidgetBuilder<S> = Widget Function(BuildContext context, S state)
Signature for the builder function which takes the BuildContext and state and is responsible for returning a widget which is to be rendered. This is analogous to the builder function in StreamBuilder.
BlocWidgetListener<S> = void Function(BuildContext context, S state)
Signature for the listener function which takes the BuildContext along with the state and is responsible for executing in response to state changes.
BlocWidgetSelector<S, T> = T Function(S state)
Signature for the selector function which is responsible for returning a selected value, T, based on state.
EventHandler<Event, State> = FutureOr<void> Function(Event event, Emitter<State> emit)
An event handler is responsible for reacting to an incoming Event and can emit zero or more states via the Emitter.
EventMapper<Event> = Stream<Event> Function(Event event)
Signature for a function which converts an incoming event into an outbound stream of events. Used when defining custom EventTransformers.
EventTransformer<Event> = Stream<Event> Function(Stream<Event> events, EventMapper<Event> mapper)
Used to change how events are processed. By default events are processed concurrently.
OnHydrationError = HydrationErrorBehavior Function(Object error, StackTrace stackTrace)
Signature of the onError callback during hydrate.

Exceptions / Errors

HydratedCyclicError
Reports that an object could not be serialized due to cyclic references. When the cycle is detected, a HydratedCyclicError is thrown.
HydratedUnsupportedError
Reports that an object could not be serialized. The unsupportedObject field holds object that failed to be serialized.
MissingPlatformDirectoryException
An exception thrown when a directory that should always be available on the current platform cannot be obtained.
ProviderNotFoundException
The error that will be thrown if Provider.of fails to find a Provider as an ancestor of the BuildContext used.
StorageNotFound
Exception thrown if there was no HydratedStorage specified. This is most likely due to forgetting to setup the HydratedStorage: