extensions_flutter library

To use, import package:extensions_flutter/extensions_flutter.dart

Classes

ApplicationLifetime
Allows consumers to perform cleanup during a graceful shutdown.
AsyncDisposable
Provides a mechanism for releasing unmanaged resources asynchronously.
BackgroundService
Base class for implementing a long running HostedService.
CallbackNode
All of the state associated a registered callback, in a node that's part of a linked list of registered callbacks.
CancellationCallbackInfo
CancellationChangeToken
A ChangeToken implementation using CancellationToken.
CancellationToken
Propagates notification that operations should be canceled.
CancellationTokenRegistration
CancellationTokenSource
Signals to a CancellationToken that it should be canceled.
ChainedConfigurationProvider
Chained implementation of ConfigurationProvider.
ChainedConfigurationSource
Represents a chained Configuration as an ConfigurationSource.
ChangeToken
Propagates notifications that a change has occurred.
CommandLineConfigurationProvider
A command line based ConfigurationProvider.
CommandLineConfigurationSource
Represents command line arguments as an ConfigurationSource.
CompositeChangeToken
An ChangeToken which represents one or more ChangeToken instances.
Configuration
Represents a set of key/value application configuration properties.
ConfigurationBuilder
Represents a type used to build application configuration.
ConfigurationBuilderProperties
ConfigurationChangeTokenSource<TOptions>
Creates ChangeTokens so that OptionsMonitor gets notified when Configuration changes.
ConfigurationManager
ConfigurationManager is a mutable configuration object. It is both an ConfigurationBuilder and an ConfigurationRoot. As sources are added, it updates its current view of configuration.
ConfigurationPath
Utility methods and constants for manipulating Configuration paths
ConfigurationProvider
Provides configuration key/values for an application.
ConfigurationReloadToken
Implements ChangeToken.
ConfigurationRoot
Represents the root of an Configuration hierarchy.
ConfigurationSection
Represents a section of application configuration values.
ConfigurationSource
Represents a source of configuration key/values for an application.
ConfigurationSources
ConfigureContainerAdapter<TContainerBuilder>
ConfigureNamedOptions<TOptions>
Represents something that configures the TOptions type.
ConfigureOptions<TOptions>
Represents something that configures the TOptions type. Note: These are run before all PostConfigureOptions.
ConsoleLogger
A logger that writes messages in the debug output window only when a debugger is attached.
ConsoleLoggerProvider
The provider for the ConsoleLogger.
DebugLogger
A logger that writes messages in the debug output window only when a debugger is attached.
DebugLoggerProvider
The provider for the DebugLogger.
DefaultLoggerLevelConfigureOptions
Disposable
Provides a mechanism for releasing unmanaged resources.
Environments
Commonly used environment names.
EventId
Identifies a logging event.
FlutterApplicationLifetime
Allows consumers to be notified of application lifetime events.
FlutterBuilder
An interface for configuring Flutter.
FlutterLifecycleObserver
Widget used to monitor lifecycle event changes
FlutterLifetime<TApp extends Widget>
Host
A program abstraction.
HostApplicationBuilder
A builder for hosted applications and services which helps manage configuration, logging, lifetime and more.
HostApplicationBuilderSettings
Settings for constructing an HostApplicationBuilder.
HostApplicationLifetime
Allows consumers to be notified of application lifetime events. This interface is not intended to be user-replaceable.
HostBuilder
A program initialization abstraction.
HostBuilderAdapter
HostBuilderContext
Context containing the common services on the Host. Some properties may be null until set by the Host.
HostedService
Defines methods for objects that are managed by the host.
HostEnvironment
Provides information about the hosting environment an application is running in.
HostingEnvironment
HostLifetime
IServiceFactoryAdapter
JsonConfigurationParser
JsonConfigurationProvider
A JSON based ConfigurationProvider.
JsonConfigurationSource
LinkedNCancellationTokenSource
Logger
Represents a type used to perform logging.
LoggerFactory
Represents a type used to configure the logging system and create instances of Logger from the registered LoggerProviders.
LoggerFactoryOptions
The options for a LoggerFactory.
LoggerFilterOptions
The options for a LoggerFilter.
LoggerProvider
Represents a type that can create instances of Logger.
LoggingBuilder
An interface for configuring logging providers.
MemoryConfigurationProvider
In-memory implementation of ConfigurationProvider
MemoryConfigurationSource
Represents in-memory data as an ConfigurationSource.
NullLogger
Minimalistic logger that does nothing.
NullLoggerFactory
An LoggerFactory used to create instance of NullLogger that logs nothing.
Options<TOptions>
Used to retrieve configured TOptions instances.
OptionsChangeTokenSource<TOptions>
Used to fetch ChangeToken used for tracking options changes.
OptionsFactory<TOptions>
Used to create TOptions instances.
OptionsMonitor<TOptions>
Used for notifications when TOptions instances change.
OptionsMonitorCache<TOptions>
Used by OptionsMonitor to cache TOptions instances.
OptionsSnapshot<TOptions>
Used to access the value of TOptions for the lifetime of a request.
PostConfigureOptions<TOptions>
Represents something that configures the TOptions type.
Registrations
Set of all the registrations in the token source.
Scope
ServiceCollection
Specifies the contract for a collection of service descriptors.
ServiceDescriptor
Describes a service with its service type, implementation, and lifetime.
ServiceFactoryAdapter<TContainerBuilder>
ServiceProvider
Defines a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.
ServiceProviderFactory<TContainerBuilder>
Provides an extension point for creating a container specific builder and an ServiceProvider.
ServiceProviderOptions
Options for configuring various behaviors of the default ServiceProvider implementation.
ServiceScopeFactory
A factory for creating instances of ServiceScope, which is used to create services within a scope.
StaticFilterOptionsMonitor
StreamConfigurationProvider
Stream based configuration provider
StreamConfigurationSource
Stream based ConfigurationSource.
ValidateOptions<TOptions>
Interface used to validate options.
ValidateOptions0<TOptions>
Implementation of ValidateOptions<TOptions>
ValidateOptions1<TOptions, TDep>
ValidateOptions2<TOptions, TDep1, TDep2>
ValidateOptions3<TOptions, TDep1, TDep2, TDep3>
ValidateOptions4<TOptions, TDep1, TDep2, TDep3, TDep4>
ValidateOptions5<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5>
ValidateOptionsResult
Represents the result of an options validation.

Enums

LogLevel
ServiceLifetime
Specifies the lifetime of a service in a ServiceCollection.

Mixins

ConfigurationProviderMixin
Provides configuration key/values for an application.

Extensions

ChainedBuilderExtensions on ConfigurationBuilder
Extension methods for adding Configuration to an ConfigurationBuilder.
CommandLineConfigurationExtensions on ConfigurationBuilder
Extension methods for registering CommandLineConfigurationProvider with ConfigurationBuilder.
ConfigurationExtensions on Configuration
Extension methods for configuration classes.
ConfigurationRootExtensions on ConfigurationRoot
Extension methods for ConfigurationRoot.
ConfigurationSectionExtensions on ConfigurationSection
Extension methods for configuration section classes.
ConsoleLoggerFactoryExtensions on LoggingBuilder
Extension methods for the LoggerFactory class.
DebugLoggerFactoryExtensions on LoggingBuilder
Extension methods for the LoggerFactory class.
FilterLoggingBuilderExtensions on LoggingBuilder
Extension methods for setting up logging services in an ServiceCollection.
FlutterBuilderExtensions on FlutterBuilder
Registers a builder callback that wraps the the root application widget.
FlutterHostExtensions on Host
FlutterLifecycleObserverBuilder on FlutterBuilder
Adds Flutter lifecycle monitoring.
FlutterServiceCollectionExtensions on ServiceCollection
Extension methods for adding and setting up Flutter.
HostEnvironmentEnvExtensions on HostEnvironment
Extension methods for HostEnvironment.
HostingAbstractionsHostBuilderExtensions on HostBuilder
HostingAbstractionsHostExtensions on Host
HostingEnvironmentExtensions on HostingEnvironment
HostingHostBuilderExtensions on HostBuilder
InternalConfigurationRootExtensions on ConfigurationRoot
Extensions method for ConfigurationRoot.
JsonConfigurationExtensions on ConfigurationBuilder
Extension methods for adding JsonConfigurationProvider.
LoggerExtensions on Logger
LoggerFactoryExtensions on LoggerFactory
LoggerFactory extension methods for common scenarios.
LoggerFilterOptionsExtensions on LoggerFilterOptions
LoggingBuilderExtensions on LoggingBuilder
Extension methods for setting up logging services in a LoggingBuilder.
LoggingServiceCollectionExtensions on ServiceCollection
Extension methods for setting up logging services in a ServiceCollection.
LogLevelExtensions on LogLevel
MemoryConfigurationBuilderExtensions on ConfigurationBuilder
ConfigurationBuilder extension methods for the MemoryConfigurationProvider.
OptionsBuilderExtensions on OptionsBuilder<TOptions>
OptionsServiceCollectionExtensions on ServiceCollection
Extension methods for adding options services to the DI container.
ServiceCollectionContainerBuilderExtensions on ServiceCollection
Extension methods for building a ServiceProvider from a ServiceCollection.
ServiceCollectionDescriptorExtensions on ServiceCollection
Extension methods for adding and removing services to an ServiceCollection.
ServiceCollectionHostedServiceExtensions on ServiceCollection
ServiceCollectionServiceExtensions on ServiceCollection
Extension methods for adding services to a ServiceCollection.
ServiceProviderExtensions on ServiceProvider
Convenience methods for ServiceProvider.
ServiceProviderServiceExtensions on ServiceProvider
Extension methods for getting services from a ServiceProvider.
ServiceScopeFactoryExtensions on ServiceScopeFactory
Extension methods for getting services from a ServiceScopeFactory.

Properties

applicationKey String
The configuration key used to set the application name.
getter/setter pair
contentRootKey String
The configuration key used to set the content root.
getter/setter pair
environmentKey String
The configuration key used to set the environment.
getter/setter pair

Functions

configurationKeyComparator(String? x, String? y) int
createApplicationBuilder({HostApplicationBuilderSettings? settings}) HostApplicationBuilder
createDefaultBuilder([List<String>? args]) HostBuilder
Initializes a new instance of the HostBuilder class with pre-configured defaults.
createHostingEnvironment(Configuration hostConfiguration) HostEnvironment
populateServiceCollection(ServiceCollection services, HostBuilderContext hostBuilderContext, HostEnvironment hostingEnvironment, Configuration appConfiguration, ServiceProvider serviceProviderGetter()) → void
resolveContentRootPath(String? contentRootPath, String basePath) String
resolveHost(ServiceProvider serviceProvider) Host

Typedefs

CategoryLevelFilterAction = bool Function(String? category, LogLevel level)
ConfigureAction = void Function(FlutterBuilder builder)
ConfigureAppConfigurationDelegate = void Function(HostBuilderContext context, ConfigurationBuilder configuration)
ConfigureContainerAdapterDelegate<TContainerBuilder> = void Function(HostBuilderContext hostContext, TContainerBuilder containerBuilder)
ConfigureContainerDelegate<TContainerBuilder> = TContainerBuilder Function(HostBuilderContext context, TContainerBuilder builder)
ConfigureHostConfigurationDelegate = void Function(ConfigurationBuilder configuration)
ConfigureLoggerFactoryOptions = void Function(LoggerFactoryOptions options)
ConfigureLoggingBuilder = void Function(LoggingBuilder builder)
ConfigureOptionsAction1 = void Function(LoggerFilterOptions options)
ConfigureServicesDelegate = void Function(HostBuilderContext context, ServiceCollection services)
ContextResolver = HostBuilderContext? Function()
FactoryResolver<TContainerBuilder> = ServiceProviderFactory<TContainerBuilder> Function(HostBuilderContext hostContext)
FilterAction = bool Function(String provider, String category, LogLevel level)
FlutterAppBuilder = Widget Function(ServiceProvider services, Widget child)
ImplementationFactory = Object Function(ServiceProvider services)
LevelFilterAction = bool Function(LogLevel level)
LogFormatter<TState> = String Function(TState state, Object? error)
Function to create a String message of the state and exception.
ServiceProviderFactoryDelegate<TContainerBuilder> = ServiceProviderFactory<TContainerBuilder> Function(HostBuilderContext? context)
TimerCallback = void Function(Object? state)
ValidationCallback0<TOptions> = bool Function(TOptions options)
ValidationCallback1<TOptions, TDep> = bool Function(TOptions options, TDep dependency)
ValidationCallback2<TOptions, TDep1, TDep2> = bool Function(TOptions options, TDep1 dependency1, TDep2 dependency2)
ValidationCallback3<TOptions, TDep1, TDep2, TDep3> = bool Function(TOptions options, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3)
ValidationCallback4<TOptions, TDep1, TDep2, TDep3, TDep4> = bool Function(TOptions options, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4)
ValidationCallback5<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5> = bool Function(TOptions options, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4, TDep5 dependency5)
VoidCallback = void Function()