shelf_swap library

Classes

Align
A widget that aligns its child within itself and optionally sizes itself based on the child's size.
Alignment
A point within a rectangle.
AlignmentDirectional
An offset that's expressed as a fraction of a Size, but whose horizontal component is dependent on the writing direction.
AlignmentGeometry
Base class for Alignment that allows for text-direction aware resolution.
AnimatedAlign
Animated version of Align which automatically transitions the child's position over a given duration whenever the given alignment changes.
AnyEventHandler
Base class for EventHandler and SetStateHandler.
AnyStateReference
Base class for StateReference and BoundStateReference.
ArgsReference
Unbound reference to arguments.
AssetImage
AsyncSnapshot<T>
BlobNode
Base class of nodes that appear in the output of decodeDataBlob and decodeLibraryBlob.
Border
BorderRadius
An immutable set of radii for each corner of a rectangle.
BorderRadiusDirectional
An immutable set of radii for each corner of a rectangle, but with the corners specified in a manner dependent on the writing direction.
BorderRadiusGeometry
Base class for BorderRadius that allows for text-direction aware resolution.
BorderSide
BoundArgsReference
Bound reference to arguments.
BoundLoopReference
Bound reference to a Loop.
BoundStateReference
Bound reference to a remote widget's state.
BoxBorder
BoxConstraints
Immutable layout constraints for RenderBox layout.
BoxDecoration
An immutable description of how to paint a box.
BoxShadow
A shadow cast by a box.
BuildContext
Builder
CatmullRomCurve
An animation easing curve that passes smoothly through the given control points using a centripetal Catmull-Rom spline.
CatmullRomSpline
A 2D spline that passes smoothly through the given control points using a centripetal Catmull-Rom spline.
Center
A widget that centers its child within itself.
Color
An immutable 32 bit color value in ARGB format.
ColoredBox
A widget that paints its area with a specified Color and then draws its child on top of that color.
Column
A widget that displays its children in a vertical array.
Constraints
ConstructorCall
Representation of references to widgets in Remote Flutter Widgets library blobs.
Container
Cubic
A cubic polynomial mapping of the unit interval.
Curve
An parametric animation easing curve, i.e. a mapping of the unit interval to the unit interval.
Curve2D
Abstract class that defines an API for evaluating 2D parametric curves.
Curve2DSample
A class that holds a sample of a 2D parametric curve, containing the value (the X, Y coordinates) of the curve at the parametric value t.
Curves
A collection of common animation curves.
CustomSwapNotification
DataReference
Reference to the DynamicContent data that is passed into the widget (see Runtime.build's data argument).
Decoration
A description of a box decoration (a decoration applied to a Rect).
DecorationImage
An image for a box decoration.
DefaultTextStyle
The text style to apply to descendant Text widgets which don't have an explicit style.
Directionality
A widget that determines the ambient directionality of text and text-direction-sensitive render objects.
EdgeInsets
An immutable set of offsets in each of the four cardinal directions.
EdgeInsetsDirectional
An immutable set of offsets in each of the four cardinal directions, but whose horizontal components are dependent on the writing direction.
EdgeInsetsGeometry
Base class for EdgeInsets that allows for text-direction aware resolution.
ElasticInCurve
An oscillating curve that grows in magnitude while overshooting its bounds.
ElasticInOutCurve
An oscillating curve that grows and then shrinks in magnitude while overshooting its bounds.
ElasticOutCurve
An oscillating curve that shrinks in magnitude while overshooting its bounds.
EventHandler
Description of a callback in an RFW widget declaration.
Expanded
A widget that expands a child of a Row, Column, or Flex so that the child fills the available space.
FetchSwapNotification
FileImage
FittedBox
Scales and positions its child within itself according to fit.
FittedSizes
The pair of sizes returned by applyBoxFit.
Flex
Flexible
FlippedCurve
A curve that is the reversed inversion of its given curve.
FontFeature
A feature tag and value that affect the selection of glyphs in a font.
FontVariation
An axis tag and value that can be used to customize variable fonts.
FontWeight
The thickness of the glyphs used to draw the text.
FractionallySizedBox
A widget that sizes its child to a fraction of the total available space. For more details about the layout algorithm, see RenderFractionallySizedOverflowBox.
FullyQualifiedWidgetName
The name of a widget used by the RFW package, including its library name.
FutureBuilder<T>
Gradient
A 2D gradient.
GradientRotation
A GradientTransform that rotates the gradient around the center-point of its bounding box.
GradientTransform
Base class for transforming gradient shaders without applying the same transform to the entire canvas.
Icon
A graphical icon widget drawn with a glyph from a font described in an IconData such as material's predefined IconDatas in Icons.
IconData
A description of an icon fulfilled by a font glyph.
Image
A widget that displays an image.
ImageProvider
Import
A library import.
InheritedShelf
InheritedWidget
InitSwapTrigger
Swaps when the widget is initialized.
Interval
A curve that is 0.0 until begin, then curved (according to curve) from 0.0 at begin to 1.0 at end, then remains 1.0 past end.
Key
A Key is an identifier for Widgets, Elements and SemanticsNodes.
LibraryName
The name of a widgets library in the RFW package.
LinearGradient
A 2D linear gradient.
LineMetrics
LineMetrics stores the measurements and statistics of a single line in the paragraph.
LocalKey
A key that is not a GlobalKey.
Loop
Representation of the ...for construct in Remote Flutter Widgets library blobs.
LoopReference
Unbound reference to a Loop.
MemoryImage
Missing
The type of the missing value.
MultiParentRenderObject<T extends Widget>
NetworkImage
Offset
An immutable 2D floating-point offset.
OffsetBase
Base class for Size and Offset, which are both ways to describe a distance as a two-dimensional axis-aligned vector.
Opacity
A widget that makes its child partially transparent.
Padding
A widget that insets its child by the given padding.
ParagraphConstraints
Layout constraints for Paragraph objects.
ParagraphStyle
An opaque object that determines the configuration used by ParagraphBuilder to position lines within a Paragraph of text.
ParametricCurve<T>
An abstract class providing an interface for evaluating a parametric curve.
ParentRenderObject<T extends Widget>
RadialGradient
A 2D radial gradient.
Radius
A radius for either circular or elliptical shapes.
Rect
An immutable, 2D, axis-aligned, floating-point rectangle whose coordinates are relative to a given origin.
Reference
Base class for various kinds of references in the RFW data structures.
RemoteWidgetLibrary
The in-memory representation of the output of parseTextLibraryFile or decodeLibraryBlob.
RenderObject<T extends Widget>
ResetSwapNotification
Row
A widget that displays its children in a horizontal array.
RRect
An immutable rounded rectangle with the custom radii for all four corners.
RSTransform
A transform consisting of a translation, a rotation, and a uniform scale.
SafeArea
SawTooth
A sawtooth curve that repeats a given number of times over the unit interval.
SetFormDataSwapNotification
SetStateHandler
Description of a state setter in an RFW widget declaration.
SingleChildScrollView
A box in which a single widget can be scrolled.
Size
Holds a 2D floating-point size.
SizedBox
A box with a specified size.
Slot
SourceLocation
Reference to a location in a source file.
SourceRange
Reference to a range of a source file.
Spacer
Spacer creates an adjustable, empty spacer that can be used to tune the spacing between widgets in a Flex container, like Row or Column.
Stack
StatelessWidget
StateReference
Unbound reference to remote widget's state.
StrutStyle
See also:
Swap
SwapInit
SwapNotification
SwapScope
SwapSwapNotification
SwapTrigger
A trigger for Swap.
SweepGradient
A 2D sweep gradient.
Switch
Representation of the switch construct in Remote Flutter Widgets library blobs.
TapSwapTrigger
Swaps when the widget is tapped.
Text
A run of text with a single style.
TextAlignVertical
The vertical alignment of text within an input box.
TextBox
A rectangle enclosing a run of text.
TextDecoration
A linear decoration to draw near the text.
TextHeightBehavior
Defines how to apply TextStyle.height over and under text.
TextPosition
A position in a string of text.
TextRange
A range of characters in a string of text.
TextStyle
An immutable style describing how to format and paint text.
ThreePointCubic
A cubic polynomial composed of two curves that share a common center point.
Threshold
A curve that is 0.0 until it hits the threshold, then it jumps to 1.0.
UniqueKey
A key that is only equal to itself.
ValueKey<T>
A key that uses a value of a particular type to identify itself.
ViewPadding
Widget
WidgetBuilderArgReference
Reference to the single argument of type DynamicMap passed into the widget builder.
WidgetBuilderDeclaration
Representation of functions that return widgets in Remote Flutter Widgets library blobs.
WidgetDeclaration
A description of a widget in a remote widget library.
WidgetLibrary
Base class for widget libraries.
Wrap
A widget that displays its children in multiple horizontal or vertical runs.

Enums

Axis
The two cardinal directions in two dimensions.
AxisDirection
A direction along either the horizontal or vertical Axis in which the origin, or zero position, is determined.
BlendMode
Algorithms to use when painting on the canvas.
BlurStyle
Styles to use for blurs in MaskFilter objects.
BorderStyle
The style of line to draw for a BorderSide in a Border.
BoxFit
How a box should be inscribed into another box.
BoxHeightStyle
Defines various ways to vertically bound the boxes returned by Paragraph.getBoxesForRange.
BoxShape
The shape to use when rendering a Border or BoxDecoration.
BoxWidthStyle
Defines various ways to horizontally bound the boxes returned by Paragraph.getBoxesForRange.
Clip
Different ways to clip a widget's content.
ConnectionState
The state of connection to an asynchronous computation.
CrossAxisAlignment
How the children should be placed along the cross axis in a flex layout.
DragStartBehavior
Configuration of offset passed to DragStartDetails.
FilterQuality
FlexFit
How the child is inscribed into the available space.
FontStyle
Whether to use the italic type variation of glyphs in the font.
ImageRepeat
MainAxisAlignment
How the children should be placed along the main axis in a flex layout.
MainAxisSize
How much space should be occupied in the main axis.
PlaceholderAlignment
Where to vertically align the placeholder relative to the surrounding text.
RenderComparison
The description of the difference between two objects, in the context of how it will affect the rendering.
ScrollViewKeyboardDismissBehavior
A representation of how a ScrollView should dismiss the on-screen keyboard.
StackFit
How to size the non-positioned children of a Stack.
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.
TextBaseline
A horizontal line used for aligning text.
TextDecorationStyle
The style in which to draw a text decoration
TextDirection
TextLeadingDistribution
How the "leading" is distributed over and under the text.
TextOverflow
How overflowing text should be handled.
TextWidthBasis
The different ways of measuring the width of one or more lines of text.
TileMode
Defines what happens at the edge of a gradient or the sampling of a source image in an ImageFilter.
VerticalDirection
A direction in which boxes flow vertically.
WrapAlignment
How Wrap should align objects.
WrapCrossAlignment
Who Wrap should align children within a run in the cross axis.

Constants

dataBlobSignature → const List<int>
The first four bytes of a Remote Flutter Widgets binary data blob.
libraryBlobSignature → const List<int>
The first four bytes of a Remote Flutter Widgets binary library blob.
missing → const Missing
The value used by DynamicContent to represent missing data.

Functions

applyBoxFit(BoxFit fit, Size inputSize, Size outputSize) FittedSizes
Apply a BoxFit value.
axisDirectionIsReversed(AxisDirection axisDirection) bool
Returns whether traveling along the given axis direction visits coordinates along that axis in numerically decreasing order.
axisDirectionToAxis(AxisDirection axisDirection) Axis
Returns the Axis that contains the given AxisDirection.
decodeDataBlob(Uint8List bytes) Object
Decode a Remote Flutter Widgets binary data blob.
decodeLibraryBlob(Uint8List bytes) RemoteWidgetLibrary
Decode a Remote Flutter Widgets binary library blob.
encodeDataBlob(Object value) Uint8List
Encode data as a Remote Flutter Widgets binary data blob.
encodeLibraryBlob(RemoteWidgetLibrary value) Uint8List
Encode data as a Remote Flutter Widgets binary library blob.
encodeWidget(Widget root) FutureOr<Uint8List>
Encodes the given root widget into a BlobNode.
flipAxis(Axis direction) Axis
Returns the opposite of the given Axis.
flipAxisDirection(AxisDirection axisDirection) AxisDirection
Returns the opposite of the given AxisDirection.
parseDataFile(String file) DynamicMap
Parse a Remote Flutter Widgets text data file.
parseLibraryFile(String file, {Object? sourceIdentifier}) RemoteWidgetLibrary
Parses a Remote Flutter Widgets text library file.
textDirectionToAxisDirection(TextDirection textDirection) AxisDirection
Returns the AxisDirection in which reading occurs in the given TextDirection.
widget(Future<Widget> build(BuildContext context)) → Handler
A RequestHandler that builds a widget and returns it as a response.

Typedefs

DynamicList = List<Object?>
A list whose values are DynamicMap, DynamicList, int, double, bool, string, and BlobNode objects.
DynamicMap = Map<String, Object?>
A map whose keys are strings and whose values are DynamicMap, DynamicList, int, double, bool, string, and BlobNode objects.
FutureWidgetBuilder<T> = Widget Function(BuildContext context, AsyncSnapshot<T> result)
ShelfData = ({Request request})
WidgetBuilder = Widget Function(BuildContext context)

Exceptions / Errors

ParserException
Indicates that there an error was detected while parsing a file.