ako library
Ako is a collection of generic Flutter widgets, extensions and utilities.
Licensed under the Mozilla Public License, version 2.0.
Classes
- AkoBadge
- AkoBadge is a widget that takes a future and displays the returned list of AkoBadgeLabel as badges.
- AkoBadgeLabel
- AkoBadgeLabel is a extendable class for AkoBadge
- AkoBadgeStyle
- AkoBadgeStyle is used to style AkoBadge.
- AkoBasicScreen
- AkoBasicScreen is a simple container widget that provides a padding around its child.
- AkoFakeSearchField
-
AkoFakeSearchField is a widget that shows a search box like button.
hintText is the text shown inside the box.
clickAction is a GestureTapCallback triggered on user tap. -
AkoFuture<
T> -
AkoFutureOptional<
T> - AkoImageSource
- AkoImageSource is a way to launch the AkoImageSourceSheet with AkoImageSourceOptions
- AkoImageSourceOptions
- AkoImageSourceOptions is a wrapper for arguments to AkoImageSourceSheet
- AkoImageSourceSheet
- AkoImageSourceSheet is a bottom sheet for selecting one of two image sources.
- AkoImageSourceStyle
- AkoImageSourceStyle is a wrapper for style to AkoImageSourceSheet
- AkoOsmBottomSheet
- AkoOsmBottomSheet is shows a OSMFlutter Map inside of a resizable bottom sheet.
- AkoOsmBottomSheetOptions
- AkoOsmBottomSheetOptions provides configuration for AkoOsmBottomSheet.
- AkoOsmMap
- AkoOsmMap is a simple widget to show a OpenStreetMap map with a focused initial location.
- AkoOsmMapOptions
- AkoOsmMapOptions provides configuration for AkoOsmMap.
-
AkoPair<
A, B> - AkoPair implements a simple Pair (2 element Tuple)
- AkoPlatform
- AkoPlatform provides a easy way to find out what the current device platform is.
- AkoResponsiveLayout
-
AkoResponsiveLayout provides a simple mechanism to show a mobile, tablet or desktop layout.
This widget uses a LayoutBuilder to get the available width for the widget,
then AkoResponsiveDevice is used to decide which widget is shown.
When one of the widgets is missing, a Placeholder is shown instead. - AkoSearchField
- AkoSearchField implements a simple search field
- AkoSearchFieldOptions
- AkoSearchFieldOptions is a wrapper for arguments to AkoSearchField
- AkoSearchFieldStyle
- AkoSearchFieldStyle is a wrapper for style of AkoSearchField
- AkoSearchFilter
- AkoSearchFilter is a way to launch the AkoSearchFilterSheet with AkoSearchFilterOptions
- AkoSearchFilterOptions
- AkoSearchFilterOptions is a wrapper for arguments to AkoSearchFilterSheet
- AkoSearchFilterOptionsStyle
- AkoSearchFilterOptionsStyle is a wrapper for style to AkoSearchFilterSheet
- AkoSearchFilterSelection
- AkoSearchFilterSelection defines a section in the AkoSearchFilterSheet.
- AkoSearchFilterSheet
- AkoSearchFilterSheet is a bottom-sheet widget that implements a filter menu The design and layout is inspired by TripAdvisor
- AkoSearchFilterTerm
- AkoSearchFilterTerm defines a Term that can be filtered, terms are passed to AkoSearchSelectionSheet
- AkoSearchSelection
- AkoSearchSelection is a way to launch the AkoSearchSelectionSheet with AkoSearchSelectionOptions
- AkoSearchSelectionField
- AkoSearchSelectionField is a form field for a dropdown input like usage.
- AkoSearchSelectionOptions
- AkoSearchSelectionOptions is a wrapper for arguments to AkoSearchSelectionSheet
- AkoSearchSelectionSheet
- AkoSearchSelectionSheet is a bottom-sheet widget that implements a multi-select searchable list The design and layout is inspired by TripAdvisor
- AkoSearchSelectionStyle
- AkoSearchSelectionStyle is a wrapper for style to AkoSearchSelectionSheet
- AkoShowEither
-
AkoShowEither is a widget that shows one of two widgets based on a condition.
When condition is true the result of onTrue is shown, when it is false the result of onFalse is shown. - AkoShowWhen
-
AkoShowWhen is a widget that either shows a child widget or an empty SizedBox.
When condition is true, the result of builder is shown, otherwise a SizedBox is shown.
Enums
- AkoResponsiveDevice
-
AkoResponsiveDevice is an Enum that can be used to identify a width.
Any width from 0 to 480 is considered to be mobile.
Any width from 481 to 1024 is considered to be tablet.
Any width from 1025 to infinity is considered to be desktop.
All numbers above are inclusive.
Extensions
- AkoShowSnackBar on BuildContext
-
AkoShowSnackBar is an extension to BuildContext.
showErrorSnackBar shows a white on read message.
showSnackBar shows a white on green message.
Functions
-
fetchJsonAsOptional<
T> ({required FetchJsonParser fromJson, required FetchFunction fetch}) → Future< Optional< T> > - fetchJsonAsOptional is a helper for fetching and parsing JSON data.
-
tryOptionalOrElse<
T> (TryOptionalFutureFunction< T> future, {Optional<T> elseValue = const Optional.empty()}) → Future<Optional< T> > - tryOptionalOrElse allows to get an elseValue when a optional future throws an error.
-
tryOrElse<
T> (TryFutureFunction< T> future, {Optional<T> elseValue = const Optional.empty()}) → Future<Optional< T> > - tryOrElse allows to get an elseValue when a future throws an error.
Typedefs
- AkoErrorBuilder = Widget Function(Object error, StackTrace? stacktrace)
-
AkoFutureBuilder<
T> = Widget Function(T data) - AkoImageSourceAction = void Function()
-
AkoSearchFilterTermLoader
= Future<
List< Function()AkoSearchFilterTerm> > -
FetchFunction
= Future<
Map< Function()String, dynamic> > -
FetchJsonParser<
T> = T Function(Map< String, dynamic> ) -
TryFutureFunction<
T> = Future< T> Function() -
TryOptionalFutureFunction<
T> = Future< Optional< Function()T> >