ig_flutter_commons library
The core library for the BMED project.
Classes
- AddressCheckOptions
- This class should be pretty self-explanatory. If AddressCheckOptions.port or AddressCheckOptions.timeout are not specified, they both default to InternetConnectionChecker.DEFAULT_PORT and InternetConnectionChecker.DEFAULT_TIMEOUT Also... yeah, I'm not great at naming things.
- AddressCheckResult
- Helper class that contains the address options and indicates whether opening a socket to it succeeded.
- AdvancedFileOutput
- Accumulates logs in a buffer to reduce frequent disk, writes while optionally switching to a new log file if it reaches a certain size.
- AllLogsFilter
- AnchorElement
- AndroidOptions
- AnsiColor
- This class handles colorizing of terminal output.
- ApiService
- classe ApiService
- ApiServiceResponse
- ApiServiceResponse
- AppleOptions
- AvailableMap
- Class that holds all the information needed to launch a map
- BackgroundTransformer
- The default Transformer for Dio.
- BaseOptions
-
A set of base settings for each
Dio()
. BaseOptions and Options will be merged into one RequestOptions before sending the requests. See Options.compose. - Bidi
- This provides utility methods for working with bidirectional text. All of the methods are static, and are organized into a class primarily to group them together for documentation and discoverability.
- BidiFormatter
- Bidi stands for Bi-directional text. According to Wikipedia: Bi-directional text is text containing text in both text directionalities, both right-to-left (RTL) and left-to-right (LTR). It generally involves text containing different types of alphabets, but may also refer to boustrophedon, which is changing text directionality in each row.
-
Bloc<
Event, State> -
Takes a
Stream
ofEvents
as input and transforms them into aStream
ofStates
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 tostate
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
andBlocBuilder
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 astate
change such as navigation, showing aSnackBar
, showing aDialog
, etc... The listener is guaranteed to only be called once for eachstate
change unlike thebuilder
inBlocBuilder
. -
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.
- BlocOverrides
- This class facilitates overriding BlocObserver and EventTransformer. It should be extended by another class in client code with overrides that construct a custom implementation. The implementation in this class defaults to the base blocObserver and eventTransformer implementation. For example:
-
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 viaBlocProvider.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.
- BoolList
- A space-efficient list of boolean values.
- BrowserConfiguration
- Additional configuration options for LaunchMode.inAppBrowserView
- ButtonProgress
- BytesLoader
- An interface that can be implemented to support decoding vector graphic binary assets from different byte sources.
- Cache
- The cache for decoded SVGs.
- CachedNetworkImage
- Image widget to show NetworkImage with caching functionality.
- CachedNetworkImageProvider
- IO implementation of the CachedNetworkImageProvider; the ImageProvider to load network images using a cache.
- CancelToken
- Controls cancellation of Dio's requests.
-
CanonicalizedMap<
C, K, V> -
A map whose keys are converted to canonical values of type
C
. - CaseInsensitiveEquality
- String equality that's insensitive to differences in ASCII case.
-
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.
- ColorMapper
- A class that transforms from one color to another during SVG parsing.
-
CombinedIterableView<
T> - A view of several iterables combined sequentially into a single iterable.
-
CombinedListView<
T> - A view of several lists combined into a single list.
-
CombinedMapView<
K, V> - Returns a new map that represents maps flattened into a single map.
- ConsoleOutput
- Default implementation of LogOutput.
- Constants
- Common and generic constants
- Coords
- Class that holds latitude and longitude coordinates
-
Cubit<
State> - A Cubit is similar to Bloc but has no notion of events and relies on methods to emit new states.
- CurlLoggerDioInterceptor
- CustomConsoleOutput
- DateFormat
- DateFormat is for formatting and parsing dates in a locale-sensitive manner.
- DateTimeFormat
- DeepCollectionEquality
- Deep equality on collections.
-
DefaultEquality<
E> - Equality of objects that compares only the natural equality of the objects.
- DefaultSvgTheme
- The SVG theme to apply to descendant SvgPicture widgets which don't have explicit theme values.
-
DelegatingIterable<
E> - An Iterable that delegates all operations to a base iterable.
-
DelegatingList<
E> - A List that delegates all operations to a base list.
-
DelegatingMap<
K, V> - A Map that delegates all operations to a base map.
-
DelegatingQueue<
E> - A Queue that delegates all operations to a base queue.
-
DelegatingSet<
E> - A Set that delegates all operations to a base set.
- DevelopmentFilter
-
Prints all logs with
level >= Logger.level
while in development mode (eg whenassert
s are evaluated, Flutter calls this debug mode). - DeviceDirectoriesManager
- DeviceFileSystemManager
- DevicePermissionManager
- Dio
- Dio enables you to make HTTP requests easily.
- DioMixin
- Disposable
- If objects that are registered inside GetIt implements Disposable the onDispose method will be called whenever that Object is unregistered, resetted or its enclosing Scope is popped
- DownloadedFile
- DownloadProgress
-
Progress of the file that is being downloaded from the
originalUrl
. -
Emittable<
State extends Object?> - An object that can emit new states.
-
Emitter<
State> - An Emitter is a class which is capable of emitting new states.
-
Equality<
E> - A generic equality relation on objects.
-
EqualityBy<
E, F> - Equality of objects based on derived values.
-
EqualityMap<
K, V> - A Map whose key equality is determined by an Equality object.
-
EqualitySet<
E> - A Set whose key equality is determined by an Equality object.
- Equatable
- A base class to facilitate operator == and hashCode overrides.
- EquatableConfig
- The default configuration for all Equatable instances.
- ErrorInterceptorHandler
- The handler for interceptors to handle error occurred during the request.
- ErrorModel
- ErrorSink
- A generic destination for errors.
- Event
- FailureResponse
- FailureResponse
- FileOutput
- FilePicker
- The interface that implementations of file_picker must implement.
- FilePickerIO
- An implementation of FilePicker that uses method channels.
- FilePickerLinux
- FilePickerMacOS
- FilePickerResult
- FilePickerWindows
- FileStorageManager
- FlutterSecureStorage
- FormData
- A class to create readable "multipart/form-data" streams. It can be used to submit forms and file uploads to http server.
- FusedTransformer
- A Transformer that has a fast path for decoding UTF8-encoded JSON. If the response is utf8-encoded JSON and no custom decoder is specified in the RequestOptions, this transformer is significantly faster than the default SyncTransformer and the BackgroundTransformer. This improvement is achieved by using a fused Utf8Decoder and JsonDecoder to decode the response, which is faster than decoding the utf8-encoded JSON in two separate steps, since Dart uses a special fast decoder for this case. See https://github.com/dart-lang/sdk/blob/5b2ea0c7a227d91c691d2ff8cbbeb5f7f86afdb9/sdk/lib/_internal/vm/lib/convert_patch.dart#L40
- GetIt
- Very simple and easy to use service locator You register your object creation factory or an instance of an object with registerFactory, registerSingleton or registerLazySingleton And retrieve the desired object using get or call your locator as function as its a callable class Additionally GetIt offers asynchronous creation functions as well as functions to synchronize the async initialization of multiple Singletons
- HeaderDioInterceptor
- Headers
- The headers class for requests and responses.
-
HeapPriorityQueue<
E> - Heap based priority queue.
- HttpClientAdapter
-
HttpAdapter
is a bridge between Dio and HttpClient. - HybridPrinter
- A decorator for a LogPrinter that allows for the composition of different printers to handle different log messages. Provide it's constructor with a base printer, but include named parameters for any levels that have a different printer:
-
IdentityEquality<
E> - Equality of objects that compares only the identity of the objects.
- InitDependency
- Data structure used to identify a dependency by type and instanceName
- Interceptor
- Interceptor helps to deal with RequestOptions, Response, and DioException during the lifecycle of a request before it reaches users.
- Interceptors
- A Queue-Model list for Interceptors.
- InterceptorsWrapper
- A helper class to create interceptors in ease.
- InternetConnectionChecker
- This is a singleton that can be accessed like a regular constructor i.e. InternetConnectionChecker() always returns the same instance.
- Intl
-
The Intl class provides a common entry point for internationalization
related tasks. An Intl instance can be created for a particular locale
and used to create a date format via
anIntl.date()
. Static methods on this class are also used in message formatting. - IOSOptions
- Specific options for iOS platform.
-
IterableEquality<
E> - Equality on iterables.
-
IterableZip<
T> - Iterable that iterates over lists of values from other iterables.
- LinuxOptions
- Specific options for Linux platform. Currently there are no specific linux options available.
-
ListEquality<
E> - Equality on lists.
-
ListParam<
T> - Indicates a param being used as queries or form data, and how does it gets formatted.
-
ListSlice<
E> - A list view of a range of another list.
- LogEvent
- LogFilter
- An abstract filter of log messages.
- LogfmtPrinter
- Outputs a logfmt message:
- Logger
- Use instances of logger to send log messages to the LogPrinter.
- LoggerService
- LogInterceptor
- LogInterceptor is used to print logs during network requests. It should be the last interceptor added, otherwise modifications by following interceptors will not be logged. This is because the execution of interceptors is in the order of addition.
- LogOutput
- Log output receives a OutputEvent from LogPrinter and sends it to the desired destination.
- LogPrinter
- An abstract handler of log events.
- MacOsOptions
- Specific options for macOS platform.
-
MapEquality<
K, V> - Equality on maps.
-
MapKeySet<
E> - An unmodifiable Set view of the keys of a Map.
- MapLauncher
-
MapValueSet<
K, V> - Creates a modifiable Set view of the values of a Map.
- MemoryOutput
- Buffers OutputEvents.
- MicroMoney
- Used primarily for currency formatting, this number-like class stores millionths of a currency unit, typically as an Int64.
- MultiBlocListener
- Merges multiple BlocListener widgets into one widget tree.
- MultiBlocProvider
- Merges multiple BlocProvider widgets into one widget tree.
-
MultiEquality<
E> - Combines several equalities into a single equality.
- MultiImageStreamCompleter
- An ImageStreamCompleter with support for loading multiple images.
- MultiOutput
- Logs simultaneously to multiple LogOutput outputs.
- MultipartFile
-
A file to be uploaded as part of a
MultipartRequest
. This doesn't need to correspond to a physical file. - MultiRepositoryProvider
- Merges multiple RepositoryProvider widgets into one widget tree.
-
NonGrowableListMixin<
E> - Mixin class that implements a throwing version of all list operations that change the List's length.
-
NonGrowableListView<
E> - A fixed-length list.
- NumberFormat
- Provides the ability to format a number in a locale-specific way.
-
NumberParserBase<
R> - Options
- The configuration for a single request. BaseOptions and Options will be merged into one RequestOptions before sending the requests. See Options.compose.
- OutputEvent
- OverlayLoaderManager
- OverlayLoaderPopWrapper
- PackageInfo
- Application metadata. Provides application bundle information on iOS and application package information on Android.
- PackageInfoPlusLinuxPlugin
-
The Linux implementation of
PackageInfoPlatform
. - PackageInfoPlusWindowsPlugin
-
The Windows implementation of
PackageInfoPlatform
. - PdfActionBarTheme
- PdfBaseCache
- Store data in a cache
- PdfBaseImageCache
- Store network images in a cache
- PdfGoogleFonts
- Google Fonts
- PdfMemoryCache
- Memory cache
- PdfMemoryImageCache
- Memory image cache
- PdfPageFormatAction
- PdfPageOrientationAction
- PdfPreview
- Flutter widget that uses the rasterized pdf pages to display a document.
- PdfPreviewAction
- Action to add the the PdfPreview widget
- PdfPreviewCustom
- Flutter widget that uses the rasterized pdf pages to display a document.
- PdfPreviewCustomState
- PdfPreviewPageData
- A class that holds rasterized pdf data
- PdfPreviewState
- PdfPrintAction
- PdfRaster
- Represents a bitmap image
- PdfRasterImage
- Image provider for a PdfRaster
- Permission
- Defines the permissions which can be checked and requested.
- PermissionWithService
- A special kind of permission, used to access a service.
- PictureInfo
- The deocded result of a vector graphics asset.
- PictureProvider
- Deprecated class, will be removed, does not do anything.
- PlatformFile
- PrefixPrinter
- A decorator for a LogPrinter that allows for the prepending of every line in the log output with a string for the level of that log. For example:
- PrettyPrinter
- Default implementation of LogPrinter.
- Printer
- Information about a printer
- PrintingInfo
- Capabilities supported for the current platform
-
PriorityQueue<
E> - A priority queue is a priority based work-list of elements.
- ProductionFilter
-
Prints all logs with
level >= Logger.level
even in production. - QueuedInterceptor
- Interceptor in queue.
- QueuedInterceptorsWrapper
- A helper class to create queued-interceptors in ease.
-
QueueList<
E> - A class that efficiently implements both Queue and List.
- RedirectRecord
- A record that records the redirection happens during requests, including status code, request method, and the location.
-
RepositoryProvider<
T> -
Takes a
Create
function that is responsible for creating the repository and achild
which will have access to the repository viaRepositoryProvider.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. - RequestInterceptorHandler
- The handler for interceptors to handle before the request has been sent.
- RequestOptions
- The internal request option class that is the eventual result after BaseOptions and Options are composed.
-
Response<
T> - The Response class contains the payload (could be transformed) that respond from the request, and other information of the response.
- ResponseBody
- The response wrapper class for adapters.
- ResponseInterceptorHandler
- The handler for interceptors to handle after respond.
- SecureStorageManager
- This class is used to manage secure storage
- SessionApiManger
-
SetEquality<
E> - Equality of sets.
- ShadowChangeHandlers
-
If an object implements the
ShadowChangeHandler
if will get notified if an Object with the same registration type and name is registered on a higher scope which will shadow it. It also will get notified if the shadowing object is removed from GetIt - Plugin for summoning a platform share sheet.
- This class is used to manage secure storage
- Wraps NSUserDefaults (on iOS) and SharedPreferences (on Android), providing a persistent store for simple data.
- Provides a persistent store for simple data.
- Provides a persistent store for simple data.
- Options necessary to create a SharedPreferencesWithCache.
- The Linux implementation of SharePlatform.
-
The fallback Windows implementation of
SharePlatform
, for older Windows versions. - The result of a share to determine what action the user has taken.
- SimplePrinter
- Outputs simple log messages:
-
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.
-
Streamable<
State extends Object?> - An object that provides access to a stream of states over time.
- StreamOutput
- SuccessResponse
- SuccessResponse
- Svg
-
A utility class for decoding SVG data to a
DrawableRoot
or a PictureInfo. - SvgAssetLoader
- A BytesLoader that decodes and parses an SVG asset in an isolate and creates a vector_graphics binary representation.
- SvgBytesLoader
- A BytesLoader that decodes and parses a UTF-8 encoded SVG string from a Uint8List in an isolate and creates a vector_graphics binary representation.
- SvgCacheKey
- A SvgTheme aware cache key.
- SvgFileLoader
- A BytesLoader that decodes SVG data from a file in an isolate and creates a vector_graphics binary representation.
-
SvgLoader<
T> - A BytesLoader that parses a SVG data in an isolate and creates a vector_graphics binary representation.
- SvgNetworkLoader
- A BytesLoader that decodes and parses a UTF-8 encoded SVG string the network in an isolate and creates a vector_graphics binary representation.
- SvgPicture
- A widget that will parse SVG data for rendering on screen.
- SvgStringLoader
- A BytesLoader that parses an SVG string in an isolate and creates a vector_graphics binary representation.
- SvgTheme
- A theme used when decoding an SVG picture.
- SyncTransformer
- If you want to custom the transformation of request/response data, you can provide a Transformer by your self, and replace the transformer by setting the Dio.transformer.
- TextDirection
- Represents directionality of text.
- Transformer
- Transformer allows changes to the request/response data before it is sent/received to/from the server.
-
Transition<
Event, State> - A Transition is the change from one state to another. Consists of the currentState, an event, and the nextState.
-
UnionSet<
E> - A single set that provides a view of the union over a set of sets.
-
UnionSetController<
E> - A controller that exposes a view of the union of a collection of sets.
-
UnmodifiableListView<
E> - An unmodifiable List view of another List.
-
UnmodifiableMapMixin<
K, V> - Mixin class that implements a throwing version of all map operations that change the Map.
-
UnmodifiableMapView<
K, V> - View of a Map that disallow modifying the map.
-
UnmodifiableSetMixin<
E> - Mixin class that implements a throwing version of all set operations that change the Set.
-
UnmodifiableSetView<
E> - An unmodifiable set.
-
UnorderedIterableEquality<
E> - Equality of the elements of two iterables without considering order.
- Utils
- Uuid
- uuid for Dart Author: Yulian Kuncheff Released under MIT License.
- UuidValue
- VectorGraphicUtilities
- Utility functionality for interaction with vector graphic assets.
- WebOptions
- Specific options for web platform.
- WebViewConfiguration
- Additional configuration options for LaunchMode.inAppWebView.
- WidgetWrapper
- ImageProvider that draws a Flutter Widget on a PDF document
- WillSignalReady
-
If your singleton that you register wants to use the manually signalling
of its ready state, it can implement this interface class instead of using
the
signalsReady
parameter of the registration functions (you don't really have to implement much ;-) ) - WindowsOptions
- Specific options for Windows platform.
- XFile
- A CrossFile is a cross-platform, simplified File abstraction.
Enums
- CacheManagerLogLevel
- Log levels of the cache manager. Debug shows failed downloads and verbose also shows successful downloads and cache retrievals.
- DioExceptionType
- The exception enumeration indicates what type of exception has happened during requests.
- DirectionsMode
-
Defines the supported modes of transportation for
showDirections
- FilePickerStatus
- FileType
- InternetConnectionStatus
- Represents the status of the data connection. Returned by InternetConnectionChecker.connectionStatus
- KeychainAccessibility
- KeyChain accessibility attributes as defined here: https://developer.apple.com/documentation/security/ksecattraccessible?language=objc
- KeyCipherAlgorithm
- LaunchMode
- The desired mode to launch a URL.
- Level
- Levels to control logging output. Logging can be enabled to include all levels above certain Level.
- ListFormat
- Specifies the array format (a single parameter with multiple parameter or multiple parameters with the same name). and the separator for array items.
- Namespace
- RFC4122 & RFC9562 provided namespaces for v3, v5, and v8 namespace based UUIDs
- OutputType
- PermissionStatus
- Defines the state of a Permission.
- ResponseType
- Indicates which transformation should be applied to the response data.
- ServiceStatus
- Defines the different states a service can be in.
- How the user handled the share-sheet
- StorageCipherAlgorithm
- StorageDirectory
-
Corresponds to constants defined in Androids
android.os.Environment
class. - ValidationMode
- The options for UUID Validation strictness
Mixins
- EquatableMixin
- A mixin that helps implement equality without needing to explicitly override operator == and hashCode.
- OptionsMixin
- The mixin class for options that provides common attributes.
- PdfPreviewActionBounds
- Printing
- Flutter pdf printing library
Extensions
-
ComparatorExtension
on Comparator<
T> - Extensions on comparator functions.
-
FuturePermissionStatusGetters
on Future<
PermissionStatus> -
Utility getter extensions for the
Future<PermissionStatus>
type. -
FutureServiceStatusGetters
on Future<
ServiceStatus> -
Utility getter extensions for the
Future<ServiceStatus>
type. - GetItFacilitatory on GetIt
-
IterableComparableExtension
on Iterable<
T> - Extensions that apply to iterables of Comparable elements.
-
IterableDoubleExtension
on Iterable<
double> - Extension on iterables of double.
-
IterableExtension
on Iterable<
T> - Extensions that apply to all iterables.
-
IterableIntegerExtension
on Iterable<
int> - Extension on iterables of integers.
-
IterableIterableExtension
on Iterable<
Iterable< T> > - Extensions on iterables whose elements are also iterables.
-
IterableNullableExtension
on Iterable<
T?> - Extensions that apply to iterables with a nullable element type.
-
IterableNumberExtension
on Iterable<
num> - Extensions that apply to iterables of numbers.
-
ListComparableExtensions
on List<
E> - Various extensions on lists of comparable elements.
-
ListExtensions
on List<
E> - Various extensions on lists of arbitrary elements.
- PermissionActions on Permission
- Actions that can be executed on a permission.
- PermissionCheckShortcuts on Permission
- Shortcuts for checking the status of a Permission.
-
PermissionListActions
on List<
Permission> - Actions that can be taken on a List of Permissions.
- PermissionStatusGetters on PermissionStatus
- Utility getter extensions for the PermissionStatus type.
- ReadContext on BuildContext
- Exposes the read method.
- SelectContext on BuildContext
-
Adds a
select
method on BuildContext. - ServicePermissionActions on PermissionWithService
- Actions that apply only to permissions that have an associated service.
- ServiceStatusGetters on ServiceStatus
- Utility getter extensions for the ServiceStatus type.
- WatchContext on BuildContext
- Exposes the watch method.
Constants
- defaultDialogTitle → const String
- vg → const VectorGraphicUtilities
- The VectorGraphicUtilities instance.
Properties
- disablePathProviderPlatformOverride ← bool
-
no getter
- document → HtmlDocument
-
Root node for all content in a web page.
no setter
- getIt ↔ GetIt
-
getter/setter pair
- svg → Svg
-
Instance for Svg's utility methods, which can produce a
DrawableRoot
or PictureInfo from String or Uint8List.final - timeDilation → double
-
Slows down animations by this factor to help in development.
no setter
- window → Window
-
Top-level container for a web page, which is usually a browser tab or window.
no setter
Functions
-
binarySearch<
E> (List< E> sortedList, E value, {int compare(E, E)?}) → int -
Returns a position of the
value
insortedList
, if it is there. -
canLaunch(
String urlString) → Future< bool> - Checks whether the specified URL can be handled by some app installed on the device.
-
canLaunchUrl(
Uri url) → Future< bool> - Checks whether the specified URL can be handled by some app installed on the device.
-
closeInAppWebView(
) → Future< void> - Closes the current in-app web view, if one was previously opened by launchUrl.
-
closeWebView(
) → Future< void> - Closes the current WebView, if one was previously opened via a call to launch.
-
compareAsciiLowerCase(
String a, String b) → int -
Compares
a
andb
lexically, converting ASCII letters to lower case. -
compareAsciiLowerCaseNatural(
String a, String b) → int -
Compares strings
a
andb
according to lower-case natural sort ordering. -
compareAsciiUpperCase(
String a, String b) → int -
Compares
a
andb
lexically, converting ASCII letters to upper case. -
compareAsciiUpperCaseNatural(
String a, String b) → int -
Compares strings
a
andb
according to upper-case natural sort ordering. -
compareNatural(
String a, String b) → int -
Compares strings
a
andb
according to natural sort ordering. -
equalsIgnoreAsciiCase(
String a, String b) → bool -
Checks if strings
a
andb
differ only on the case of ASCII letters. -
flutterImageProvider(
ImageProvider< Object> image, {ImageConfiguration? configuration, ImageErrorListener? onError}) → Future<ImageProvider> -
Loads an image from a Flutter
ImageProvider
into anImageProvider
instance -
fontFromAssetBundle(
String key, {AssetBundle? bundle, bool cache = true, PdfBaseCache? pdfCache, bool protect = false}) → Future< TtfFont> - Loads a font from an asset bundle key. If used multiple times with the same font name, it will be included multiple times in the pdf file
-
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.
-
groupBy<
S, T> (Iterable< S> values, T key(S)) → Map<T, List< S> > -
Groups the elements in
values
by the value returned bykey
. -
hashIgnoreAsciiCase(
String string) → int - Hash code for a string which is compatible with equalsIgnoreAsciiCase.
-
imageFromAssetBundle(
String key, {AssetBundle? bundle, bool cache = true, PdfImageOrientation? orientation, double? dpi, PdfBaseCache? pdfCache}) → Future< ImageProvider> - Load an image from an asset bundle key.
-
insertionSort<
E> (List< E> elements, {int compare(E, E)?, int start = 0, int? end}) → void -
Sort a list between
start
(inclusive) andend
(exclusive) using insertion sort. -
lastBy<
S, T> (Iterable< S> values, T key(S)) → Map<T, S> -
Associates the elements in
values
by the value returned bykey
. -
launch(
String urlString, {bool? forceSafariVC, bool forceWebView = false, bool enableJavaScript = false, bool enableDomStorage = false, bool universalLinksOnly = false, Map< String, String> headers = const <String, String>{}, Brightness? statusBarBrightness, String? webOnlyWindowName}) → Future<bool> - Parses the specified URL string and delegates handling of it to the underlying platform.
-
launchUrl(
Uri url, {LaunchMode mode = LaunchMode.platformDefault, WebViewConfiguration webViewConfiguration = const WebViewConfiguration(), BrowserConfiguration browserConfiguration = const BrowserConfiguration(), String? webOnlyWindowName}) → Future< bool> -
Passes
url
to the underlying platform for handling. -
lowerBound<
E> (List< E> sortedList, E value, {int compare(E, E)?}) → int -
Returns the first position in
sortedList
that does not compare less thanvalue
. -
mapMap<
K1, V1, K2, V2> (Map< K1, V1> map, {K2 key(K1, V1)?, V2 value(K1, V1)?}) → Map<K2, V2> -
Creates a new map from
map
with new keys and values. -
maxBy<
S, T> (Iterable< S> values, T orderBy(S), {int compare(T, T)?}) → S? -
Returns the element of
values
for whichorderBy
returns the maximum value. -
mergeMaps<
K, V> (Map< K, V> map1, Map<K, V> map2, {V value(V, V)?}) → Map<K, V> -
Returns a new map with all key/value pairs in both
map1
andmap2
. -
mergeSort<
E> (List< E> elements, {int start = 0, int? end, int compare(E, E)?}) → void -
Sorts a list between
start
(inclusive) andend
(exclusive) using the merge sort algorithm. -
minBy<
S, T> (Iterable< S> values, T orderBy(S), {int compare(T, T)?}) → S? -
Returns the element of
values
for whichorderBy
returns the minimum value. -
networkImage(
String url, {bool cache = true, Map< String, String> ? headers, PdfImageOrientation? orientation, double? dpi, PdfBaseCache? pdfCache}) → Future<ImageProvider> - Download an image from the network.
-
openAppSettings(
) → Future< bool> - Opens the app settings page.
-
pdfDefaultTheme(
) → Future< void> -
reverse<
E> (List< E> elements, [int start = 0, int? end]) → void - Reverses a list, or a part of a list, in-place.
-
shuffle(
List elements, [int start = 0, int? end, Random? random]) → void - Shuffles a list randomly.
-
stronglyConnectedComponents<
T> (Map< T, Iterable< graph) → List<T> >Set< T> > -
Returns the strongly connected components of
graph
, in topological order. -
supportsCloseForLaunchMode(
LaunchMode mode) → Future< bool> -
Returns true if closeInAppWebView is supported for
mode
in the current platform implementation. -
supportsLaunchMode(
LaunchMode mode) → Future< bool> -
Returns true if
mode
is supported by the current platform implementation. -
throwIf(
bool condition, Object error) → void - Two handy functions that help me to express my intention clearer and shorter to check for runtime errors
-
throwIfNot(
bool condition, Object error) → void -
toBeginningOfSentenceCase<
T extends String?> (T input, [String? locale]) → T - Convert a string to beginning of sentence case, in a way appropriate to the locale.
-
transitiveClosure<
T> (Map< T, Iterable< graph) → Map<T> >T, Set< T> > -
Returns the transitive closure of
graph
.
Typedefs
-
BlocBuilderCondition<
S> = bool Function(S previous, S current) -
Signature for the
buildWhen
function which takes the previousstate
and the currentstate
and is responsible for returning a bool which determines whether to rebuild BlocBuilder with the currentstate
. -
BlocListenerCondition<
S> = bool Function(S previous, S current) -
Signature for the
listenWhen
function which takes the previousstate
and the currentstate
and is responsible for returning a bool which determines whether or not to call BlocWidgetListener of BlocListener with the currentstate
. -
BlocWidgetBuilder<
S> = Widget Function(BuildContext context, S state) -
Signature for the
builder
function which takes theBuildContext
andstate
and is responsible for returning a widget which is to be rendered. This is analogous to thebuilder
function in StreamBuilder. -
BlocWidgetListener<
S> = void Function(BuildContext context, S state) -
Signature for the
listener
function which takes theBuildContext
along with thestate
and is responsible for executing in response tostate
changes. -
BlocWidgetSelector<
S, T> = T Function(S state) -
Signature for the
selector
function which is responsible for returning a selected value,T
, based onstate
. -
CustomPdfPagesBuilder
= Widget Function(BuildContext context, List<
PdfPreviewPageData> pages) - Custom widget builder that's used for custom rasterized pdf pages rendering
- DateTimeFormatter = String Function(DateTime time)
- DefaultTransformer = SyncTransformer
- DioError = DioException
- DioError describes the exception info when a request failed.
- DioErrorType = DioExceptionType
- Deprecated in favor of DioExceptionType and will be removed in future major versions.
- DioMediaType = MediaType
-
The type (alias) for specifying the content-type of the
MultipartFile
. -
DisposingFunc<
T> = FutureOr Function(T param) -
Signature for disposing function
because closures like
(x){}
have a return type of Null we don't useFutureOr<void>
-
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.
-
FactoryFunc<
T> = T Function() - Signature of the factory function used by non async factories
-
FactoryFuncAsync<
T> = Future< T> Function() - Signature of the factory function used by async factories
-
FactoryFuncParam<
T, P1, P2> = T Function(P1 param1, P2 param2) -
For Factories that expect up to two parameters if you need only one use
void
for the one you don't use -
FactoryFuncParamAsync<
T, P1, P2> = Future< T> Function(P1 param1, P2 param2) -
For async Factories that expect up to two parameters if you need only one use
void
for the one you don't use -
HeaderForEachCallback
= void Function(String name, List<
String> values) - The signature that iterates header fields.
-
ImageWidgetBuilder
= Widget Function(BuildContext context, ImageProvider<
Object> imageProvider) - Builder function to create an image widget. The function is called after the ImageProvider completes the image loading.
- InterceptorErrorCallback = void Function(DioException error, ErrorInterceptorHandler handler)
- The signature of Interceptor.onError.
- InterceptorSendCallback = void Function(RequestOptions options, RequestInterceptorHandler handler)
- The signature of Interceptor.onRequest.
- InterceptorSuccessCallback = void Function(Response response, ResponseInterceptorHandler handler)
- The signature of Interceptor.onResponse.
- JsonDecodeCallback = FutureOr Function(String)
- The callback definition for decoding a JSON string.
-
JsonEncodeCallback
= FutureOr<
String> Function(Object) - The callback definition for encoding a JSON object.
-
LayoutCallback
= FutureOr<
Uint8List> Function(PdfPageFormat format) - Callback used to generate the Pdf document dynamically when the user changes the page settings: size and margins
- LoadingErrorWidgetBuilder = Widget Function(BuildContext context, String url, Object error)
- Builder function to create an error widget. This builder is called when the image failed loading, for example due to a 404 NotFound exception.
- LogCallback = void Function(LogEvent event)
- OnPdfPreviewActionPressed = void Function(BuildContext context, LayoutCallback build, PdfPageFormat pageFormat)
- Base Action callback
- OutputCallback = void Function(OutputEvent event)
- PlaceholderWidgetBuilder = Widget Function(BuildContext context, String url)
- Builder function to create a placeholder widget. The function is called once while the ImageProvider is loading the image.
- ProgressCallback = void Function(int count, int total)
- The type of a progress listening callback when sending or receiving data.
- ProgressIndicatorBuilder = Widget Function(BuildContext context, String url, DownloadProgress progress)
- Builder function to create a progress indicator widget. The function is called every time a chuck of the image is downloaded from the web, but at least once during image loading.
-
RequestEncoder
= FutureOr<
List< Function(String request, RequestOptions options)int> > - The type of a request encoding callback.
-
ResponseDecoder
= FutureOr<
String?> Function(List<int> responseBytes, RequestOptions options, ResponseBody responseBody) - The type of a response decoding callback.
- ScopeDisposeFunc = FutureOr Function()
- Signature for disposing function on scope level
- ValidateStatus = bool Function(int? status)
- The type of a response status code validate callback.
Exceptions / Errors
- DioException
- DioException describes the exception info when a request failed.
- MissingPlatformDirectoryException
- An exception thrown when a directory that should always be available on the current platform cannot be obtained.
-
NotNullableError<
T> -
A TypeError thrown by
_checkNotNullable
. - ProviderNotFoundException
-
The error that will be thrown if
Provider.of
fails to find aProvider
as an ancestor of the BuildContext used. - WaitingTimeOutException