StacSliverToBoxAdapter class

A Stac model representing Flutter's SliverToBoxAdapter widget.

A sliver that contains a single box widget.

{@tool snippet}

const StacSliverPadding(
  padding: StacEdgeInsets.all(16),
  sliver: StacSliverToBoxAdapter(...),
)

{@end-tool}

{@tool snippet} JSON Example:

{
    "type": "sliverPadding",
    "padding": 16.0,
    "sliver": {
        "type": "sliverToBoxAdapter",
        "child": {
            "type": "container",
            "height": 150,
            "color": "#4CAF50",
            "child": {
                "type": "center",
                "child": {
                    "type": "text",
                    "data": "I am a Box inside a SliverToBoxAdapter!",
                    "style": {
                        "color": "#FFFFFF",
                        "fontWeight": "bold"
                    }
                }
            }
        }
    }
}

{@end-tool}

See also:

Inheritance
Available extensions
Annotations
  • @JsonSerializable.new()

Constructors

StacSliverToBoxAdapter({StacWidget? child})
Creates a StacSliverToBoxAdapter.
const
StacSliverToBoxAdapter.fromJson(Map<String, dynamic> json)
Creates a StacSliverToBoxAdapter from a JSON map.
factory

Properties

child → StacWidget?
The widget contained by this sliver.
final
hashCode → int
The hash code for this object.
no setterinherited
jsonData → Map<String, dynamic>?
Raw JSON data for this widget
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
Widget type identifier.
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(BuildContext context) → Widget?

Available on StacWidget?, provided by the StacWidgetParser extension

parsePreferredSizeWidget(BuildContext context) → PreferredSizeWidget?

Available on StacWidget?, provided by the StacWidgetParser extension

toJson() → Map<String, dynamic>
Converts this StacSliverToBoxAdapter instance to JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited