graphx library
GraphX is a powerful 2D graphics library for creating custom drawings, animations, charts, and visualizations in Flutter.
It provides a flexible and customizable framework for building a wide range of visualizations with ease. Whether you want to create a simple line drawing or a complex game, GraphX has got you covered.
GraphX is inspired by the Flash API and offers a similar development experience for Flutter developers. It uses the Canvas API exposed by the SKIA engine through CustomPainter and provides a framework for running isolated from the Widget's world.
To get started, simply create a SceneBuilderWidget widget, assign your Scene and add your custom drawings or animations to it.
You can also use GraphX to create charts, graphs, and other visualizations with ease.
You can also find sample code and prototypes on the GraphX repo. Also check out the GraphX gallery for more examples.
To use GraphX in your Flutter app, simply add it to your dependencies in
pubspec.yaml
. For example:
dependencies:
graphx: any
Then, import the library and create a new SceneBuilderWidget widget:
import 'package:graphx/graphx.dart';
class MyScene extends GSprite {
@override
void addedToStage() {
var circle = addChild(GShape());
circle.graphics.beginFill(Colors.purple).drawCircle(0, 0, 20).endFill();
circle.x = 20;
circle.y = 20;
// Add your custom drawings or animations here.
}
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SizedBox.expand(
child: SceneBuilderWidget(
builder: () => SceneController(front: MyScene()),
),
),
),
);
}
}
This will create a new Flutter app with a GraphX scene that you can customize as needed. It will create a Shape, draw a purple circle and position it at coordinates (20, 20).
Classes
- AbstractNode
- Deprecated. Unused by the framework and will be removed in a future version of Flutter. If needed, inline any required functionality of this class directly in the subclass.
- AggregatedTimedBlock
- Aggregates multiple TimedBlock objects that share a name.
- AggregatedTimings
- Provides aggregated results for timings collected by FlutterTimeline.
- AndroidMotionEvent
- A Dart version of Android's MotionEvent.
- AndroidPointerCoords
- Position information for an Android pointer.
- AndroidPointerProperties
- Properties of an Android pointer.
- AndroidViewController
- Controls an Android view that is composed using a GL texture.
- AppKitViewController
- Controller for a macOS platform view.
- ApplicationSwitcherDescription
- Specifies a description of the application that is pertinent to the embedder's application switcher (also known as "recent tasks") user interface.
- AssetBundle
- A collection of resources used by the application.
- AssetManifest
- Contains details about available assets and their variants. See Resolution-aware image assets to learn about asset variants and how to declare them.
- AssetMetadata
- Contains information about an asset.
- AutofillClient
- An object that represents an autofillable input field in the autofill workflow.
- AutofillConfiguration
- A collection of autofill related information that represents an AutofillClient.
- AutofillHints
- A collection of commonly used autofill hint strings on different platforms.
- AutofillScope
- An ordered group within which AutofillClients are logically connected.
- BackgroundIsolateBinaryMessenger
- A BinaryMessenger for use on background (non-root) isolates.
-
BasicMessageChannel<
T> - A named channel for communicating with platform plugins using asynchronous message passing.
- BinaryCodec
- MessageCodec with unencoded binary messages represented using ByteData.
- BinaryMessenger
- A messenger which sends binary data across the Flutter platform barrier.
- BindingBase
- Base class for mixins that provide singleton services.
-
BitField<
T extends dynamic> - 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.
- BrowserContextMenu
- Controls the browser's context menu on the web platform.
- ByteData
- A fixed-length, random-access sequence of bytes that also provides random and unaligned access to the fixed-width integers and floating point numbers represented by those bytes.
- CachingAssetBundle
- An AssetBundle that permanently caches string and structured resources that have been fetched.
-
CachingIterable<
E> - A lazy caching version of Iterable.
- CallbackParams
- An object that encapsulates the arguments passed to a callback function.
- Category
- A category with which to annotate a class, for documentation purposes.
- ChangeNotifier
- A class that can be extended or mixed in that provides a change notification API using VoidCallback for notifications.
- ChannelBuffers
- The buffering and dispatch mechanism for messages sent by plugins on the engine side to their corresponding plugin code on the framework side.
- CharacterBoundary
-
A TextBoundary subclass for retrieving the range of the grapheme the given
position
is in. - Clipboard
- Utility methods for interacting with the system's clipboard.
- ClipboardData
- Data stored on the system clipboard.
- Color
- An immutable 32 bit color value in ARGB format.
- ColorMatrix
- Port of AS3, grant skinner class. https://blog.gskinner.com/archives/2007/12/colormatrix_cla.html A utility class for working with color matrices. It can be used to adjust the brightness, contrast, saturation, and hue of an image. can be used in a custom Color Filter.
- ColorUtils
- A utility class for working with colors.
- CommonTweenWraps
- Contains static methods that return a map of properties and accessors for tweening a GDisplayObject. Common tweenable wrappers for GraphX
- ContextUtils
- A utility class for handling BuildContext related operations.
- DarwinPlatformViewController
- Base class for iOS and macOS view controllers.
- DefaultProcessTextService
- The service used by default for the text processing feature.
- DefaultSpellCheckService
- The service used by default to fetch spell check results for text input.
- DeferredComponent
- Manages the installation and loading of deferred components.
-
DiagnosticableNode<
T extends Diagnosticable> - DiagnosticsNode that lazily calls the associated Diagnosticable value to implement getChildren and getProperties.
- DiagnosticableTree
- A base class for providing string and DiagnosticsNode debug representations describing the properties and children of an object.
- DiagnosticableTreeNode
- DiagnosticsNode for an instance of DiagnosticableTree.
- DiagnosticPropertiesBuilder
- Builder to accumulate properties and configuration used to assemble a DiagnosticsNode from a Diagnosticable object.
- DiagnosticsBlock
- DiagnosticsNode that exists mainly to provide a container for other diagnostics that typically lacks a meaningful value of its own.
- DiagnosticsNode
- Defines diagnostics data for a value.
-
DiagnosticsProperty<
T> -
Property with a value of type
T
. - DiagnosticsSerializationDelegate
- A delegate that configures how a hierarchy of DiagnosticsNodes should be serialized.
- DiagnosticsStackTrace
- Diagnostic with a StackTrace value suitable for displaying stack traces as part of a FlutterError object.
- DisplayBoundsDebugger
-
A utility class for debugging and rendering the bounding boxes of
GDisplayObject
instances. TheDisplayBoundsDebugger
can be used to render the bounding boxes of display objects whendebugBounds
is enabled on them. - DisplayShader
- Utility wrapper for FragmentShader.
- DocumentationIcon
- A class annotation to provide a URL to an image that represents the class.
- DocumentBoundary
- A text boundary that uses the entire document as logical boundary.
- DoubleProperty
- Property describing a double value with an optional unit of measurement.
- Endian
- Describes endianness to be used when accessing or updating a sequence of bytes.
-
EnumProperty<
T extends Enum?> - DiagnosticsProperty that has an Enum as value.
- ErrorDescription
- An explanation of the problem and its cause, any information that may help track down the problem, background information, etc.
- ErrorHint
- An ErrorHint provides specific, non-obvious advice that may be applicable.
- ErrorSpacer
- An ErrorSpacer creates an empty DiagnosticsNode, that can be used to tune the spacing between other DiagnosticsNode objects.
- ErrorSummary
- A short (one line) description of the problem that was detected.
- EventChannel
- A named channel for communicating with platform plugins using event streams.
-
EventSignal<
T> -
A signal that can be dispatched to multiple listeners, with data of type
T
. - ExpensiveAndroidViewController
- Controls an Android view that is composed using the Android view hierarchy. This controller is created from the PlatformViewsService.initExpensiveAndroidView factory.
-
Factory<
T> - A factory interface that also reports the type of the created objects.
- FilteringTextInputFormatter
- A TextInputFormatter that prevents the insertion of characters matching (or not matching) a particular pattern, by replacing the characters with the given replacementString.
- FlagProperty
- Property where the description is either ifTrue or ifFalse depending on whether value is true or false.
-
FlagsSummary<
T> - A summary of multiple properties, indicating whether each of them is present (non-null) or absent (null).
- Float32List
- A fixed-length list of IEEE 754 single-precision binary floating-point numbers that is viewable as a TypedData.
- Float64List
- A fixed-length list of IEEE 754 double-precision binary floating-point numbers that is viewable as a TypedData.
- FlutterErrorDetails
- Class for information provided to FlutterExceptionHandler callbacks.
- FlutterMemoryAllocations
- An interface for listening to object lifecycle events.
- FlutterTimeline
- Measures how long blocks of code take to run.
- FontLoader
- A class that enables the dynamic loading of fonts at runtime.
- FontWeight
- The thickness of the glyphs used to draw the text.
- GBaseFilter
- This is the base filter class for all filters in the GraphX library. A filter is a graphical effect that modifies the appearance of a display object.
- GBitmap
- A class that represents a bitmap image that can be displayed on the screen.
- GBlurFilter
- A filter that applies a blur effect to the content.
- GColorFilters
- A collection of predefined color filter effects.
- GColorMatrixFilter
- A color matrix filter that applies a ColorFilter effect to the content.
- GComposerFilter
- A base class for filters that modify the appearance of content.
- GDisplayObject
- An abstract class that represents a display object in GraphX.
- GDisplayObjectContainer
- The base class for a display object that can contain child GDisplayObjects. A display object container is a display object that can contain other display objects as children. It renders its children in the order in which they are added.
- GDropShadowFilter
- A filter that applies a drop shadow effect to the target display object.
- GEase
- A collection of predefined easing functions that can be used with GTween.
- GIcon
- A display object that renders an icon from the IconData class. It supports customizing the size, color, and font family of the icon.
- GifAtlas
- Represents a Gif animation in the form of a texture atlas, which contains a list of frames.
- GifFrame
- Represents a single frame of a GIF animation.
- GKeyboard
- This class provides utility methods to work with keyboard events.
- GLFWKeyHelper
- Helper class that uses GLFW-specific key mappings.
- GlowFilter
- A filter that applies a glow effect to an object. This filter is similar to a GDropShadowFilter with a BlurStyle.outer MaskFilter applied.
- GMatrix
- Represents a 2D affine transformation matrix that can be used to manipulate graphical elements, such as lines, rectangles, paths, and bitmaps.
- GMouse
-
"Static" class for managing system mouse cursors.
Accessible from
pointer_manager.dart
- GMovieClip
- A GMovieClip is a graphical element that allows you to play a sequence of textures (frames) in a loop. You can control the speed of playback and set the starting and ending frames. The movie clip can be set to loop or stop after a certain number of frames have been played.
- GPoint
- The GPoint object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.
- Graphics
- A class representing graphics, shapes, and vector drawings that can be rendered by Flutter.
- GraphicsClipper
- Custom Clipper that uses Graphics API instead of Path. For ClipPath Widget.
- GraphicsDrawingData
- Data class that holds information about a graphic element's drawing data.
- GRect
- A GRect represents a rectangular area in 2D space, with a position (x, y) and a size (width, height).
- GRectCornerRadius
- Represents a set of corner radii for a rounded rectangle. This class is used internally to build a rounded rectangle by specifying different radii for each of its corners.
- GShape
- The GShape class represents a display object that can be used to draw vector graphics using the Graphics class. It extends the GDisplayObject so is renders on screen.
- GSimpleParticle
- A particle used in a GSimpleParticleSystem. This class is used internally by the GSimpleParticleSystem class and is not intended for direct usage.
- GSimpleParticleSystem
- A simple particle system that emits particles based on given parameters.
- GSprite
- The GSprite class represents a display object that can be used to draw vector graphics (using the internal Graphics ckass) and can also contain child display objects.
- GSubTexture
- Represents a sub-texture or a sub-region of a texture.
- GSvgShape
- A display object that renders an SVG image.
- GText
- A display object representing a text element that can be added to the display list.
- GTexture
- Represents a 2D texture or image that can be used for rendering.
- GTextureAtlas
- Represents a texture atlas, which is a collection of sub-textures that can be used for rendering 2D graphics efficiently. A GTextureAtlas is composed of a single image file and an optional data file that describes the sub-texture regions and other properties to be rendered.
- GTicker
-
GTicker provides a way to schedule callbacks that will be executed on
every frame. In GraphX, GTicker is used at the core to update the
DisplayObject tree and the inner Ticker that runs it, also invalidates the
rendering for the CustomPainter through the ScenePainter when
SceneConfig.autoUpdateRender, is
true
. - GtkKeyHelper
- Helper class that uses GTK-specific key mappings.
- GTween
- GTween is a simple and flexible animation library for GraphX.
- GTweenableBlur
- A GTweenable class for GBlurFilter objects. The properties of the GBlurFilter that can be tweened are blurX and blurY.
- GTweenableColor
- / --------------------------------------------------------------------------- A class that wraps a Color object and makes it animatable with GTween.
- GTweenableDisplayObject
- A GTweenable implementation for a GDisplayObject.
- GTweenableDouble
- / --------------------------------------------------------------------------- An implementation of GTweenable for double values.
- GTweenableDropShadowFilter
- / --------------------------------------------------------------------------- A GTweenable class for GDropShadowFilter objects. The properties of the GDropShadowFilter that can be tweened are blurX, blurY, angle, distance and color.
- GTweenableGlowFilter
- / --------------------------------------------------------------------------- A GTweenable class for GlowFilter objects. The properties of the GlowFilter that can be tweened are color, blurX, blurY.
- GTweenableInt
- / --------------------------------------------------------------------------- The GTweenableInt class is used as a mixin to provide the ability to animate a single integer value. It wraps a single int value to be used by the GTween class and implements the necessary methods to make it animatable.
- GTweenableList
- / --------------------------------------------------------------------------- A class that wraps a List to be tweenable using GTween.
- GTweenableMap
- / --------------------------------------------------------------------------- GTweenableMap is a class that implements GTweenable for Map<String, dynamic> objects.
- GTweenablePoint
- A class that wraps a GPoint object and makes it animatable with GTween.
- GTweenableRect
- / --------------------------------------------------------------------------- A class that wraps a GRect object and makes it animatable with GTween.
- GTweenLerpColor
- A GTweenLerpProp subclass that implements a linear interpolation function for Color objects.
-
GTweenLerpProp<
T> - Base class representing a property to be animated by GTween.
- GVars
- (Internal usage)
- HapticFeedback
- Allows access to the haptic feedback interface on the device.
- HardwareKeyboard
- Manages key events from hardware keyboards.
-
HashedObserverList<
T> - A list optimized for the observer pattern, but for larger numbers of observers.
- HttpClientResponse
- HTTP response for a client connection.
- ImmutableBuffer
- A handle to a read-only byte buffer that is managed by the engine.
- InputConverter
- A class that converts various input events into PointerEventData or KeyboardEventData to be processed by PointerManager or KeyboardManager.
- Int32List
- A fixed-length list of 32-bit signed integers that is viewable as a TypedData.
- Int64List
- A fixed-length list of 64-bit signed integers that is viewable as a TypedData.
- IntProperty
- An int valued property with an optional unit the value is measured in.
-
IterableProperty<
T> -
Property with an
Iterable<T>
value that can be displayed with different DiagnosticsTreeStyle for custom rendering. - JSONMessageCodec
- MessageCodec with UTF-8 encoded JSON messages.
- JSONMethodCodec
- MethodCodec with UTF-8 encoded JSON method calls and result envelopes.
- Key
- A Key is an identifier for Widgets, Elements and SemanticsNodes.
- KeyboardEventData
- A class representing keyboard event data.
- KeyboardInsertedContent
- A class representing rich content (such as a PNG image) inserted via the system input method.
- KeyboardKey
- A base class for all keyboard key types.
-
KeyboardManager<
T extends KeyboardEventData> - A class that manages keyboard input events and provides signals for when a key is pressed or released.
- KeyData
- Information about a key event.
- KeyDownEvent
- An event indicating that the user has pressed a key down on the keyboard.
- KeyEvent
- Defines the interface for keyboard key events.
- KeyEventManager
- A singleton class that processes key messages from the platform and dispatches converted messages accordingly.
- KeyHelper
- Abstract class for window-specific key mappings.
- KeyMessage
- The assembled information converted from a native key message.
- KeyRepeatEvent
- An event indicating that the user has been holding a key on the keyboard and causing repeated events.
- KeyUpEvent
- An event indicating that the user has released a key on the keyboard.
- LayoutUtils
- Utility class for layout operations in GraphX.
- LengthLimitingTextInputFormatter
- A TextInputFormatter that prevents the insertion of more characters than allowed.
- 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.
- LineBoundary
-
A TextBoundary subclass for locating closest line breaks to a given
position
. - Listenable
- An object that maintains a list of listeners.
- ListUtils
- A utility class for performing various operations on lists of GDisplayObjects.
- LiveText
- Utility methods for interacting with the system's Live Text.
- LocalKey
- A key that is not a GlobalKey.
- LogicalKeyboardKey
- A class with static values that describe the keys that are returned from RawKeyEvent.logicalKey.
- Math
- The Math class provides a collection of common mathematical constants, functions and utilities, inspired by the dart:math library. This class provides additional functionality, such as methods for generating pseudo-random values and a function for mapping a value from one range to another.
- MathUtils
- A collection of static utility methods for mathematical operations.
- Matrix4
- 4D Matrix. Values are stored in column major order.
- MatrixUtils
- Utility class for matrix transformation operations.
-
MessageCodec<
T> - A message encoding/decoding mechanism.
- MessageProperty
- Debugging message displayed like a property.
- MethodCall
- A command object representing the invocation of a named method.
- MethodChannel
- A named channel for communicating with platform plugins using asynchronous method calls.
- MethodCodec
- A codec for method calls and enveloped results.
- MouseCursor
- An interface for mouse cursor definitions.
- MouseCursorManager
- Maintains the state of mouse cursors and manages how cursors are searched for.
- MouseCursorSession
- Manages the duration that a pointing device should display a specific mouse cursor.
- MouseInputData
- Data class that contains information about a mouse event.
- MouseTrackerAnnotation
- The annotation object used to annotate regions that are interested in mouse movements.
- MPS
- A publish-subscribe event system that allows communication between different parts of an application.
-
MPSBuilder<
T> - MPSBuilder allows you to subscribe to multiple MinPubSub topics.
-
MPSEvent<
T> - Model object passed as the second argument in MPSFunctionBuilder.
- NetworkAssetBundle
- An AssetBundle that loads resources over the network.
- ObjectCreated
- An event that describes creation of an object.
- ObjectDisposed
- An event that describes disposal of an object.
- ObjectEvent
- A lifecycle event of an object.
-
ObjectFlagProperty<
T> - A property where the important diagnostic information is primarily whether the value is present (non-null) or absent (null), rather than the actual value of the property itself.
-
ObserverList<
T> - A list optimized for the observer pattern when there are small numbers of observers.
- Offset
- An immutable 2D floating-point offset.
- OptionalMethodChannel
- A MethodChannel that ignores missing platform plugins.
- OutlineFilter
- Creates a "border" around the target object. A filter that outlines a display object by applying a stroke around it.
- PainterUtils
- Contains utility functions for creating and manipulating Paint objects.
- ParagraphBoundary
- A text boundary that uses paragraphs as logical boundaries.
- PartialStackFrame
- Partial information from a stack frame for stack filtering purposes.
- PercentProperty
- Property which clamps a double to between 0 and 1 and formats it as a percentage.
-
PersistentHashMap<
K extends Object, V> - A collection of key/value pairs which provides efficient retrieval of value by key.
- PhysicalKeyboardKey
- A class with static values that describe the keys that are returned from RawKeyEvent.physicalKey.
- PlatformAssetBundle
- An AssetBundle that loads resources using platform messages.
- PlatformDispatcher
- Platform event dispatcher singleton.
- PlatformViewController
- An interface for controlling a single platform view.
- PlatformViewsRegistry
- A registry responsible for generating unique identifier for platform views.
- PlatformViewsService
- Provides access to the platform views service.
- PointerEnterEvent
- The pointer has moved with respect to the device while the pointer is or is not in contact with the device, and it has entered a target object.
- PointerEvent
- Base class for touch, stylus, or mouse events.
- PointerEventData
- A class representing the data associated with a pointer event.
- PointerExitEvent
- The pointer has moved with respect to the device while the pointer is or is not in contact with the device, and exited a target object.
- PointerHoverEvent
- The pointer has moved with respect to the device while the pointer is not in contact with the device.
-
PointerManager<
T extends PointerEventData> - The PointerManager class is responsible for processing and dispatching pointer events to registered listeners. It supports a wide range of pointer events, including input, down, up, cancel, move, scroll, zoomPan, hover, enter, and exit events. Additionally, it provides access to information about the most recent pointer event, such as the pointer's position and whether the pointer is currently down.
- PredictiveBackEvent
- Object used to report back gesture progress in Android.
- ProcessTextAction
- A data structure describing text processing actions.
- ProcessTextService
- Determines how to interact with the text processing feature.
- PropTween
- (Internal usage)
- RawFloatingCursorPoint
- The current state and position of the floating cursor.
- RawKeyboard
- An interface for listening to raw key events.
- RawKeyDownEvent
- The user has pressed a key on the keyboard.
- RawKeyEvent
- Defines the interface for raw key events.
- RawKeyEventData
- Base class for platform-specific key event data.
- RawKeyEventDataAndroid
- Platform-specific key event data for Android.
- RawKeyEventDataFuchsia
- Platform-specific key event data for Fuchsia.
- RawKeyEventDataIos
- Platform-specific key event data for iOS.
- RawKeyEventDataLinux
- Platform-specific key event data for Linux.
- RawKeyEventDataMacOs
- Platform-specific key event data for macOS.
- RawKeyEventDataWeb
- Platform-specific key event data for Web.
- RawKeyEventDataWindows
- Platform-specific key event data for Windows.
- RawKeyUpEvent
- The user has released a key on the keyboard.
- ReadBuffer
- Read-only buffer for reading sequentially from a ByteData instance.
- Rect
- An immutable, 2D, axis-aligned, floating-point rectangle whose coordinates are relative to a given origin.
- RepetitiveStackFrameFilter
- A StackFilter that filters based on repeating lists of PartialStackFrames.
- ResourceLoader
- This class is used to load and cache different types of resources, including SVG files, images, shaders, and texture atlases. It also provides a method to clear the cache of all loaded resources.
- RestorationBucket
- A RestorationBucket holds pieces of the restoration data that a part of the application needs to restore its state.
- RestorationManager
- Manages the restoration data in the framework and synchronizes it with the engine.
- RootIsolateToken
- A token that represents a root isolate.
- SceneBuilderWidget
- A widget that builds a scene using the GraphX engine.
- SceneBuilderWidgetState
- The state object for SceneBuilderWidget.
- SceneConfig
- Configuration class used to define the properties and behavior of a GraphX Scene.
- SceneController
- Entry point of GraphX world.
- ScenePainter
-
The
ScenePainter
class is responsible for rendering and managing the GraphX scene. It is a mixin that can be used with a custom painter to draw graphics within a Flutter widget. This class contains methods and properties to handle updates, rendering, and mouse input events. It also manages theStage
instance, which is the root of the display list for the GraphX scene. - ScribbleClient
- An interface to receive focus from the engine.
- SelectionRect
- Represents a selection rect for a character and it's position in the text.
- Signal
- A signal that can be dispatched to multiple listeners, without returning any data.
- SingletonFlutterWindow
- Deprecated. Will be removed in a future version of Flutter.
- Size
- Holds a 2D floating-point size.
- SpellCheckResults
- A data structure grouping together the SuggestionSpans and related text of results returned by a spell checker.
- SpellCheckService
- Determines how spell check results are received for text input.
- StackFilter
- A class that filters stack frames for additional filtering on FlutterError.defaultStackFilter.
- StackFrame
- A object representation of a frame from a stack trace.
- Stage
- The Stage is the root display container for a GraphX scene. It extends the GDisplayObjectContainer class and provides a canvas to which you can draw objects, as well as handling resize and tick events.
- StandardMessageCodec
- MessageCodec using the Flutter standard binary encoding.
- StandardMethodCodec
- MethodCodec using the Flutter standard binary encoding.
- StringCodec
- MessageCodec with UTF-8 encoded String messages.
- StringProperty
- Property which encloses its string value in quotes.
- StringUtils
- A collection of static methods for working with strings.
- SuggestionSpan
- A data structure representing a range of misspelled text and the suggested replacements for this range.
- Summary
- An annotation that provides a short description of a class for use in an index.
- SurfaceAndroidViewController
- Controls an Android view that is composed using a GL texture. This controller is created from the PlatformViewsService.initSurfaceAndroidView factory, and is defined for backward compatibility.
- SvgData
-
A proxy class to the package
flutter_svg
. - SvgUtils
-
Utilities to work with
flutter_svg
. -
SynchronousFuture<
T> - A Future whose then implementation calls the callback immediately.
- SystemChannels
- Platform channels used by the Flutter system.
- SystemChrome
- Controls specific aspects of the operating system's graphical interface and how it interacts with the application.
- SystemMouseCursor
- A mouse cursor that is natively supported on the platform that the application is running on.
- SystemMouseCursors
- A collection of system MouseCursors.
- Controls specific aspects of the system navigation stack.
- SystemSound
- Provides access to the library of short system specific sounds for common tasks.
- SystemUiOverlayStyle
- Specifies a preference for the style of the system overlays.
- SystemUtils
- A class containing utility methods related to system functionality, such as checking if Skia is being used.
- TextBoundary
- An interface for retrieving the logical text boundary (as opposed to the visual boundary) at a given code unit offset in a document.
- TextEditingDelta
- A structure representing a granular change that has occurred to the editing state as a result of text editing.
- TextEditingDeltaDeletion
- A structure representing the deletion of a single/or contiguous sequence of characters in an editing state.
- TextEditingDeltaInsertion
- A structure representing an insertion of a single/or contiguous sequence of characters at some offset of an editing state.
- TextEditingDeltaNonTextUpdate
- A structure representing changes to the selection and/or composing regions of an editing state and no changes to the text value.
- TextEditingDeltaReplacement
- A structure representing a replacement of a range of characters with a new sequence of text.
- TextEditingValue
- The current text, selection, and composing state for editing a run of text.
- TextInput
- An low-level interface to the system's text input control.
- TextInputConfiguration
- Controls the visual appearance of the text input control.
- TextInputConnection
- An interface for interacting with a text input control.
- TextInputFormatter
- A TextInputFormatter can be optionally injected into an EditableText to provide as-you-type validation and formatting of the text being edited.
- TextInputType
- The type of information for which to optimize the text input control.
- TextLayoutMetrics
- A read-only interface for accessing visual information about the implementing text.
- TextPosition
- A position in a string of text.
- TextRange
- A range of characters in a string of text.
- TextSelection
- A range of text that represents a selection.
- TextTreeConfiguration
- Configuration specifying how a particular DiagnosticsTreeStyle should be rendered as text art.
- TextTreeRenderer
- Renderer that creates ASCII art representations of trees of DiagnosticsNode objects.
- TextureAndroidViewController
- Controls an Android view that is rendered as a texture. This is typically used by AndroidView to display a View in the Android view hierarchy.
- TimedBlock
- Provides start, end, and duration of a named block of code, timed by FlutterTimeline.
- UiKitViewController
- Controller for an iOS platform view.
- Uint8List
- A fixed-length list of 8-bit unsigned integers.
- UndoManager
- A low-level interface to the system's undo manager.
- Unicode
- Constants for useful Unicode characters.
- UniqueKey
- A key that is only equal to itself.
-
ValueKey<
T> - A key that uses a value of a particular type to identify itself.
-
ValueListenable<
T> - An interface for subclasses of Listenable that expose a value.
-
ValueNotifier<
T> - A ChangeNotifier that holds a single value.
- WriteBuffer
- Write-only buffer for incrementally building a ByteData instance.
Enums
- Brightness
- Describes the contrast of a theme or color palette.
- Culling
-
An enumeration that defines the culling behavior for
GraphicsVertices
elements. - DebugBoundsMode
- An enumeration representing different modes for rendering debug bounding boxes in GraphX.
- DeviceOrientation
- Specifies a particular device orientation.
- DiagnosticLevel
- The various priority levels used to filter which diagnostics are shown and omitted.
- DiagnosticsTreeStyle
- Styles for displaying a node in a DiagnosticsNode tree.
- FloatingCursorDragState
- The state of a "floating cursor" drag on an iOS soft keyboard.
- FoundationServiceExtensions
- Service extension constants for the foundation library.
- GradientType
- An enumeration of different types of gradients that can be applied to a Graphics object.
- KeyboardLockMode
- Represents a lock mode of a keyboard, such as KeyboardLockMode.capsLock.
- KeyboardSide
- An enum describing the side of the keyboard that a key is on, to allow discrimination between which key is pressed (e.g. the left or right SHIFT key).
- KeyDataTransitMode
- The mode in which information of key messages is delivered.
- KeyEventType
- An enumeration for the type of key events, used in KeyboardEventData.
- MaxLengthEnforcement
- Mechanisms for enforcing maximum length limits.
- ModifierKey
- An enum describing the type of modifier key that is being pressed.
- MouseInputType
- An enumeration of mouse input types. Enumerates the various types of mouse inputs that can be detected.
- PointerEventType
- An enum representing different pointer event types that can be handled by the PointerEventData class.
- PointerZoomPanType
- An enum representing different zoom and pan event types that can be handled by the PointerEventData class.
- SelectionChangedCause
- Indicates what triggered the change in selected text (including changes to the cursor location).
- ServicesServiceExtensions
- Service extension constants for the services library.
- SmartDashesType
- Indicates how to handle the intelligent replacement of dashes in text input.
- SmartQuotesType
- Indicates how to handle the intelligent replacement of quotes in text input.
- SwipeEdge
- Enum representing the edge from which a swipe starts in a back gesture.
- SystemSoundType
- A sound provided by the system.
- SystemUiMode
- Describes different display configurations for both Android and iOS.
- SystemUiOverlay
- Specifies a system overlay at a particular location.
- TargetPlatform
- The platform that user interaction should adapt to target.
- TextAffinity
- A way to disambiguate a TextPosition when its offset could match two different locations in the rendered string.
- TextAlign
- Whether and how to align text horizontally.
- TextCapitalization
- Configures how the platform keyboard will select an uppercase or lowercase keyboard.
- TextDirection
- A direction in which text flows.
- TextInputAction
- An action the user has requested the text input control to perform.
- UndoDirection
- The direction in which an undo action should be performed, whether undo or redo.
Mixins
- AutofillScopeMixin
- A partial implementation of AutofillScope.
- DeltaTextInputClient
- An interface to receive granular information from TextInput.
- Diagnosticable
- A mixin class for providing string and DiagnosticsNode debug representations describing the properties of an object.
- DiagnosticableTreeMixin
- A mixin that helps dump string and DiagnosticsNode representations of trees.
- DisplayListSignalsMixin
- A mixin that provides signals for objects added or removed from the display list.
- DisplayMasking
- A mixin that provides masking functionality for rendering.
- EventDispatcherMixin
- A mixin that provides an Event dispatcher system with Listenable functionality.
- GTextureUtils
- Collection of utility methods for creating and manipulating GTexture instances.
- GTweenable
- Base interface used by GTween to animate properties. As Flutter has no reflection, we need this class to get/set properties on target objects.
-
MouseSignalsMixin<
T extends MouseInputData> - A mixin that provides mouse-related signals for a component.
-
PointerSignalsMixin<
T extends PointerEventData> - A mixin that provides signals for pointer events.
- Pool
- A mixin that provides a simple pooling mechanism for commonly-used objects such as GPoint, GMatrix, and GRect. This can help reduce the frequency of garbage collection and improve performance in some cases.
- RenderSignalMixin
- A mixin that provides signals for rendering events.
- RenderUtilMixin
- A mixin that provides utility methods for rendering.
- ResizeSignalMixin
- A mixin that provides a Signal for when the size of an object changes.
- ServicesBinding
- Listens for platform messages and directs them to the defaultBinaryMessenger.
- SingleValueTweenMixin
- / --------------------------------------------------------------------------- A mixin that adds the ability for the tweenable object to represent a single value that is being tweened.
-
StageMouseSignalsMixin<
T extends MouseInputData> - use mouse signal for now.
- TextInputClient
- An interface to receive information from TextInput.
- TextInputControl
- An interface for implementing text input controls that receive text editing state changes and visual input control requests.
- TextSelectionDelegate
- A mixin for manipulating the selection, provided for toolbar or shortcut keys.
- TickerSignalMixin
- A mixin that provides a Ticker signal for updating the display frame.
- UndoManagerClient
- An interface to receive events from a native UndoManager.
Extensions
- DisplayObjectHelpers on GDisplayObject
- Extension methods to simplify the modification of GDisplayObject properties.
- ExtSkiaPaintCustom on Paint
- Extension class for the Paint class, with added functionality.
- GTweenBlurFilterExt on GBlurFilter
- An extension of GBlurFilter to create tween animations for the blur filter.
- GTweenColorExt on Color
- A set of extension methods on the Color class for creating GTween animations.
- GTweenDiplayObjectExt on GDisplayObject
- An extension for the GDisplayObject class that provides a getter for creating a GTweenableDisplayObject object.
- GTweenDoubleExt on double
-
An extension for the
double
class that provides a getter for creating a GTweenableDouble object. - GTweenDropShadowFilterExt on GDropShadowFilter
- Extension on GDropShadowFilter providing a getter for GTweenableDropShadowFilter and a tween method to tween the properties of the drop shadow filter.
- GTweenGlowFilterExt on GlowFilter
- Extension on GlowFilter providing a getter for GTweenableGlowFilter and a tween method to tween the properties of the glow filter.
- GTweenIntExt on int
-
An extension for the
int
class that provides a getter for creating a GTweenableInt object. - GTweenListExt on List
-
An extension for the
List
class that provides a getter for creating a GTweenableList object. - GTweenMap2Ext on Map
-
An extension for the
Map
class that provides a getter for creating a GTweenableMap object. -
GTweenMapExt
on Map<
String?, dynamic> -
An extension for the
Map<String?, dynamic>
class that provides a getter for creating a GTweenableMap object. - GTweenNumExt on num
-
An extension for the
num
class that provides a getter for creating a GTweenableDouble object. - GTweenPointExt on GPoint
- A set of extension methods on the GPoint class for creating GTween animations.
- GTweenRectExt on GRect
- A set of extension methods on the GRect class for creating GTween animations.
- MyKeyEventExt on KeyboardEventData
- An extension class for KeyboardEventData, which adds helper properties for arrow keys.
Constants
- appFlavor → const String?
- The flavor this app was built with.
- factory → const _Factory
-
Used to annotate an instance or static method
m
. Indicates thatm
must either be abstract or must return a newly allocated object ornull
. In addition, every method that either implements or overridesm
is implicitly annotated with this same annotation. - immutable → const Immutable
-
Used to annotate a class
C
. Indicates thatC
and all subtypes ofC
must be immutable. -
kAndroidNumPadMap
→ const Map<
int, LogicalKeyboardKey> - A map of Android key codes which have printable representations, but appear on the number pad. Used to provide different key objects for keys like KEY_EQUALS and NUMPAD_EQUALS.
-
kAndroidToLogicalKey
→ const Map<
int, LogicalKeyboardKey> -
Maps Android-specific key codes to the matching
LogicalKeyboardKey
. -
kAndroidToPhysicalKey
→ const Map<
int, PhysicalKeyboardKey> -
Maps Android-specific scan codes to the matching
PhysicalKeyboardKey
. - kColorBlack → const Color
- Color black (#000000).
- kColorCyan → const Color
- Color cyan (#00FFFF).
- kColorMagenta → const Color
- Color magenta (#FF00FF).
- kColorRed → const Color
- Color red (#00FF00).
- kColorTransparent → const Color
- Transparent color (fully transparent, #00000000).
- kColorWhite → const Color
- Color white (#FFFFFF).
- kDebugMode → const bool
- A constant that is true if the application was compiled in debug mode.
- kFlutterMemoryAllocationsEnabled → const bool
- If true, Flutter objects dispatch the memory allocation events.
-
kFuchsiaToLogicalKey
→ const Map<
int, LogicalKeyboardKey> -
Maps Fuchsia-specific IDs to the matching
LogicalKeyboardKey
. -
kFuchsiaToPhysicalKey
→ const Map<
int, PhysicalKeyboardKey> -
Maps Fuchsia-specific USB HID Usage IDs to the matching
PhysicalKeyboardKey
. -
kGlfwNumpadMap
→ const Map<
int, LogicalKeyboardKey> - A map of GLFW key codes which have printable representations, but appear on the number pad. Used to provide different key objects for keys like KEY_EQUALS and NUMPAD_EQUALS.
-
kGlfwToLogicalKey
→ const Map<
int, LogicalKeyboardKey> -
Maps GLFW-specific key codes to the matching
LogicalKeyboardKey
. -
kGtkNumpadMap
→ const Map<
int, LogicalKeyboardKey> - A map of GTK key codes which have printable representations, but appear on the number pad. Used to provide different key objects for keys like KEY_EQUALS and NUMPAD_EQUALS.
-
kGtkToLogicalKey
→ const Map<
int, LogicalKeyboardKey> -
Maps GTK-specific key codes to the matching
LogicalKeyboardKey
. -
kIosNumPadMap
→ const Map<
int, LogicalKeyboardKey> - A map of iOS key codes which have printable representations, but appear on the number pad. Used to provide different key objects for keys like KEY_EQUALS and NUMPAD_EQUALS.
-
kIosSpecialLogicalMap
→ const Map<
String, LogicalKeyboardKey> - Maps iOS specific string values of nonvisible keys to logical keys
-
kIosToLogicalKey
→ const Map<
int, LogicalKeyboardKey> -
A map of iOS key codes presenting
LogicalKeyboardKey
. -
kIosToPhysicalKey
→ const Map<
int, PhysicalKeyboardKey> -
Maps iOS-specific key code values representing
PhysicalKeyboardKey
. - kIsWeb → const bool
- A constant that is true if the application was compiled to run on the web.
-
kLinuxToPhysicalKey
→ const Map<
int, PhysicalKeyboardKey> -
Maps XKB specific key code values representing
PhysicalKeyboardKey
. -
kMacOsFunctionKeyMap
→ const Map<
int, LogicalKeyboardKey> - A map of macOS key codes which are numbered function keys, so that they can be excluded when asking "is the Fn modifier down?".
-
kMacOsNumPadMap
→ const Map<
int, LogicalKeyboardKey> - A map of macOS key codes which have printable representations, but appear on the number pad. Used to provide different key objects for keys like KEY_EQUALS and NUMPAD_EQUALS.
-
kMacOsToLogicalKey
→ const Map<
int, LogicalKeyboardKey> -
A map of macOS key codes presenting
LogicalKeyboardKey
. -
kMacOsToPhysicalKey
→ const Map<
int, PhysicalKeyboardKey> -
Maps macOS-specific key code values representing
PhysicalKeyboardKey
. - kMaxUnsignedSMI → const int
- The largest SMI value.
- kNoDefaultValue → const Object
- Marker object indicating that a DiagnosticsNode has no default value.
- kProfileMode → const bool
- A constant that is true if the application was compiled in profile mode.
- kProfilePlatformChannels → const bool
- Controls whether platform channel usage can be debugged in release mode.
- kReleaseMode → const bool
- A constant that is true if the application was compiled in release mode.
-
kWebLocationMap
→ const Map<
String, List< LogicalKeyboardKey?> > - A map of Web KeyboardEvent keys which needs to be decided based on location, typically for numpad keys and modifier keys. Used to provide different key objects for keys like KEY_EQUALS and NUMPAD_EQUALS.
-
kWebNumPadMap
→ const Map<
String, LogicalKeyboardKey> - A map of Web KeyboardEvent codes which have printable representations, but appear on the number pad. Used to provide different key objects for keys like KEY_EQUALS and NUMPAD_EQUALS.
-
kWebToLogicalKey
→ const Map<
String, LogicalKeyboardKey> -
Maps Web KeyboardEvent codes to the matching
LogicalKeyboardKey
. -
kWebToPhysicalKey
→ const Map<
String, PhysicalKeyboardKey> -
Maps Web KeyboardEvent codes to the matching
PhysicalKeyboardKey
. -
kWindowsNumPadMap
→ const Map<
int, LogicalKeyboardKey> - A map of Windows KeyboardEvent codes which have printable representations, but appear on the number pad. Used to provide different key objects for keys like KEY_EQUALS and NUMPAD_EQUALS.
-
kWindowsToLogicalKey
→ const Map<
int, LogicalKeyboardKey> -
Maps Windows KeyboardEvent codes to the matching
LogicalKeyboardKey
. -
kWindowsToPhysicalKey
→ const Map<
int, PhysicalKeyboardKey> -
Maps Windows KeyboardEvent codes to the matching
PhysicalKeyboardKey
. - mustCallSuper → const _MustCallSuper
-
Used to annotate an instance member (method, getter, setter, operator, or
field)
m
. Indicates that every invocation of a member that overridesm
must also invokem
. In addition, every method that overridesm
is implicitly annotated with this same annotation. - nonVirtual → const _NonVirtual
-
Used to annotate an instance member (method, getter, setter, operator, or
field)
m
in a classC
or mixinM
. Indicates thatm
should not be overridden in any classes that extend or mixinC
orM
. - optionalTypeArgs → const _OptionalTypeArgs
-
Used to annotate a class, mixin, extension, function, method, or typedef
declaration
C
. Indicates that any type arguments declared onC
are to be treated as optional. - precisionErrorTolerance → const double
- The epsilon of tolerable double precision error.
- protected → const _Protected
- Used to annotate an instance member in a class or mixin which is meant to be visible only within the declaring library, and to other instance members of the class or mixin, and their subtypes.
- required → const 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. - visibleForOverriding → const _VisibleForOverriding
- Used to annotate an instance member that was made public so that it could be overridden but that is not intended to be referenced from outside the defining library.
- visibleForTesting → const _VisibleForTesting
- Used to annotate a declaration that was made public, so that it is more visible than otherwise necessary, to make code testable.
Properties
- activeDevToolsServerAddress ↔ String?
-
The address for the active DevTools server used for debugging this
application.
getter/setter pair
- connectedVmServiceUri ↔ String?
-
The uri for the connected vm service protocol.
getter/setter pair
- dashedTextConfiguration → TextTreeConfiguration
-
Identical to sparseTextConfiguration except that the lines connecting
parent to children are dashed.
final
- debugBrightnessOverride ↔ Brightness?
-
A setting that can be used to override the platform Brightness exposed
from BindingBase.platformDispatcher.
getter/setter pair
- debugDefaultTargetPlatformOverride ↔ TargetPlatform?
-
Override the defaultTargetPlatform in debug builds.
getter/setter pair
- debugDoublePrecision ↔ int?
-
Configure debugFormatDouble using num.toStringAsPrecision.
getter/setter pair
- debugInstrumentationEnabled ↔ bool
-
Boolean value indicating whether debugInstrumentAction will instrument
actions in debug builds.
getter/setter pair
- debugKeyEventSimulatorTransitModeOverride ↔ KeyDataTransitMode?
-
Override the transit mode with which key events are simulated.
getter/setter pair
- debugPrint ↔ DebugPrintCallback
-
Prints a message to the console, which you can access using the "flutter"
tool's "logs" command ("flutter logs").
getter/setter pair
-
debugPrintDone
→ Future<
void> -
A Future that resolves when there is no longer any buffered content being
printed by debugPrintThrottled (which is the default implementation for
debugPrint, which is used to report errors to the console).
no setter
- debugPrintKeyboardEvents ↔ bool
-
Setting to true will cause extensive logging to occur when key events are
received.
getter/setter pair
- debugProfilePlatformChannels ↔ bool
-
Controls whether platform channel usage can be debugged in non-release mode.
getter/setter pair
- defaultTargetPlatform → TargetPlatform
-
The TargetPlatform that matches the platform on which the framework is
currently executing.
no setter
- denseTextConfiguration → TextTreeConfiguration
-
Dense text tree configuration that minimizes horizontal whitespace.
final
- errorPropertyTextConfiguration → TextTreeConfiguration
-
Render the name on a line followed by the body and properties on the next
line omitting the children.
final
- errorTextConfiguration → TextTreeConfiguration
-
Configuration that draws a box around a node ignoring the connection to the
parents.
final
- flatTextConfiguration → TextTreeConfiguration
-
Whitespace only configuration where children are not indented.
final
- isCanvasKit → bool
-
Returns true if the application is using CanvasKit.
no setter
- mps → MPS
-
WARNING:
If possible, avoid the usage of this class as it's unstable with the
Widget tree. Needs revision.
MPS is a simple pub/sub system for Dart, similar to an event bus.
final
- platformViewsRegistry → PlatformViewsRegistry
-
The PlatformViewsRegistry responsible for generating unique identifiers for platform views.
final
- rootBundle → AssetBundle
-
The AssetBundle from which this application was loaded.
final
- shallowTextConfiguration → TextTreeConfiguration
-
Render a node on multiple lines omitting children.
final
- shouldProfilePlatformChannels → bool
-
Profile and print statistics on Platform Channel usage.
no setter
- singleLineTextConfiguration → TextTreeConfiguration
-
Render a node as a single line omitting children.
final
- sparseTextConfiguration → TextTreeConfiguration
-
Default text tree configuration.
final
- transitionTextConfiguration → TextTreeConfiguration
-
Configuration that draws a box around a leaf node.
final
- whitespaceTextConfiguration → TextTreeConfiguration
-
Whitespace only configuration where children are consistently indented
two spaces.
final
Functions
-
binarySearch<
T extends Comparable< (Object> >List< T> sortedList, T value) → int -
Returns the position of
value
in thesortedList
, if it exists. -
clampDouble(
double x, double min, double max) → double - Same as num.clamp but optimized for a non-null double.
-
compute<
M, R> (ComputeCallback< M, R> callback, M message, {String? debugLabel}) → Future<R> -
Asynchronously runs the given
callback
- with the providedmessage
- in the background and completes with the result. -
consolidateHttpClientResponseBytes(
HttpClientResponse response, {bool autoUncompress = true, BytesReceivedCallback? onBytesReceived}) → Future< Uint8List> - Efficiently converts the response body of an HttpClientResponse into a Uint8List.
-
convertFromDouble(
Object? original, double target) → Object -
Converts a double
target
value to its corresponding type. -
convertToDouble(
Object? value) → double -
Converts a
value
to a double type. -
debugAssertAllFoundationVarsUnset(
String reason, {DebugPrintCallback debugPrintOverride = debugPrintThrottled}) → bool - Returns true if none of the foundation library debug variables have been changed.
-
debugAssertAllServicesVarsUnset(
String reason) → bool - Returns true if none of the widget library debug variables have been changed.
-
debugFormatDouble(
double? value) → String - Formats a double to have standard formatting.
-
debugInstrumentAction<
T> (String description, Future< T> action()) → Future<T> -
Runs the specified
action
, timing how long the action takes in debug builds when debugInstrumentationEnabled is true. -
debugIsSerializableForRestoration(
Object? object) → bool -
Returns true when the provided
object
is serializable for state restoration. -
debugPrintStack(
{StackTrace? stackTrace, String? label, int? maxFrames}) → void - Dump the 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.
-
deg2rad(
double deg) → double - Converts an angle in degrees to radians.
-
describeEnum(
Object enumEntry) → String - Returns a short description of an enum value.
-
describeIdentity(
Object? object) → String -
Returns a summary of the runtime type and hash code of
object
. -
getTimer(
) → int - Returns the elapsed time since the start of the GraphX scene in milliseconds, or 0 if it hasn't been started yet.
-
httpGet(
String url, {Map< String, String> ? headers}) → Future<Uint8List> -
Fetches an HTTP resource from the specified
url
using the specifiedheaders
. -
lerpDuration(
Duration a, Duration b, double t) → Duration -
Linearly interpolate between two
Duration
s. -
listEquals<
T> (List< T> ? a, List<T> ? b) → bool - Compares two lists for element-by-element equality.
-
mapEquals<
T, U> (Map< T, U> ? a, Map<T, U> ? b) → bool - Compares two maps for element-by-element equality.
-
mergeSort<
T> (List< T> list, {int start = 0, int? end, int compare(T, T)?}) → void -
Sorts a list between
start
(inclusive) andend
(exclusive) using the merge sort algorithm. -
objectRuntimeType(
Object? object, String optimizedValue) → String -
Framework code should use this method in favor of calling
toString
on Object.runtimeType. -
rad2deg(
double rad) → double - The resulting angle is calculated by dividing the input angle rad by Math.PI and then multiplying it by 180.
-
runeToLowerCase(
int rune) → int - Convert a UTF32 rune to its lower case.
-
setEquals<
T> (Set< T> ? a, Set<T> ? b) → bool - Compares two sets for element-by-element equality.
-
shortHash(
Object? object) → String - Returns a 5 character long hexadecimal string generated from Object.hashCode's 20 least-significant bits.
-
trace(
dynamic arg1, [dynamic arg2, dynamic arg3, dynamic arg4, dynamic arg5, dynamic arg6, dynamic arg7, dynamic arg8, dynamic arg9, dynamic arg10]) → void -
Global callback that replaces print in a similar way ActionScript
trace()
works. -
traceConfig(
{String? customTag, int tagPaddingCount = 0, String tagPaddingChar = ' ', bool showFilename = false, bool showLinenumber = false, bool showClassname = false, bool showMethodname = false, bool showOutsideTag = false, String argsSeparator = ', '}) → void -
Configure trace outputs for debug console.
showLinenumber
only works ifshowFilename
is true.tagPaddingCount
should be applied manually if you wanna have a cleaner tabulated view.
Typedefs
-
AsyncCallback
= Future<
void> Function() - Signature of callbacks that have no arguments and return no data, but that return a Future to indicate when their work is complete.
-
AsyncValueGetter<
T> = Future< T> Function() - Signature for callbacks that are to asynchronously report a value on demand.
-
AsyncValueSetter<
T> = Future< void> Function(T value) - Signature for callbacks that report that a value has been set and return a Future that completes when the value has been saved.
- BytesReceivedCallback = void Function(int cumulative, int? total)
- Signature for getting notified when chunks of bytes are received while consolidating the bytes of an HttpClientResponse into a Uint8List.
-
ComputeCallback<
M, R> = FutureOr< R> Function(M message) - Signature for the callback passed to compute.
-
ComputeImpl
= Future<
R> Function<M, R>(ComputeCallback< M, R> callback, M message, {String? debugLabel}) -
The signature of compute, which spawns an isolate, runs
callback
on that isolate, passes itmessage
, and (eventually) returns the value returned bycallback
. -
ComputePropertyValueCallback<
T> = T? Function() - Signature for computing the value of a property.
- DebugPrintCallback = void Function(String? message, {int? wrapWidth})
- Signature for debugPrint implementations.
-
DiagnosticPropertiesTransformer
= Iterable<
DiagnosticsNode> Function(Iterable<DiagnosticsNode> properties) - Signature for DiagnosticPropertiesBuilder transformer.
- EaseDef = double Function(double e)
- A function type that defines an easing curve. It takes a value between 0.0 and 1.0 and returns a transformed value based on the specific easing curve defined.
- EaseFunction = double Function(double e)
- A function type that applies an easing curve to a value between 0.0 and 1.0. It takes a value between 0.0 and 1.0 and returns a transformed value based on the specific easing curve applied.
-
EventSignalCallback<
T> = void Function(T event) -
Signature for a callback that receives an event of type
T
. - FlutterExceptionHandler = void Function(FlutterErrorDetails details)
- Signature for FlutterError.onError handler.
- GAnimatableBuilder = GTweenable? Function(Object? target)
- A function that takes an Object target and returns a GTweenable object that can be animated by GTween.
- GKey = LogicalKeyboardKey
- The logical representation of a keyboard key.
-
GTweenGetProp<
T> = T Function() - Getter function for GTweenLerpProp. It returns a value of type T which represents the current value of the property.
-
GTweenSetProp<
T> = void Function(T targetValue) - Setter function for GTweenLerpProp. It takes a single argument of type T which represents the value to set for the property.
-
InformationCollector
= Iterable<
DiagnosticsNode> Function() - Signature for FlutterErrorDetails.informationCollector callback and other callbacks that collect information describing an error.
-
IterableFilter<
T> = Iterable< T> Function(Iterable<T> input) - Signature for callbacks that filter an iterable.
- KeyEventCallback = bool Function(KeyEvent event)
- The signature for HardwareKeyboard.addHandler, a callback to decide whether the entire framework handles a key event.
- KeyMessageHandler = bool Function(KeyMessage message)
- The signature for KeyEventManager.keyMessageHandler.
-
LicenseEntryCollector
= Stream<
LicenseEntry> Function() - Signature for callbacks passed to LicenseRegistry.addLicense.
- MemoryAllocations = FlutterMemoryAllocations
- An interface for listening to object lifecycle events.
-
MessageHandler
= Future<
ByteData?> ? Function(ByteData? message) - A function which takes a platform message and asynchronously returns an encoded response.
-
MPSFunctionBuilder<
T> = Widget Function(BuildContext context, MPSEvent< T> event, Widget? child) - Function builder used to build a widget with an MPSEvent event.
- ObjectEventListener = void Function(ObjectEvent event)
- A listener of ObjectEvent.
- PlatformMessageResponseCallback = void Function(ByteData? data)
- Signature for responses to platform messages.
- PlatformViewCreatedCallback = void Function(int id)
- Callback signature for when a platform view was created.
- PointerEnterEventListener = void Function(PointerEnterEvent event)
- Signature for listening to PointerEnterEvent events.
- PointerExitEventListener = void Function(PointerExitEvent event)
- Signature for listening to PointerExitEvent events.
- PointerHoverEventListener = void Function(PointerHoverEvent event)
- Signature for listening to PointerHoverEvent events.
- PointTransformer = Offset Function(Offset position)
- Converts a given point from the global coordinate system in logical pixels to the local coordinate system for a box.
- RawKeyEventHandler = bool Function(RawKeyEvent event)
- A callback type used by RawKeyboard.keyEventHandler to send key events to a handler that can determine if the key has been handled or not.
-
ServiceExtensionCallback
= Future<
Map< Function(Map<String, dynamic> >String, String> parameters) - Signature for service extensions.
- SortChildrenCallback = int Function(GDisplayObject object1, GDisplayObject object2)
- A function used to sort the children of this container.
- StackTraceDemangler = StackTrace Function(StackTrace details)
- Signature for a function that demangles StackTrace objects into a format that can be parsed by StackFrame.
-
SystemUiChangeCallback
= Future<
void> Function(bool systemOverlaysAreVisible) - Signature for listening to changes in the SystemUiMode.
- TextInputFormatFunction = TextEditingValue Function(TextEditingValue oldValue, TextEditingValue newValue)
- Function signature expected for creating custom TextInputFormatter shorthands via TextInputFormatter.withFunction.
- UntilPredicate = bool Function(int offset, bool forward)
- Signature for a predicate that takes an offset into a UTF-16 string, and a boolean that indicates the search direction.
-
ValueChanged<
T> = void Function(T value) - Signature for callbacks that report that an underlying value has changed.
-
ValueGetter<
T> = T Function() - Signature for callbacks that are to report a value on demand.
-
ValueSetter<
T> = void Function(T value) - Signature for callbacks that report that a value has been set.
- VoidCallback = void Function()
- Signature of callbacks that have no arguments and return no data.
- WindowBoundsResolver = GRect? Function()
- A function that returns the global coordinates of the widget.
Exceptions / Errors
- FlutterError
- Error class used to report Flutter-specific assertion failures and contract violations.
- MissingPluginException
- Thrown to indicate that a platform interaction failed to find a handling plugin.
- PlatformException
- Thrown to indicate that a platform interaction failed in the platform plugin.