flutter_ahlib library

Classes

ActionController
A controller which is used to store and invoke action callbacks. This controller can be used to implement point-to-point communication across widgets. If you want to use publish/subscribe pattern, or said event bus, please use https://pub.dev/packages/event_bus.
AnimatedFab
A FloatingActionButton wrapped by some animation transitions in default, which does animation depended by show switcher.
AnimatedFabController
A controller of AnimatedFab and ScrollAnimatedFab, which is used to show and hide fab with animation.
AppBarActionButton
An extended IconButton that uses AppBarActionButtonThemeData as its default theme, can be used to show action button with consistent theme in AppBar.
AppBarActionButtonTheme
An inherited widget that associates an AppBarActionButtonThemeData with a subtree.
AppBarActionButtonThemeData
The theme data of AppBarActionButton, which can be got from the subtree by AppBarActionButtonTheme.of.
AppendIndicator
An indicator widget which is similar with RefreshIndicator, uses LinearProgressIndicator shown in the bottom of view as indicator, mainly used for showing append information.
AppendIndicatorState
The state of AppendIndicator, can be used to show the append indicator at the bottom, which is a LinearProgressIndicator.
CircularProgressDialogOption
An option used in a AlertDialog, which wraps progress and child with default padding and style. Note that you have to set AlertDialog.contentPadding to EdgeInsets.zero in order to show correctly.
CustomDrawerController
A customizable DrawerController which provides interactive behavior for Drawer widgets. This widget is allowed to use methods such as CustomDrawerControllerState.move to control its offset, and this is the only difference from DrawerController.
CustomDrawerControllerState
The State for CustomDrawerController. Note that here controller, move, settle, open and close methods are exposed to public.
CustomInkResponse
A customizable InkResponse with getRadius, getRect for ink feature.
CustomInkRipple
A visual reaction on a piece of Material to user input, similar to InkRipple but with CustomInkRippleSetting.
CustomInkRippleFactory
The factory of CustomInkRipple, you can use CustomInkRipple.splashFactory to create a default CustomInkRipple, you can also use this class with setting field to create a customizable CustomInkRipple.
CustomInkRippleSetting
A setting class for CustomInkRipple, this class contains some durations options for ripple effect and color fading.
CustomInkSplash
A visual reaction on a piece of Material to user input, similar to InkSplash but with CustomInkSplashSetting.
CustomInkSplashFactory
The factory of CustomInkSplash, you can use CustomInkSplash.splashFactory to create a default CustomInkSplash, you can also use this class with setting field to create a customizable CustomInkSplash.
CustomInkSplashSetting
A setting class for CustomInkSplash, this class contains some durations options for ripple effect and color fading.
CustomInkWell
A customizable InkWell with getRadius, getRect for ink feature.
CustomPageRoute<T>
A customizable PageRoute which is similar to MaterialPageRoute or CupertinoPageRoute, but this PageRoute supports customizable transition duration, transitions builder, and more, and these settings are fixed and can not be customized in these builtin PageRoute.
CustomPageRouteTheme
An inherited widget that associates an CustomPageRouteThemeData with a subtree.
CustomPageRouteThemeData
The theme data of CustomPageRoute, which can be got from the subtree by CustomPageRouteTheme.of.
CustomScrollPhysics
A customizable ScrollPhysics which determines Scrollable physics by given CustomScrollPhysicsController. If there is no change on controller, it will default to how ClampingScrollPhysics behaves and always accept user scroll.
CustomScrollPhysicsController
The controller of CustomScrollPhysics, which determines the physics of Scrollable.
CustomSingleChildLayoutDelegate
A customizable SingleChildLayoutDelegate which is used by CustomSingleChildLayout or RenderCustomSingleChildLayoutBox. Here this delegate will use given function parameters as override methods.
DefaultScrollPhysics
An inherited widget that associates an ScrollPhysics with a subtree.
DownloadOption
A data class for downloadFile, which is used to describe some downloading options.
DrawerDragTrigger
A data class which is used to describe DrawerScaffold's drawer drag trigger.
DrawerScaffold
An extended Scaffold with Drawer, mainly for making Drawer openable when PageView or TabBarView is overscrolled horizontally, and customizing more drawer drag triggers.
DrawerScaffoldState
The state of DrawerScaffold, you can use openDrawer and closeDrawer to control the drawer's offset.
Err<T extends Object, E extends Object>
A type that represent a err TaskResult.
ExtendedDropdownButton<T>
An extended DropdownButton, which fixes a bug for popup menu's layout when dismissing keyboard, and makes underline more customizable.
ExtendedDropdownButtonState<T>
The state of ExtendedDropdownButton.
ExtendedLogger
This Logger is extended from https://github.com/leisim/logger, which contains some new instance method, such as changePrinter and addOutputListener.
ExtendedNestedScrollView
An extended NestedScrollView, mainly for NestedScrollView with a TabBarView or PageView, which may use multiple ScrollController-s.
ExtendedNestedScrollViewState
The state of ExtendedNestedScrollView, can be used to get all inner controllers and outer controller.
ExtendedPhotoGallery
An extended PhotoViewGallery, which is used to show multiple PhotoView widgets in a PageView. Extended features include: reload behavior (through ExtendedPhotoGalleryState.reloadPhoto), custom viewport factor, advance page builder (through ExtendedPhotoGallery.advanced).
ExtendedPhotoGalleryPageOptions
A helper class that contains options of a photo page, used in ExtendedPhotoGallery.
ExtendedPhotoGalleryState
The state of ExtendedPhotoGallery, can be used to reloadPhoto the specific ImageProvider.
ExtendedScrollbar
An extended Scrollbar. This widget uses ScrollbarTheme to enrich builtin Scrollbar.
ExtendedTabBarView
An extended TabBarView, which supports viewportFraction, clipBehavior and padEnds, and the behavior is extended by warpTabIndex and assertForPages.
ExtendedTabBarViewState
The state of ExtendedTabBarView.
IconText
A wrapped Icon and Text with Row and Column.
IconTextDialogOption
An option used in a SimpleDialog, which wraps icon and text with default padding and style.
LazyIndexedStack
An IndexedStack which loads children in lazy.
LinkTextItem
A kind of TextGroupItem, which wraps given text and link style to TextSpan or WidgetSpan, and uses it as TextGroup's texts.
LoadImageOption
A data class for loadLocalOrNetworkImageBytes and loadLocalOrNetworkImageCodec, which is used to describe some options, and has almost the same fields as LocalOrCachedNetworkImageProvider.
LocalOrCachedNetworkImage
An image widget that uses OctoImage to show LocalOrCachedNetworkImageProvider image, which is almost the same as CachedNetworkImage.
LocalOrCachedNetworkImageProvider
An ImageProvider for loading image from local file or network using a cache.
MultiImageStreamCompleter
An ImageStreamCompleter with support for loading multiple images.
MultiSelectable<K extends Key>
A widget which simply enables multi-selection for items, these items can be SelectableItem, or other customizable Widget.
MultiSelectableController<K extends Key>
The controller of MultiSelectable, which is used to enter/exit multi-selection mode, or select/unselect items manually.
NestedPageViewNotifier
A widget to enable or notify scrolling of PageView which contains another PageView or TabBarView inside.
NoPopGestureCupertinoPageTransitionsBuilder
A no pop gesture version of CupertinoPageTransitionsBuilder, which can deal with the swipe behavior conflict between CupertinoPageTransitionsBuilder and Drawer.
Ok<T extends Object, E extends Object>
A type that represent a ok TaskResult.
OverflowClipBox
A convenient widget which makes widgets overflow-able by wrapping OverflowBox and ClipRect, which can be controlled by useOverflowBox and useClipRect.
PageChangedListener
A widget which wraps NotificationListener for PageView or TabBarView, to overwrite the behavior of these widgets' onPageChanged callback.
PagedList<T>
A data model for PaginationDataView, represents the returned data.
PaginationDataView<T>
An implementation of UpdatableDataView for pagination data, including AppendIndicator, RefreshIndicator, PlaceholderText, Scrollbar and some scroll view, such as ListView, SliverList with CustomScrollView, MasonryGridView, SliverMasonryGrid with CustomScrollView.
PaginationDataViewState<T>
The state of PaginationDataView, can be used to get the pagination indicator by currentIndicator and nextIndicator readonly properties, or show the append or refresh indicator by append and refresh method.
PaginationGridView<T>
An implementation of PaginationDataView, which displays data in GridView, only for backward compatibility.
PaginationListView<T>
An implementation of PaginationDataView, which displays data in ListView, only for backward compatibility.
PaginationMasonryGridView<T>
An implementation of PaginationDataView, which displays data in MasonryGridView, only for backward compatibility.
PaginationSetting
A list of pagination settings for PaginationDataView.
PaginationSliverGridView<T>
An implementation of PaginationDataView, which displays data in SliverGridView with CustomScrollView, only for backward compatibility.
PaginationSliverListView<T>
An implementation of PaginationDataView, which displays data in SliverList with CustomScrollView, only for backward compatibility.
PaginationSliverMasonryGridView<T>
An implementation of PaginationDataView, which displays data in SliverMasonryGridView with CustomScrollView, only for backward compatibility.
PhotoViewOptions
A helper class that contains all reusable options of ReloadablePhotoView.
PlaceholderSetting
A display setting of PlaceholderText. Note that null fields will be filled with the corresponding fields in PlaceholderTextTheme.setting, if the field is still null, PlaceholderSetting.defaultSetting will be used instead.
PlaceholderText
A placeholder text mainly used with ListView when using network request, includes four states: normal, loading, nothing, error.
PlaceholderTextTheme
An inherited widget that associates an PlaceholderSetting with a subtree.
PlainTextItem
A kind of TextGroupItem, which wraps given plain text and style to TextSpan, and uses it as TextGroup's texts.
PositionArgument
A data class represents arguments of Positioned only except for its child.
PreferredPrinter
This is an implementation of LogPrinter, which is preferred by AoiHosizora :)
PreloadablePageView
A scrollable and preloadable list that works page by page, which is modified from PageView.
PreviouslySwitchedWidget
An inherited widget that associates switched flag with a subtree, which represents whether a widget was shown previously and is switched out currently, in AnimatedSwitcher.
RefreshableDataView<T>
An implementation of UpdatableDataView for refreshable data, including RefreshIndicator, PlaceholderText, Scrollbar and some scroll views, such as ListView, SliverList with CustomScrollView, MasonryGridView, SliverMasonryGrid with CustomScrollView.
RefreshableDataViewState<T>
The state of RefreshableDataViewState, can be used to show the refresh indicator by refresh method.
RefreshableGridView<T>
An implementation of RefreshableDataView, which displays data in GridView, only for backward compatibility.
RefreshableListView<T>
An implementation of RefreshableDataView, which displays data in ListView, only for backward compatibility.
RefreshableMasonryGridView<T>
An implementation of RefreshableDataView, which displays data in MasonryGridView, only for backward compatibility.
RefreshableSliverGridView<T>
An implementation of RefreshableDataView, which displays data in SliverGrid with CustomScrollView, only for backward compatibility.
RefreshableSliverListView<T>
An implementation of RefreshableDataView, which displays data in SliverList with CustomScrollView, only for backward compatibility.
RefreshableSliverMasonryGridView<T>
An implementation of RefreshableDataView, which displays data in SliverMasonryGrid with CustomScrollView, only for backward compatibility.
ReloadablePhotoView
A reloadable PhotoView, which uses given ValueKey for ImageProvider (such as LocalOrCachedNetworkImageProvider), to reload it, through ReloadablePhotoViewState.reload method.
ReloadablePhotoViewState
The state of ReloadablePhotoView, which can be used to reload the photo view by reload method.
ScrollAnimatedFab
A FloatingActionButton wrapped by some animation transitions in default, which does animation depended by scrolling.
SelectableCheckboxItem<K extends Key>
A convenient widget, which wraps SelectableItem and displays a Checkbox for selection interaction.
SelectableItem<K extends Key>
A widget which contains selection toggling logic, typically is used under MultiSelectable. Note that the selection toggling interaction should be designed through builder by yourself. Use SelectableCheckboxItem if you want to simply display a Checkbox for selection interaction.
SelectableItemTip
The helper tip class for MultiSelectable and SelectableItem, which contains some flags and toToggle function for selecting and unselecting.
SliverHeaderDelegate
An implementation of SliverPersistentHeaderDelegate with PreferredSizeWidget child with size settings, can be used in SliverPersistentHeader..
SliverSeparatedListBuilderDelegate
An implementation of SliverChildListDelegate and SliverChildDelegate, with separator builder.
SliverSeparatedListDelegate
An implementation of SliverChildListDelegate and SliverChildDelegate, with separator widget.
SpanItem
A kind of TextGroupItem, which uses given InlineSpan (including TextSpan and WidgetSpan) as TextGroup's texts.
StatefulWidgetWithCallback
A StatefulWidget with some callbacks.
StatelessWidgetWithCallback
A StatelessWidget with some callbacks.
TableCellHelper
A helper class for TableCell, and is used to decide which TableCell to fill the whole TableRow in vertical direction, which is not implemented by flutter.
TableWholeRowInkWell
A special ink well based on CustomInkResponse, which will splash to the whole row when tap TableCell, is used in TableCell and to replace TableRowInkWell.
TaskResult<T extends Object, E extends Object>
A type that represents either ok/success or err/failure result, and is referred from rust's std::Result enum.
TextDialogOption
An option used in a SimpleDialog, which wraps text with default padding and style.
TextGroup
A RichText or SelectableText wrapper with states, including a list of TextGroupItem child, which can be SpanItem, PlainTextItem or LinkTextItem.
TextGroupItem
An abstract text group item used for TextGroup, which is inherited by builtin SpanItem, PlainTextItem and LinkTextItem.
TextSelectionConfig
A simplified TextSelectionTheme for the text selection configuration of TextField or TextFormField.
TextSelectionWithColorHandle
A TextSelectionControls which is inherited from MaterialTextSelectionControls, is used to change the color of the selection handle of TextField or TextFormField with handleColor, TextField.selectionControls or TextFormField.selectionControls.
Tuple1<T>
Represents a 1-tuple, which can be used to wrap simple type as referable type.
Tuple2<T1, T2>
Represents a 2-tuple, or pair.
Tuple3<T1, T2, T3>
Represents a 3-tuple, or triple.
Tuple4<T1, T2, T3, T4>
Represents a 4-tuple, or quadruple.
Tuple5<T1, T2, T3, T4, T5>
Represents a 5-tuple, or quintuple.
Tuple6<T1, T2, T3, T4, T5, T6>
Represents a 6-tuple, or sextuple.
UpdatableDataView<T>
An abstract widget for updatable data view, implemented by RefreshableDataView and PaginationDataView.
UpdatableDataViewExtraWidgets
A list of extra widgets which is used in UpdatableDataView, including widgets lie before/after ScrollView and CustomScrollView, or inside/outside PlaceholderText.
UpdatableDataViewSetting<T>
A list of behavior and display settings for UpdatableDataView.
VideoProgress
The data class which represents video progress, used in VideoProgressIndicator.
VideoProgressIndicator
A progress indicator used to display or control the playing and buffering status of video.
ViewInsetsData
An inherited widget that associates an EdgeInsets with a subtree.

Enums

DownloadBehavior
An enum type for DownloadOption, which is used to describe how to download.
DownloadConflictBehavior
An enum type for DownloadOption, which is used to describe how to handle when the given filepath has already existed.
DownloadErrorType
An enum type for DownloadException, which is used to describe the exception type when downloading.
HighlightType
Used to index the allocated highlights for the different types of highlights in _CustomInkResponseState.
IconTextAlignment
The alignment of Icon and Text, used in IconText.
LoadImageExceptionType
An enum type that represents types of LoadImageException.
OverflowDirection
The direction enum type for OverflowBox.
PlaceholderDisplayRule
A rule enum used to describe how to decide PlaceholderState in PlaceholderText.from.
PlaceholderState
A state enum used to describe the current state of PlaceholderText.
ScrollAnimatedCondition
A condition enum to decide how ScrollAnimatedFab does animation when scrolling.
UpdatableDataViewStyle
An enum type for UpdatableDataView, which represents the data display style.

Extensions

BoolExtension on bool
An extension for bool.
BuildContextExtension on BuildContext
An extension for BuildContext.
ColorExtension on Color
An extension for Color.
FutureExtension on Future<T?>
An extension for Future.
IterableExtension on Iterable<T>
An extension for Iterable.
ListExtension on List<T>
An extension for List.
ObjectExtension on T
An extension for any non-null values.
PageControllerExtension on PageController
An extension for PageController.
RenderObjectExtension on RenderObject
An extension for RenderObject.
ScrollControllerExtension on ScrollController
An extension for ScrollController.
ScrollMetricsExtension on ScrollMetrics
An extension for ScrollMetrics.
StateExtension on State<T>
An extension for State.
TaskResultFutureExtension on Future<TaskResult<T, E>>
An extension of Future<TaskResult> type, which has the same methods as TaskResult.
TextSpanExtension on TextSpan
An extension for TextSpan.
ThemeDataExtension on ThemeData
An extension for ThemeData.

Constants

kAlertDialogDefaultButtonPadding → const EdgeInsets
Defined in src/material/dialog.dart, used by AlertDialog.
kAlertDialogDefaultContentPadding → const EdgeInsets
Defined in src/material/dialog.dart, used by AlertDialog.
kAlertDialogDefaultTitlePadding → const EdgeInsets
Defined in src/material/dialog.dart, used by AlertDialog.
kAppBarDefaultElevation → const double
Defined in src/material/app_bar.dart, used by AppBar.
kAppBarDefaultShadowColor → const Color
Defined in src/material/app_bar.dart, used by AppBar.
kAppBarLeadingWidth → const double
Defined in src/material/app_bar.dart, used by AppBar.
kBottomAppBarDefaultElevation → const double
Defined in src/material/bottom_app_bar.dart, used by BottomAppBar.
kBottomSheetEnterDuration → const Duration
Defined in src/material/bottom_sheet.dart, used by BottomSheet.
kBottomSheetExitDuration → const Duration
Defined in src/material/bottom_sheet.dart, used by BottomSheet.
kCardDefaultElevation → const double
Defined in src/material/card.dart, used by Card.
kCircularProgressDialogOptionPadding → const EdgeInsets
The default padding for CircularProgressDialogOption.
kCircularProgressDialogOptionSpace → const double
The default space for CircularProgressDialogOption.
kCupertinoTransitionDuration → const Duration
Defined in src/cupertino/route.dart, used by CupertinoRouteTransitionMixin.
kDialogDefaultElevation → const double
Defined in src/material/dialog.dart, used by Dialog.
kDialogDefaultInsetPadding → const EdgeInsets
Defined in src/material/dialog.dart, used by Dialog.
kDividerDefaultHeight → const double
Defined in src/material/divider.dart, used by Divider.
kDrawerBaseSettleDuration → const Duration
Defined in src/material/drawer.dart, used by Drawer.
kDrawerEdgeDragWidth → const double
Defined in src/material/drawer.dart, used by Drawer.
kDrawerHeaderHeight → const double
Defined in src/material/drawer_header.dart, used by DrawerHeader.
kDrawerHeaderPadding → const EdgeInsets
Defined in src/material/drawer_header.dart, used by DrawerHeader.
kDrawerWidth → const double
Defined in src/material/drawer.dart, used by Drawer.
kDropdownMenuDuration → const Duration
Defined in src/material/dropdown.dart, used by DropdownButton.
kDropdownMenuItemHeight → const double
Defined in src/material/dropdown.dart, used by DropdownButton.
kExpansionPanelExpandDuration → const Duration
Defined in src/material/expansion_panel.dart, used by ExpansionPanel.
kExpansionPanelHeaderCollapsedHeight → const double
Defined in src/material/expansion_panel.dart, used by ExpansionPanel.
kFakeRefreshDuration → const Duration
The duration for fake refreshing when nothing.
kFlashListDuration → const Duration
The duration for refreshing list after clearing the data.
kIconTextDefaultSpace → const double
The default space of IconText.
kIconTextDialogOptionIconColor → const Color
The default icon color for IconTextDialogOption.
kIconTextDialogOptionPadding → const EdgeInsets
The default padding for IconTextDialogOption.
kIconTextDialogOptionSpace → const double
The default space for IconTextDialogOption.
kInputDecorationTransitionDuration → const Duration
Defined in src/material/input_decoration.dart, used by InputDecoration.
kMaterialBannerTransitionDuration → const Duration
Defined in src/material/banner.dart, used by MaterialBanner.
kMaterialDialogTransitionDuration → const Duration
Defined in src/material/dialog.dart, used by Dialog.
kMaterialTransitionDuration → const Duration
Defined in src/material/page.dart, used by MaterialRouteTransitionMixin.
kPopupMenuDuration → const Duration
Defined in src/material/popup_menu.dart, used by PopupMenuButton.
kScrollbarFadeDuration → const Duration
Defined in src/material/srollbar.dart, used by Scrollbar.
kScrollbarTimeToFade → const Duration
Defined in src/material/srollbar.dart, used by Scrollbar.
kSimpleDialogDefaultContentPadding → const EdgeInsets
Defined in src/material/dialog.dart, used by SimpleDialog.
kSimpleDialogDefaultOptionPadding → const EdgeInsets
Defined in src/material/dialog.dart, used by SimpleDialog.
kSimpleDialogDefaultTitlePadding → const EdgeInsets
Defined in src/material/dialog.dart, used by SimpleDialog.
kSnackBarDisplayDuration → const Duration
Defined in src/material/snack_bar.dart, used by SnackBar.
kSnackBarTransitionDuration → const Duration
Defined in src/material/snack_bar.dart, used by SnackBar.
kSwitchHeight → const double
Defined in src/material/switch.dart, used by Switch.
kSwitchHeightCollapsed → const double
Defined in src/material/switch.dart, used by Switch.
kSwitchThumbRadius → const double
Defined in src/material/switch.dart, used by Switch.
kSwitchTrackHeight → const double
Defined in src/material/switch.dart, used by Switch.
kSwitchTrackWidth → const double
Defined in src/material/switch.dart, used by Switch.
kSwitchWidth → const double
Defined in src/material/switch.dart, used by Switch.
kTabDefaultIndicatorWeight → const double
Defined in src/material/tabs.dart, used by TabBar.
kTabHeight → const double
Defined in src/material/tabs.dart, used by TabBar.
kTextAndIconTabHeight → const double
Defined in src/material/tabs.dart, used by TabBar.
kTextDialogOptionPadding → const EdgeInsets
The default padding for TextDialogOption.
kTextSelectionHandleSize → const double
Defined in src/material/text_selection.dart, used by TextSelection.
kTextSelectionToolbarContentDistance → const double
Defined in src/material/text_selection.dart, used by TextSelection.
kTextSelectionToolbarContentDistanceBelow → const double
Defined in src/material/text_selection.dart, used by TextSelection.
kTextSelectionToolbarHeight → const double
Defined in src/material/text_selection_toolbar.dart, used by TextSelectionToolbar.
kTextSelectionToolbarScreenPadding → const double
Defined in src/material/text_selection_toolbar.dart, used by TextSelectionToolbar.
kTooltipDefaultShowDuration → const Duration
Defined in src/material/tooltip.dart, used by Tooltip.
kTooltipDefaultVerticalOffset → const double
Defined in src/material/tooltip.dart, used by Tooltip.
kTooltipFadeInDuration → const Duration
Defined in src/material/tooltip.dart, used by Tooltip.
kTooltipFadeOutDuration → const Duration
Defined in src/material/tooltip.dart, used by Tooltip.
preferredSplashColorOpacity → const double
The preferred splash color for TextButton, OutlinedButton, InkWell, InkResponse, etc by AoiHosizora :)
preferredSplashColorOpacityForDarkElevated → const double
The preferred splash color for dark ElevatedButton by AoiHosizora :)
preferredSplashColorOpacityForLightElevated → const double
The preferred splash color for light ElevatedButton by AoiHosizora :)
preferredSplashColorOpacityForTable → const double
The preferred splash color for Table by AoiHosizora :)

Properties

globalLogger ExtendedLogger
The global ExtendedLogger for assistant, which defaults the default ExtendedLogger. You can replace this value to your own logger.
getter/setter pair
timeDilation double
Slows down animations by this factor to help in development.
no setter

Functions

ansiEscapeCodeToPlainText(String s) String
Parses given text which contains ANSI escape code to plain text.
calcDiagonal(num width, num height) num
This function is used to calculate diagonal of given Rect's width and height.
calcSqrt(num n) num
This function is the same as math.sqrt.
callAll(List<void Function()> functions) → void
Calls given all functions, this function can be used to avoid introducing braces and makes code more compact.
downloadFile({required String url, required String filepath, Map<String, String>? headers, BaseCacheManager? cacheManager, String? cacheKey, DownloadOption? option}) Future<File>
Downloads file from url with headers and saves to filepath. Here cacheManager defaults to DefaultCacheManager(), and cacheKey defaults to url, and option defines detailed downloading option, such as downloading behaviors.
filesize(int bytes, [int round = 2, bool mustRound = false]) String
Returns a formatted string value (such as "2 MB" and "2.34 KB") of given byte size.
filesizeWithoutSpace(int bytes, [int round = 2, bool mustRound = false]) String
Returns a formatted string value (such as "2MB" and "2.34KB") of given byte size.
flatButtonStyle({Color? primary, Color? onSurface, Color? backgroundColor, Color? shadowColor, Color? splashColor, double? elevation, TextStyle? textStyle, EdgeInsetsGeometry? padding, Size? minimumSize, Size? fixedSize, Size? maximumSize, BorderSide? side, OutlinedBorder? shape, MouseCursor? enabledMouseCursor, MouseCursor? disabledMouseCursor, VisualDensity? visualDensity, MaterialTapTargetSize? tapTargetSize, Duration? animationDuration, bool? enableFeedback, AlignmentGeometry? alignment, InteractiveInkFeatureFactory? splashFactory}) ButtonStyle
Returns a ButtonStyle that is used to make a TextButton look like a deprecated FlatButton, but with given styles.
getDialogContentMaxWidth(BuildContext context) double
Calculates a content width that can fill AlertDialog with the screen width.
getDialogMaxWidth(BuildContext context) double
Calculates a width that can fill AlertDialog or SimpleDialog with the screen width.
getExtensionsFromMime(String mime) List<String>?
Gets extension list from given MIME type. Note that this function returns null if given MIME type has no correspond extension.
getMimeFromExtension(String extension) String?
Gets MIME type from given extension. Note that this function returns null if given extension has no correspond MIME type.
getPreferredExtensionFromMime(String mime) String?
Gets preferred extension from given MIME type. Here for example, "jpg" is preferred in "jpg" and "jpeg", "html" is preferred in "htm" and "html". Note that this function returns null if given MIME type has no correspond extension.
getTableRowRect(RenderBox referenceBox) Rect
Returns the Rect of TableRow with given RenderBox. This is a helper function for CustomInkResponse.getRect, which is used to fix ink effect bug of TableRowInkWell.
loadLocalOrNetworkImageBytes({required LoadImageOption option, StreamController<ImageChunkEvent>? chunkEvents, void evictImageAsync()?}) Stream<Uint8List>
Loads local image bytes or cached network image bytes, using given option and chunkEvents. If the image is downloaded, it will also be recorded to given CacheManager.
loadLocalOrNetworkImageCodec({required LoadImageOption option, required dynamic decode, StreamController<ImageChunkEvent>? chunkEvents, void evictImageAsync()?}) Stream<Codec>
Loads local image codec or cached network image codec, using given option and chunkEvents, which is used by LocalOrCachedNetworkImageProvider. If the image is downloaded, it will also be recorded to given CacheManager.
outlineButtonStyle(ColorScheme colorScheme, {Color? primary, Color? onSurface, Color? backgroundColor, Color? shadowColor, Color? splashColor, double? elevation, TextStyle? textStyle, EdgeInsetsGeometry? padding, Size? minimumSize, Size? fixedSize, Size? maximumSize, BorderSide? side, OutlinedBorder? shape, MouseCursor? enabledMouseCursor, MouseCursor? disabledMouseCursor, VisualDensity? visualDensity, MaterialTapTargetSize? tapTargetSize, Duration? animationDuration, bool? enableFeedback, AlignmentGeometry? alignment, InteractiveInkFeatureFactory? splashFactory}) ButtonStyle
Returns a ButtonStyle that is used to make a OutlinedButton look like a deprecated OutlineButton, but with given styles.
preferredElevatedButtonStyle(ColorScheme colorScheme, [double splashColorOpacityForLight = preferredSplashColorOpacityForLightElevated, double splashColorOpacityForDark = preferredSplashColorOpacityForDarkElevated]) ButtonStyle
Returns the preferred ElevatedButton's ButtonStyle by AoiHosizora :)
preferredOutlinedButtonStyle(ColorScheme colorScheme, [double splashColorOpacity = preferredSplashColorOpacity]) ButtonStyle
Returns the preferred OutlinedButton's ButtonStyle by AoiHosizora :)
preferredTextButtonStyle(ColorScheme colorScheme, [double splashColorOpacity = preferredSplashColorOpacity]) ButtonStyle
Returns the preferred TextButton's ButtonStyle by AoiHosizora :)
raisedButtonStyle({Color? primary, Color? onPrimary, Color? onSurface, Color? shadowColor, Color? splashColor, double? elevation, TextStyle? textStyle, EdgeInsetsGeometry? padding, Size? minimumSize, Size? fixedSize, Size? maximumSize, BorderSide? side, OutlinedBorder? shape, MouseCursor? enabledMouseCursor, MouseCursor? disabledMouseCursor, VisualDensity? visualDensity, MaterialTapTargetSize? tapTargetSize, Duration? animationDuration, bool? enableFeedback, AlignmentGeometry? alignment, InteractiveInkFeatureFactory? splashFactory}) ButtonStyle
Returns a ButtonStyle that is used to make a ElevatedButton look like a deprecated RaisedButton, but with given styles.
resultFromAsyncFunc<T extends Object, E extends Object>(FutureOr<T> func()) Future<TaskResult<T, E>>
Returns a result by executing given async function and catching current type of exception.
resultFromFunc<T extends Object, E extends Object>(T func()) TaskResult<T, E>
Returns a result by executing given function and catching current type of exception.
showYesNoAlertDialog({required BuildContext context, required Widget? title, required Widget? content, required Widget? yesText, required Widget? noText, bool reverseYesNoOrder = false, bool barrierDismissible = true, Color? barrierColor = Colors.black54, String? barrierLabel, bool useSafeArea = true, bool useRootNavigator = true, RouteSettings? routeSettings, EdgeInsetsGeometry? titlePadding, TextStyle? titleTextStyle, EdgeInsetsGeometry contentPadding = kAlertDialogDefaultContentPadding, TextStyle? contentTextStyle, List<Widget>? actions, EdgeInsetsGeometry actionsPadding = EdgeInsets.zero, MainAxisAlignment? actionsAlignment, VerticalDirection? actionsOverflowDirection, double? actionsOverflowButtonSpacing, EdgeInsetsGeometry? buttonPadding, Color? backgroundColor, double? elevation, String? semanticLabel, EdgeInsets insetPadding = kDialogDefaultInsetPadding, Clip clipBehavior = Clip.none, ShapeBorder? shape, AlignmentGeometry? alignment, bool scrollable = false, void yesOnPressed(BuildContext)?, void yesOnLongPress(BuildContext)?, void yesOnHover(BuildContext, bool)?, void yesOnFocusChange(BuildContext, bool)?, ButtonStyle? yesStyle, FocusNode? yesFocusNode, bool yesAutoFocus = false, Clip yesClipBehavior = Clip.none, void noOnPressed(BuildContext)?, void noOnLongPress(BuildContext)?, void noOnHover(BuildContext, bool)?, void noOnFocusChange(BuildContext, bool)?, ButtonStyle? noStyle, FocusNode? noFocusNode, bool noAutoFocus = false, Clip noClipBehavior = Clip.none}) Future<bool?>
This is a convenient function to show AlertDialog with given title, content and two action buttons.
switchLayoutBuilderWithSwitchedFlag(Widget? currentChild, List<Widget> previousChildren) Widget
A switch layout builder for AnimatedSwitcher, which is almost the same as AnimatedSwitcher.defaultLayoutBuilder, but this builder wraps PreviouslySwitchedWidget with tracked key to specific widgets in Stack.

Typedefs

Action<T> = T Function()
An action function used in ActionController.
AdvancedPhotoGalleryPageBuilder = Widget Function(BuildContext context, int index, ExtendedPhotoGalleryPageBuilder photoPageBuilder)
The signature for building a page in ExtendedPhotoGallery, with given page index and photo page builder.
AppendCallback = Future<void> Function()
The signature for a function which is used by AppendIndicator.onAppend. I0t is called when user has dragged a AppendIndicator far enough to demonstrate that they want the app to append data.
ErrorPlaceholderBuilder = Widget Function(BuildContext context, Object error, StackTrace? stackTrace)
The signature for creating a replacement widget to render while it is failed to load the image.
ExtendedPhotoGalleryPageBuilder = Widget Function(BuildContext context, int index)
The signature for building a photo page in ExtendedPhotoGallery with given page index.
ExtendedPhotoGalleryPageOptionsBuilder = ExtendedPhotoGalleryPageOptions Function(BuildContext context, int index)
The signature for building a ExtendedPhotoGalleryPageOptions with given page index.
FilepathConflictHandler = Future<DownloadConflictBehavior> Function(String filepath)
The signature for handling filepath conflict, used by DownloadOption and downloadFile.
FilepathSuffixBuilder = String Function(int index)
The signature for building filepath suffix, used by DownloadOption and downloadFile.
ImageProviderBuilder = ImageProvider<Object> Function(ValueKey<String> key)
The signature for building an ImageProvider with given ValueKey, which can be used to reload image.
LoadingPlaceholderBuilder = Widget Function(BuildContext context, ImageChunkEvent? event)
The signature for creating a replacement widget to render while the image is loading.
LogEventCallback = void Function(LogEvent event)
The signature for callbacks when LogPrinter.log is called, used by ExtendedLogger.
OutputEventCallback = void Function(OutputEvent event)
The signature for callbacks when OutputEvent is generated, used by ExtendedLogger.
PlaceholderStateChangedCallback = void Function(PlaceholderState oldState, PlaceholderState newState)
A PlaceholderText.state changed callback function, with old state and new state.
PlaceholderVoidCallbackWidgetBuilder = Widget Function(BuildContext context, PlaceholderSetting setting, VoidCallback callback)
A widget builder function, with PlaceholderSetting and VoidCallback.
PlaceholderWidgetBuilder = Widget Function(BuildContext context, PlaceholderSetting setting)
A widget builder function, with PlaceholderSetting.
PlaceholderWidgetBuilderWidgetBuilder = Widget Function(BuildContext context, PlaceholderSetting setting, WidgetBuilder childBuilder)
A widget builder function, with PlaceholderSetting and WidgetBuilder.
RedecideFilepathHandler = String Function(Map<String, String>? header, String? contentType)
The signature for redeciding filepath for saving, used by DownloadOption and downloadFile.
SelectableItemVoidCallback<K extends Key> = void Function(BuildContext context, K key, SelectableItemTip tip)
The signature for describing a void callback with key and SelectableItemTip, used by SelectableItem.
SelectableItemWidgetBuilder<K extends Key> = Widget Function(BuildContext context, K key, SelectableItemTip tip)
The signature for building a widget with key and SelectableItemTip, used by SelectableItem.

Exceptions / Errors

DownloadException
An exception type only used by downloadFile, with type as its type and message as its message.
LoadImageException
An exception type used by loadLocalOrNetworkImageBytes.