Core Flutter framework primitives.
The features defined in this library are the lowest-level utility classes and functions used by all the other layers of the Flutter framework.
Constants
- checked → _Checked
-
Used to annotate a parameter of an instance method that overrides another method.
const _Checked()
- kMaxUnsignedSMI → int
-
The largest SMI value.
0x3FFFFFFFFFFFFFFF
- mustCallSuper → _MustCallSuper
-
Used to annotate an instance method
m
. Indicates that every invocation of a method that overridesm
must also invokem
. In addition, every method that overridesm
is implicitly annotated with this same annotation.const _MustCallSuper()
- optionalTypeArgs → _OptionalTypeArgs
-
Used to annotate a class declaration
C
. Indicates that any type arguments declared onC
are to be treated as optional. Tools such as the analyzer and linter can use this information to suppress warnings that would otherwise require type arguments to be provided for instances ofC
.const _OptionalTypeArgs()
- protected → _Protected
-
Used to annotate an instance member (method, getter, setter, operator, or field)
m
in a classC
. If the annotation is on a field it applies to the getter, and setter if appropriate, that are induced by the field. Indicates thatm
should only be invoked from instance methods ofC
or classes that extend, implement or mix inC
, either directly or indirectly. Additionally indicates thatm
should only be invoked onthis
, whether explicitly or implicitly.const _Protected()
- required → Required
-
Used to annotate a named parameter
p
in a method or functionf
. Indicates that every invocation off
must include an argument corresponding top
, despite the fact thatp
would otherwise be an optional parameter.const Required()
Typedefs
-
DebugPrintCallback(
String message, { int wrapWidth }) → void -
Signature for debugPrint implementations.
-
FlutterExceptionHandler(
FlutterErrorDetails details) → void -
Signature for
FlutterError.onException
handler. -
InformationCollector(
StringBuffer information) → void -
Signature for FlutterErrorDetails.informationCollector callback and other callbacks that collect information into a string buffer.
-
IterableFilter(
Iterable<T> input) → Iterable<T> -
Signature for callbacks that filter an iterable.
-
LicenseEntryCollector(
) → Stream<LicenseEntry> -
Signature for callbacks passed to LicenseRegistry.addLicense.
-
ServiceExtensionCallback(
Map<String, String> parameters) → Future<Map<String, dynamic>> -
Signature for service extensions.
-
ValueChanged(
T value) → void -
Signature for callbacks that report that an underlying value has changed.
-
ValueGetter(
) → T -
Signature for callbacks that are to report a value on demand.
-
ValueSetter(
T value) → void -
Signature for callbacks that report that a value has been set.
-
VoidCallback(
) → void -
Signature of callbacks that have no arguments and return no data.
Properties
- debugPrint → DebugPrintCallback
-
Prints a message to the console, which you can access using the "flutter" tool's "logs" command ("flutter logs").
read / write - defaultTargetPlatform → TargetPlatform
-
The
TargetPlatform
that matches the platform on which the framework is currently executing.read-only
Functions
-
debugPrintStack(
{String label, int maxFrames }) → void -
Dump the current stack to the console using debugPrint and FlutterError.defaultStackFilter.
-
debugPrintSynchronously(
String message, { int wrapWidth }) → void -
Alternative implementation of debugPrint that does not throttle. Used by tests.
-
debugPrintThrottled(
String message, { int wrapWidth }) → void -
Implementation of debugPrint that throttles messages. This avoids dropping messages on platforms that rate-limit their logging (for example, Android).
-
debugWordWrap(
String message, int width, { String wrapIndent: '' }) → Iterable<String> -
Wraps the given string at the given width.
Enums
- TargetPlatform
-
The platform that user interaction should adapt to target.
Classes
- BindingBase
-
Base class for mixins that provide singleton services (also known as "bindings").
- BitField
-
A BitField over an enum (or other class whose values implement "index"). Only the first 62 values of the enum can be used as indices.
- CachingIterable
-
A lazy caching version of Iterable.
- ChangeNotifier
-
A class that can be extended or mixed in that provides a change notification API using VoidCallback for notifications.
- FlutterErrorDetails
-
Class for information provided to FlutterExceptionHandler callbacks.
- LicenseEntry
-
A license that covers part of the application's software or assets, to show in an interface such as the
LicensePage
. - LicenseEntryWithLineBreaks
-
Variant of LicenseEntry for licenses that separate paragraphs with blank lines and that hard-wrap text within paragraphs. Lines that begin with one or more space characters are also assumed to introduce new paragraphs, unless they start with the same number of spaces as the previous line, in which case it's assumed they are a continuation of an indented paragraph.
- LicenseParagraph
-
A string that represents one paragraph in a LicenseEntry.
- LicenseRegistry
-
A registry for packages to add licenses to, so that they can be displayed together in an interface such as the
LicensePage
. - Listenable
-
An object that maintains a list of listeners.
- SynchronousFuture
-
A Future whose then implementation calls the callback immediately.
Exceptions / Errors
- FlutterError
-
Error class used to report Flutter-specific assertion failures and contract violations.