diff --git a/docs/snippets/playground_base.mdx b/docs/snippets/playground_base.mdx
new file mode 100644
index 000000000..3c27456ff
--- /dev/null
+++ b/docs/snippets/playground_base.mdx
@@ -0,0 +1 @@
+export const PLAYGROUND_BASE_URL = "https://playground.stac.dev/";
\ No newline at end of file
diff --git a/docs/widgets/alert_dialog.mdx b/docs/widgets/alert_dialog.mdx
index 0c668bcc5..095f8d98f 100644
--- a/docs/widgets/alert_dialog.mdx
+++ b/docs/widgets/alert_dialog.mdx
@@ -3,6 +3,62 @@ title: "AlertDialog"
description: "Documentation for AlertDialog"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const alertDialogPreviewJson = {
+ "type": "alertDialog",
+ "content": {
+ "type": "padding",
+ "padding": {
+ "top": 0,
+ "left": 12,
+ "right": 12,
+ "bottom": 8
+ },
+ "child": {
+ "type": "text",
+ "data": "Discard draft?",
+ "align": "center",
+ "style": {
+ "fontSize": 14
+ }
+ }
+ },
+ "actions": [
+ {
+ "type": "textButton",
+ "child": {
+ "type": "text",
+ "data": "CANCEL"
+ },
+ "onPressed": {
+ "actionType": "navigate",
+ "navigationStyle": "pop"
+ }
+ },
+ {
+ "type": "sizedBox",
+ "width": 8
+ },
+ {
+ "type": "textButton",
+ "child": {
+ "type": "text",
+ "data": "DISCARD"
+ },
+ "onPressed": {
+ "actionType": "navigate",
+ "navigationStyle": "pop"
+ }
+ },
+ {
+ "type": "sizedBox",
+ "width": 12
+ }
+ ]
+};
+export const alertDialogPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac AlertDialog allows you to build a Flutter alert dialog widget using JSON.
To know more about the alert dialog widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/AlertDialog-class.html).
@@ -39,8 +95,10 @@ To know more about the alert dialog widget in Flutter, refer to the [official do
## Example
-
-```dart Dart
+
+
+
+```dart
StacAlertDialog(
content: StacPadding(
padding: StacEdgeInsets(
@@ -70,7 +128,10 @@ StacAlertDialog(
)
```
-```json JSON
+
+
+
+```json
{
"type": "alertDialog",
"content": {
@@ -124,4 +185,37 @@ StacAlertDialog(
]
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/align.mdx b/docs/widgets/align.mdx
index 5ada47f3a..279f326c2 100644
--- a/docs/widgets/align.mdx
+++ b/docs/widgets/align.mdx
@@ -3,36 +3,68 @@ title: "Align"
description: "Documentation for Align"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const alignPreviewJson = {
+ "type": "scaffold",
+ "body": {
+ "type": "align",
+ "child": {
+ "type": "container",
+ "color": "#FC5632",
+ "height": 250,
+ "width": 200,
+ "child": {
+ "type": "align",
+ "alignment": "bottomCenter",
+ "child": {
+ "type": "text",
+ "data": "Flutter",
+ "style": {
+ "fontSize": 23,
+ "fontWeight": "w600"
+ }
+ }
+ }
+ }
+ }
+};
+export const alignPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Align allows you to build a Flutter Align widget using JSON.
To know more about the align widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Align-class.html).
+The playground centers the root widget; this example wraps `Align` in a `Scaffold` body so it gets full-screen constraints.
+
## Properties
-| Property | Type | Description |
-|--------------|-----------------------|-------------------------------------------------------------------------------|
-| alignment | `StacAlignment` | How to align the child. |
+| Property | Type | Description |
+|--------------|----------------------------|-------------------------------------------------------------------------------|
+| alignment | `StacAlignmentDirectional` | How to align the child. |
| widthFactor | `double` | If non-null, sets its width to the child's width multiplied by this factor. |
| heightFactor | `double` | If non-null, sets its height to the child's height multiplied by this factor. |
| child | `StacWidget` | The widget below this widget in the tree. |
## Example
-
-```dart Dart
-StacAlign(
- alignment: StacAlignment.topEnd,
- child: StacContainer(
- color: '#FC5632',
- clipBehavior: StacClip.hardEdge,
- height: 250,
- width: 200,
- child: StacAlign(
- alignment: StacAlignment.bottomCenter,
- child: StacText(
- data: 'Flutter',
- style: StacTextStyle(
- fontSize: 23,
- fontWeight: StacFontWeight.w600,
+
+
+
+```dart
+StacScaffold(
+ body: StacAlign(
+ child: StacContainer(
+ color: '#FC5632',
+ height: 250,
+ width: 200,
+ child: StacAlign(
+ alignment: StacAlignmentDirectional.bottomCenter,
+ child: StacText(
+ data: 'Flutter',
+ style: StacTextStyle(
+ fontSize: 23,
+ fontWeight: StacFontWeight.w600,
+ ),
),
),
),
@@ -40,29 +72,69 @@ StacAlign(
)
```
-```json JSON
+
+
+
+
+
+```json
{
- "type": "align",
- "alignment": "topEnd",
- "child": {
- "type": "container",
- "color": "#FC5632",
- "clipBehavior": "hardEdge",
- "height": 250,
- "width": 200,
+ "type": "scaffold",
+ "body": {
+ "type": "align",
"child": {
- "type": "align",
- "alignment": "bottomCenter",
+ "type": "container",
+ "color": "#FC5632",
+ "height": 250,
+ "width": 200,
"child": {
- "type": "text",
- "data": "Flutter",
- "style": {
- "fontSize": 23,
- "fontWeight": "w600"
+ "type": "align",
+ "alignment": "bottomCenter",
+ "child": {
+ "type": "text",
+ "data": "Flutter",
+ "style": {
+ "fontSize": 23,
+ "fontWeight": "w600"
+ }
}
}
}
}
}
```
-
+
+
+
+
+
+
+
diff --git a/docs/widgets/app_bar.mdx b/docs/widgets/app_bar.mdx
index 57d030eff..8eacdaf12 100644
--- a/docs/widgets/app_bar.mdx
+++ b/docs/widgets/app_bar.mdx
@@ -3,6 +3,35 @@ title: "AppBar"
description: "Documentation for AppBar"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const appBarPreviewJson = {
+ "type": "appBar",
+ "title": {
+ "type": "text",
+ "data": "App Bar Title"
+ },
+ "backgroundColor": "#FFFFFF",
+ "foregroundColor": "#000000",
+ "actions": [
+ {
+ "type": "iconButton",
+ "icon": {
+ "type": "icon",
+ "icon": "search"
+ }
+ },
+ {
+ "type": "iconButton",
+ "icon": {
+ "type": "icon",
+ "icon": "settings"
+ }
+ }
+ ]
+};
+export const appBarPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac AppBar allows you to build a Flutter app bar widget using JSON.
To know more about the app bar widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/AppBar-class.html).
@@ -32,8 +61,10 @@ To know more about the app bar widget in Flutter, refer to the [official documen
## Example
-
-```dart Dart
+
+
+
+```dart
StacAppBar(
title: StacText(data: 'App Bar Title'),
backgroundColor: StacColors.white,
@@ -49,7 +80,10 @@ StacAppBar(
)
```
-```json JSON
+
+
+
+```json
{
"type": "appBar",
"title": {
@@ -76,4 +110,37 @@ StacAppBar(
]
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/aspect_ratio.mdx b/docs/widgets/aspect_ratio.mdx
index ee50b0533..61a39b343 100644
--- a/docs/widgets/aspect_ratio.mdx
+++ b/docs/widgets/aspect_ratio.mdx
@@ -3,6 +3,20 @@ title: "AspectRatio"
description: "Documentation for AspectRatio"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const aspectRatioPreviewJson = {
+ "type": "aspectRatio",
+ "aspectRatio": 1.33,
+ "child": {
+ "type": "container",
+ "color": "#FF5733",
+ "width": 100,
+ "height": 100
+ }
+};
+export const aspectRatioPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac AspectRatio allows you to build a Flutter AspectRatio widget using JSON.
To know more about the aspectRatio widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/AspectRatio-class.html).
@@ -17,8 +31,10 @@ To know more about the aspectRatio widget in Flutter, refer to the [official doc
## Example
-
-```dart Dart
+
+
+
+```dart
StacAspectRatio(
aspectRatio: 1.33,
child: StacContainer(
@@ -29,7 +45,10 @@ StacAspectRatio(
)
```
-```json JSON
+
+
+
+```json
{
"type": "aspectRatio",
"aspectRatio": 1.33,
@@ -41,5 +60,37 @@ StacAspectRatio(
}
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/auto_complete.mdx b/docs/widgets/auto_complete.mdx
index 39ea78de0..5cfea7d03 100644
--- a/docs/widgets/auto_complete.mdx
+++ b/docs/widgets/auto_complete.mdx
@@ -3,6 +3,25 @@ title: "AutoComplete"
description: "Documentation for AutoComplete"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const autoCompletePreviewJson = {
+ "type": "autoComplete",
+ "options": [
+ "Option 1",
+ "Option 2",
+ "Option 3"
+ ],
+ "onSelected": {
+ "type": "callback",
+ "name": "onOptionSelected"
+ },
+ "optionsMaxHeight": 250,
+ "optionsViewOpenDirection": "up",
+ "initialValue": "Option 1"
+};
+export const autoCompletePreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac AutoComplete allows you to build a Flutter AutoComplete widget using JSON.
To know more about the AutoComplete widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/Autocomplete-class.html).
@@ -18,8 +37,10 @@ To know more about the AutoComplete widget in Flutter, refer to the [official do
## Example
-
-```dart Dart
+
+
+
+```dart
StacAutoComplete(
options: ['Option 1', 'Option 2', 'Option 3'],
onSelected: {'type': 'callback', 'name': 'onOptionSelected'},
@@ -29,10 +50,17 @@ StacAutoComplete(
)
```
-```json JSON
+
+
+
+```json
{
"type": "autoComplete",
- "options": ["Option 1", "Option 2", "Option 3"],
+ "options": [
+ "Option 1",
+ "Option 2",
+ "Option 3"
+ ],
"onSelected": {
"type": "callback",
"name": "onOptionSelected"
@@ -42,4 +70,37 @@ StacAutoComplete(
"initialValue": "Option 1"
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/backdrop_filter.mdx b/docs/widgets/backdrop_filter.mdx
index 167e2ab26..d4cb1e02e 100644
--- a/docs/widgets/backdrop_filter.mdx
+++ b/docs/widgets/backdrop_filter.mdx
@@ -3,6 +3,50 @@ title: "BackdropFilter"
description: "Documentation for BackdropFilter"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const backdropFilterPreviewJson = {
+ "type": "clipRRect",
+ "borderRadius": {
+ "all": 16
+ },
+ "child": {
+ "type": "sizedBox",
+ "height": 200,
+ "width": 300,
+ "child": {
+ "type": "stack",
+ "fit": "expand",
+ "children": [
+ {
+ "type": "container",
+ "decoration": {
+ "image": {
+ "src": "https://images.pexels.com/photos/1323550/pexels-photo-1323550.jpeg",
+ "fit": "cover"
+ }
+ }
+ },
+ {
+ "type": "backdropFilter",
+ "filter": {
+ "type": "blur",
+ "sigmaX": 15,
+ "sigmaY": 15
+ },
+ "child": {
+ "type": "container",
+ "decoration": {
+ "color": "#80FFFFFF"
+ }
+ }
+ }
+ ]
+ }
+ }
+};
+export const backdropFilterPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
Stac BackdropFilter allows you to build the Flutter BackdropFilter widget using JSON. This widget applies a filter to the existing painted content and then paints its child. It's commonly used to create frosted glass effects, blurs, and other visual effects.
To know more about the BackdropFilter widget in Flutter, refer to the official documentation for [Backdrop Filter](https://api.flutter.dev/flutter/widgets/BackdropFilter-class.html) and [Image Filter](https://api.flutter.dev/flutter/dart-ui/ImageFilter-class.html).
@@ -64,8 +108,10 @@ For best results with BackdropFilter:
### Example 1: Frosted Glass Effect
-
-```dart Dart
+
+
+
+```dart
StacClipRRect(
borderRadius: StacBorderRadius.all(16),
child: StacSizedBox(
@@ -94,7 +140,10 @@ StacClipRRect(
)
```
-```json JSON
+
+
+
+```json
{
"type": "clipRRect",
"borderRadius": {
@@ -121,8 +170,8 @@ StacClipRRect(
"type": "backdropFilter",
"filter": {
"type": "blur",
- "sigmaX": 15.0,
- "sigmaY": 15.0
+ "sigmaX": 15,
+ "sigmaY": 15
},
"child": {
"type": "container",
@@ -136,8 +185,40 @@ StacClipRRect(
}
}
```
-
+
+
+
+
+
### Example 2: Dilate Filter Effect
diff --git a/docs/widgets/badge.mdx b/docs/widgets/badge.mdx
index 226f83372..889c0955e 100644
--- a/docs/widgets/badge.mdx
+++ b/docs/widgets/badge.mdx
@@ -3,6 +3,24 @@ title: "Badge"
description: "Documentation for Badge"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const badgePreviewJson = {
+ "type": "badge",
+ "label": {
+ "type": "text",
+ "data": "5"
+ },
+ "child": {
+ "type": "icon",
+ "icon": "notifications",
+ "size": 32
+ },
+ "backgroundColor": "#F44336",
+ "textColor": "#FFFFFF"
+};
+export const badgePreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Badge allows you to build a Flutter Badge widget using JSON.
To know more about the Badge widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/Badge-class.html).
@@ -28,8 +46,10 @@ To know more about the Badge widget in Flutter, refer to the [official documenta
### Basic Badge with Label
-
-```dart Dart
+
+
+
+```dart
StacBadge(
label: StacText(data: '5'),
child: StacIcon(icon: 'notifications', size: 32),
@@ -38,7 +58,10 @@ StacBadge(
)
```
-```json JSON
+
+
+
+```json
{
"type": "badge",
"label": {
@@ -54,8 +77,40 @@ StacBadge(
"textColor": "#FFFFFF"
}
```
-
+
+
+
+
+
### Badge with Count
diff --git a/docs/widgets/bottom_navigation_bar.mdx b/docs/widgets/bottom_navigation_bar.mdx
index 216783d53..ae0b70982 100644
--- a/docs/widgets/bottom_navigation_bar.mdx
+++ b/docs/widgets/bottom_navigation_bar.mdx
@@ -3,6 +3,91 @@ title: "BottomNavigationBar"
description: "Documentation for BottomNavigationBar"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const bottomNavigationBarPreviewJson = {
+ "type": "defaultBottomNavigationController",
+ "length": 3,
+ "child": {
+ "type": "scaffold",
+ "appBar": {
+ "type": "appBar",
+ "title": {
+ "type": "text",
+ "data": "Bottom Navigation Screen"
+ }
+ },
+ "body": {
+ "type": "bottomNavigationView",
+ "children": [
+ {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Home",
+ "style": {
+ "fontSize": 24
+ }
+ }
+ },
+ {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Search",
+ "style": {
+ "fontSize": 24
+ }
+ }
+ },
+ {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Profile",
+ "style": {
+ "fontSize": 24
+ }
+ }
+ }
+ ]
+ },
+ "bottomNavigationBar": {
+ "type": "bottomNavigationBar",
+ "items": [
+ {
+ "type": "navigationBarItem",
+ "label": "Home",
+ "icon": {
+ "type": "icon",
+ "iconType": "material",
+ "icon": "home"
+ }
+ },
+ {
+ "type": "navigationBarItem",
+ "label": "Search",
+ "icon": {
+ "type": "icon",
+ "iconType": "material",
+ "icon": "search"
+ }
+ },
+ {
+ "type": "navigationBarItem",
+ "label": "Profile",
+ "icon": {
+ "type": "icon",
+ "iconType": "material",
+ "icon": "account_circle"
+ }
+ }
+ ]
+ }
+ }
+};
+export const bottomNavigationBarPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac BottomNavigationBar allows you to build a Flutter BottomNavigationBar widget using JSON.
To know more about the BottomNavigationBar widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/BottomNavigationBar-class.html).
@@ -39,7 +124,6 @@ DefaultBottomNavigationController is an inherited widget that is used to share a
| initialIndex | `int` | The initial index of the selected item. |
| child | `StacWidget` | The widget below this widget in the tree. |
-
## BottomNavigationBarItem
The Stac BottomNavigationBarItem allows you to build a Flutter BottomNavigationBarItem using JSON.
@@ -65,11 +149,12 @@ A page view that displays the widget which corresponds to the currently selected
|----------|-------------------------------|--------------------------------------------------|
| children | `List` | The widgets below this widget in the tree. |
-
## Example
-
-```dart Dart
+
+
+
+```dart
StacDefaultBottomNavigationController(
length: 3,
child: StacScaffold(
@@ -118,7 +203,10 @@ StacDefaultBottomNavigationController(
)
```
-```json JSON
+
+
+
+```json
{
"type": "defaultBottomNavigationController",
"length": 3,
@@ -201,4 +289,37 @@ StacDefaultBottomNavigationController(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/card.mdx b/docs/widgets/card.mdx
index 55d47c53f..40a1f137f 100644
--- a/docs/widgets/card.mdx
+++ b/docs/widgets/card.mdx
@@ -3,6 +3,34 @@ title: "Card"
description: "Documentation for Card"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const cardPreviewJson = {
+ "type": "card",
+ "color": "#FFFFFF",
+ "shadowColor": "#000000",
+ "surfaceTintColor": "#FF0000",
+ "elevation": 5,
+ "shape": {
+ "type": "roundedRectangle",
+ "borderRadius": 10
+ },
+ "borderOnForeground": true,
+ "margin": {
+ "left": 10,
+ "top": 20,
+ "right": 10,
+ "bottom": 20
+ },
+ "clipBehavior": "antiAlias",
+ "child": {
+ "type": "text",
+ "data": "This is a card."
+ },
+ "semanticContainer": true
+};
+export const cardPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Card allows you to build a Flutter Card widget using JSON.
To know more about the Card widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/Card-class.html).
@@ -23,8 +51,10 @@ To know more about the Card widget in Flutter, refer to the [official documentat
## Example
-
-```dart Dart
+
+
+
+```dart
StacCard(
color: StacColors.white,
shadowColor: StacColors.black,
@@ -39,16 +69,19 @@ StacCard(
)
```
-```json JSON
+
+
+
+```json
{
"type": "card",
"color": "#FFFFFF",
"shadowColor": "#000000",
"surfaceTintColor": "#FF0000",
- "elevation": 5.0,
+ "elevation": 5,
"shape": {
"type": "roundedRectangle",
- "borderRadius": 10.0
+ "borderRadius": 10
},
"borderOnForeground": true,
"margin": {
@@ -65,4 +98,37 @@ StacCard(
"semanticContainer": true
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/carousel_view.mdx b/docs/widgets/carousel_view.mdx
index 16bfaa3d3..ebc84e861 100644
--- a/docs/widgets/carousel_view.mdx
+++ b/docs/widgets/carousel_view.mdx
@@ -3,6 +3,53 @@ title: "CarouselView"
description: "Documentation for CarouselView"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const carouselViewPreviewJson = {
+ "type": "carouselView",
+ "carouselType": "weighted",
+ "padding": 12,
+ "backgroundColor": "#FFFFFF",
+ "elevation": 5,
+ "overlayColor": "#FF0000",
+ "itemSnapping": true,
+ "shrinkExtent": 0,
+ "scrollDirection": "horizontal",
+ "reverse": false,
+ "onTap": {
+ "type": "callback",
+ "name": "onItemTap"
+ },
+ "enableSplash": true,
+ "itemExtent": 300,
+ "flexWeights": [
+ 1,
+ 7,
+ 1
+ ],
+ "children": [
+ {
+ "type": "image",
+ "height": 400,
+ "fit": "cover",
+ "src": "https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_1.png"
+ },
+ {
+ "type": "image",
+ "height": 400,
+ "fit": "cover",
+ "src": "https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_2.png"
+ },
+ {
+ "type": "image",
+ "height": 400,
+ "fit": "cover",
+ "src": "https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_3.png"
+ }
+ ]
+};
+export const carouselViewPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac CarouselView allows you to build a Flutter CarouselView widget using JSON.
To know more about the CarouselView widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Carousel-class.html).
@@ -27,8 +74,10 @@ To know more about the CarouselView widget in Flutter, refer to the [official do
## Example
-
-```dart Dart
+
+
+
+```dart
StacCarouselView(
carouselType: StacCarouselViewType.weighted,
padding: StacEdgeInsets.all(12),
@@ -63,16 +112,19 @@ StacCarouselView(
)
```
-```json JSON
+
+
+
+```json
{
"type": "carouselView",
"carouselType": "weighted",
"padding": 12,
"backgroundColor": "#FFFFFF",
- "elevation": 5.0,
+ "elevation": 5,
"overlayColor": "#FF0000",
"itemSnapping": true,
- "shrinkExtent": 0.0,
+ "shrinkExtent": 0,
"scrollDirection": "horizontal",
"reverse": false,
"onTap": {
@@ -81,7 +133,11 @@ StacCarouselView(
},
"enableSplash": true,
"itemExtent": 300,
- "flexWeights": [1, 7, 1],
+ "flexWeights": [
+ 1,
+ 7,
+ 1
+ ],
"children": [
{
"type": "image",
@@ -104,4 +160,37 @@ StacCarouselView(
]
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/center.mdx b/docs/widgets/center.mdx
index c04973589..8202bb457 100644
--- a/docs/widgets/center.mdx
+++ b/docs/widgets/center.mdx
@@ -3,6 +3,17 @@ title: "Center"
description: "Documentation for Center"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const centerPreviewJson = {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Hello, World!"
+ }
+};
+export const centerPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Center allows you to build a Flutter center widget using JSON.
To know more about the center widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Center-class.html).
@@ -16,14 +27,19 @@ To know more about the center widget in Flutter, refer to the [official document
## Example
-
-```dart Dart
+
+
+
+```dart
StacCenter(
child: StacText(data: 'Hello, World!'),
)
```
-```json JSON
+
+
+
+```json
{
"type": "center",
"child": {
@@ -32,4 +48,37 @@ StacCenter(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/check_box.mdx b/docs/widgets/check_box.mdx
index 288e5b7cc..31621deba 100644
--- a/docs/widgets/check_box.mdx
+++ b/docs/widgets/check_box.mdx
@@ -3,6 +3,29 @@ title: "CheckBox"
description: "Documentation for CheckBox"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const checkBoxPreviewJson = {
+ "type": "checkBox",
+ "id": "checkbox_1",
+ "value": true,
+ "tristate": false,
+ "mouseCursor": "click",
+ "activeColor": "#FF0000",
+ "fillColor": {
+ "type": "materialColor",
+ "color": "#00FF00"
+ },
+ "checkColor": "#0000FF",
+ "focusColor": "#FFFF00",
+ "hoverColor": "#FF00FF",
+ "splashRadius": 20,
+ "materialTapTargetSize": "padded",
+ "autofocus": true,
+ "isError": false
+};
+export const checkBoxPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac CheckBox allows you to build a Flutter CheckBox widget using JSON.
To know more about the CheckBox widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/Checkbox-class.html).
@@ -28,8 +51,10 @@ To know more about the CheckBox widget in Flutter, refer to the [official docume
## Example
-
-```dart Dart
+
+
+
+```dart
StacCheckBox(
id: 'checkbox_1',
value: true,
@@ -47,7 +72,10 @@ StacCheckBox(
)
```
-```json JSON
+
+
+
+```json
{
"type": "checkBox",
"id": "checkbox_1",
@@ -62,10 +90,43 @@ StacCheckBox(
"checkColor": "#0000FF",
"focusColor": "#FFFF00",
"hoverColor": "#FF00FF",
- "splashRadius": 20.0,
+ "splashRadius": 20,
"materialTapTargetSize": "padded",
"autofocus": true,
"isError": false
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/chip.mdx b/docs/widgets/chip.mdx
index d11a4157c..6e54e1d37 100644
--- a/docs/widgets/chip.mdx
+++ b/docs/widgets/chip.mdx
@@ -3,6 +3,79 @@ title: "Chip"
description: "Documentation for Chip"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const chipPreviewJson = {
+ "type": "chip",
+ "avatar": {
+ "type": "circleAvatar",
+ "backgroundColor": "#FF0000",
+ "child": {
+ "type": "text",
+ "data": "A"
+ }
+ },
+ "label": {
+ "type": "text",
+ "data": "Chip Label"
+ },
+ "labelStyle": {
+ "color": "#000000",
+ "fontSize": 14
+ },
+ "labelPadding": {
+ "left": 8,
+ "top": 4,
+ "right": 8,
+ "bottom": 4
+ },
+ "deleteIcon": {
+ "type": "icon",
+ "icon": "delete"
+ },
+ "deleteIconColor": "#FF0000",
+ "deleteButtonTooltipMessage": "Delete",
+ "side": {
+ "color": "#000000",
+ "width": 1
+ },
+ "shape": {
+ "type": "roundedRectangle",
+ "borderRadius": 8
+ },
+ "clipBehavior": "antiAlias",
+ "autofocus": false,
+ "color": "#FFFFFF",
+ "backgroundColor": "#EEEEEE",
+ "padding": {
+ "left": 8,
+ "top": 4,
+ "right": 8,
+ "bottom": 4
+ },
+ "visualDensity": {
+ "horizontal": 0,
+ "vertical": 0
+ },
+ "materialTapTargetSize": "padded",
+ "elevation": 2,
+ "shadowColor": "#000000",
+ "surfaceTintColor": "#FFFFFF",
+ "iconTheme": {
+ "color": "#000000",
+ "size": 24
+ },
+ "avatarBoxConstraints": {
+ "minWidth": 24,
+ "minHeight": 24
+ },
+ "deleteIconBoxConstraints": {
+ "minWidth": 24,
+ "minHeight": 24
+ }
+};
+export const chipPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Chip allows you to build a Flutter Chip widget using JSON.
To know more about the Chip widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/Chip-class.html).
@@ -36,8 +109,10 @@ To know more about the Chip widget in Flutter, refer to the [official documentat
## Example
-
-```dart Dart
+
+
+
+```dart
StacChip(
avatar: StacCircleAvatar(
backgroundColor: StacColors.red,
@@ -67,7 +142,10 @@ StacChip(
)
```
-```json JSON
+
+
+
+```json
{
"type": "chip",
"avatar": {
@@ -100,11 +178,11 @@ StacChip(
"deleteButtonTooltipMessage": "Delete",
"side": {
"color": "#000000",
- "width": 1.0
+ "width": 1
},
"shape": {
"type": "roundedRectangle",
- "borderRadius": 8.0
+ "borderRadius": 8
},
"clipBehavior": "antiAlias",
"autofocus": false,
@@ -117,25 +195,58 @@ StacChip(
"bottom": 4
},
"visualDensity": {
- "horizontal": 0.0,
- "vertical": 0.0
+ "horizontal": 0,
+ "vertical": 0
},
"materialTapTargetSize": "padded",
- "elevation": 2.0,
+ "elevation": 2,
"shadowColor": "#000000",
"surfaceTintColor": "#FFFFFF",
"iconTheme": {
"color": "#000000",
- "size": 24.0
+ "size": 24
},
"avatarBoxConstraints": {
- "minWidth": 24.0,
- "minHeight": 24.0
+ "minWidth": 24,
+ "minHeight": 24
},
"deleteIconBoxConstraints": {
- "minWidth": 24.0,
- "minHeight": 24.0
+ "minWidth": 24,
+ "minHeight": 24
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/circle_avatar.mdx b/docs/widgets/circle_avatar.mdx
index 78f7f6ad8..dff78a7bb 100644
--- a/docs/widgets/circle_avatar.mdx
+++ b/docs/widgets/circle_avatar.mdx
@@ -3,6 +3,21 @@ title: "CircleAvatar"
description: "Documentation for CircleAvatar"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const circleAvatarPreviewJson = {
+ "type": "circleAvatar",
+ "backgroundColor": "#FF0000",
+ "foregroundColor": "#FFFFFF",
+ "backgroundImage": "https://raw.githubusercontent.com/StacDev/stac/refs/heads/dev/assets/companies/bettrdo.jpg",
+ "radius": 50,
+ "child": {
+ "type": "text",
+ "data": "A"
+ }
+};
+export const circleAvatarPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac CircleAvatar allows you to build a Flutter circle avatar widget using JSON.
To know more about the circle avatar widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/CircleAvatar-class.html).
@@ -23,8 +38,10 @@ To know more about the circle avatar widget in Flutter, refer to the [official d
## Example
-
-```dart Dart
+
+
+
+```dart
StacCircleAvatar(
backgroundColor: StacColors.red,
foregroundColor: StacColors.white,
@@ -34,7 +51,10 @@ StacCircleAvatar(
)
```
-```json JSON
+
+
+
+```json
{
"type": "circleAvatar",
"backgroundColor": "#FF0000",
@@ -47,4 +67,37 @@ StacCircleAvatar(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/circular_progress_indicator.mdx b/docs/widgets/circular_progress_indicator.mdx
index 709310621..a02a9bbfc 100644
--- a/docs/widgets/circular_progress_indicator.mdx
+++ b/docs/widgets/circular_progress_indicator.mdx
@@ -3,6 +3,17 @@ title: "CircularProgressIndicator"
description: "Documentation for CircularProgressIndicator"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const circularProgressIndicatorPreviewJson = {
+ "type": "circularProgressIndicator",
+ "color": "#541204",
+ "strokeWidth": 6,
+ "backgroundColor": "#FFD700",
+ "strokeCap": "round"
+};
+export const circularProgressIndicatorPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac CircularProgressIndicator allows you to build a Flutter CircularProgressIndicator widget using JSON.
To know more about the CircularProgressIndicator widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/CircularProgressIndicator-class.html).
@@ -19,11 +30,12 @@ To know more about the CircularProgressIndicator widget in Flutter, refer to the
| semanticsValue | `String` | Provides a textual description of the widget. |
| strokeCap | `StacStrokeCap` | The progress indicator's line ending. |
-
## Example
-
-```dart Dart
+
+
+
+```dart
StacCircularProgressIndicator(
color: '#541204',
strokeWidth: 6,
@@ -32,7 +44,10 @@ StacCircularProgressIndicator(
)
```
-```json JSON
+
+
+
+```json
{
"type": "circularProgressIndicator",
"color": "#541204",
@@ -41,6 +56,38 @@ StacCircularProgressIndicator(
"strokeCap": "round"
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/clip_oval.mdx b/docs/widgets/clip_oval.mdx
index 569e3c520..f06fb3729 100644
--- a/docs/widgets/clip_oval.mdx
+++ b/docs/widgets/clip_oval.mdx
@@ -3,6 +3,21 @@ title: "ClipOval"
description: "Documentation for ClipOval"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const clipOvalPreviewJson = {
+ "type": "clipOval",
+ "clipBehavior": "antiAlias",
+ "child": {
+ "type": "image",
+ "src": "https://placehold.co/600x400",
+ "width": 200,
+ "height": 200,
+ "fit": "cover"
+ }
+};
+export const clipOvalPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
Stac ClipOval allows you to build the Flutter ClipOval widget using JSON. It clips its child using an oval shape, which is useful for creating circular or oval UI elements.
To know more about the ClipOval widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/ClipOval-class.html).
@@ -13,11 +28,12 @@ To know more about the ClipOval widget in Flutter, refer to the [official docume
| clipBehavior | `StacClip` | `antiAlias` | The clipping behavior when content extends beyond the oval. |
| child | `StacWidget` | Required | The widget to clip with an oval shape. |
-
## Example
-
-```dart Dart
+
+
+
+```dart
StacClipOval(
clipBehavior: StacClip.antiAlias,
child: StacImage(
@@ -29,7 +45,10 @@ StacClipOval(
)
```
-```json JSON
+
+
+
+```json
{
"type": "clipOval",
"clipBehavior": "antiAlias",
@@ -42,4 +61,37 @@ StacClipOval(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/clip_rrect.mdx b/docs/widgets/clip_rrect.mdx
index 2905e9463..2d50b66f9 100644
--- a/docs/widgets/clip_rrect.mdx
+++ b/docs/widgets/clip_rrect.mdx
@@ -3,12 +3,29 @@ title: "ClipRRect"
description: "Documentation for ClipRRect"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const clipRrectPreviewJson = {
+ "type": "clipRRect",
+ "borderRadius": 8,
+ "clipBehavior": "antiAlias",
+ "child": {
+ "type": "container",
+ "color": "#FF0000",
+ "height": 100,
+ "width": 100
+ }
+};
+export const clipRrectPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The `ClipRRect` widget in Stac allows you to clip its child using rounded rectangles. This is useful when you want to create UI elements with rounded corners.
## Usage
-
-```dart Dart
+
+
+
+```dart
StacClipRRect(
borderRadius: StacBorderRadius.all(8.0),
clipBehavior: StacClip.antiAlias,
@@ -20,10 +37,13 @@ StacClipRRect(
)
```
-```json JSON
+
+
+
+```json
{
"type": "clipRRect",
- "borderRadius": 8.0,
+ "borderRadius": 8,
"clipBehavior": "antiAlias",
"child": {
"type": "container",
@@ -33,8 +53,40 @@ StacClipRRect(
}
}
```
-
+
+
+
+
+
## Properties
| Property | Type | Default | Description |
diff --git a/docs/widgets/colored_box.mdx b/docs/widgets/colored_box.mdx
index 95e950dbb..ebb7782da 100644
--- a/docs/widgets/colored_box.mdx
+++ b/docs/widgets/colored_box.mdx
@@ -3,6 +3,18 @@ title: "ColoredBox"
description: "Documentation for ColoredBox"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const coloredBoxPreviewJson = {
+ "type": "coloredBox",
+ "color": "#FF0000",
+ "child": {
+ "type": "text",
+ "data": "Hello, World!"
+ }
+};
+export const coloredBoxPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Colored Box allows you to build a Flutter colored box widget using JSON.
To know more about the colored box widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/ColoredBox-class.html).
@@ -15,15 +27,20 @@ To know more about the colored box widget in Flutter, refer to the [official doc
## Example
-
-```dart Dart
+
+
+
+```dart
StacColoredBox(
color: StacColors.red,
child: StacText(data: 'Hello, World!'),
)
```
-```json JSON
+
+
+
+```json
{
"type": "coloredBox",
"color": "#FF0000",
@@ -33,4 +50,37 @@ StacColoredBox(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/column.mdx b/docs/widgets/column.mdx
index bcd2cd2e9..9d75fdd64 100644
--- a/docs/widgets/column.mdx
+++ b/docs/widgets/column.mdx
@@ -3,6 +3,31 @@ title: "Column"
description: "Documentation for Column"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const columnPreviewJson = {
+ "type": "column",
+ "mainAxisAlignment": "center",
+ "crossAxisAlignment": "start",
+ "mainAxisSize": "min",
+ "textDirection": "ltr",
+ "verticalDirection": "up",
+ "spacing": 10,
+ "children": [
+ {
+ "type": "text",
+ "data": "Hello, World!"
+ },
+ {
+ "type": "container",
+ "width": 100,
+ "height": 100,
+ "color": "#FF0000"
+ }
+ ]
+};
+export const columnPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Column allows you to build a Flutter column widget using JSON.
To know more about the column widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Column-class.html).
@@ -21,8 +46,10 @@ To know more about the column widget in Flutter, refer to the [official document
## Example
-
-```dart Dart
+
+
+
+```dart
StacColumn(
mainAxisAlignment: StacMainAxisAlignment.center,
crossAxisAlignment: StacCrossAxisAlignment.start,
@@ -41,7 +68,10 @@ StacColumn(
)
```
-```json JSON
+
+
+
+```json
{
"type": "column",
"mainAxisAlignment": "center",
@@ -64,4 +94,37 @@ StacColumn(
]
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/conditional.mdx b/docs/widgets/conditional.mdx
index 9377a1d08..6d3a845bc 100644
--- a/docs/widgets/conditional.mdx
+++ b/docs/widgets/conditional.mdx
@@ -3,6 +3,22 @@ title: "Conditional"
description: "Documentation for Conditional"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const conditionalPreviewJson = {
+ "type": "conditional",
+ "condition": "user.isLoggedIn == true",
+ "ifTrue": {
+ "type": "text",
+ "data": "Welcome back!"
+ },
+ "ifFalse": {
+ "type": "text",
+ "data": "Please sign in"
+ }
+};
+export const conditionalPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Conditional allows you to conditionally render widgets based on a boolean expression. It evaluates the condition at runtime and renders either the `ifTrue` or `ifFalse` widget.
## Properties
@@ -15,8 +31,10 @@ The Stac Conditional allows you to conditionally render widgets based on a boole
## Example
-
-```dart Dart
+
+
+
+```dart
StacConditional(
condition: 'user.isLoggedIn == true',
ifTrue: StacText(data: 'Welcome back!'),
@@ -24,7 +42,10 @@ StacConditional(
)
```
-```json JSON
+
+
+
+```json
{
"type": "conditional",
"condition": "user.isLoggedIn == true",
@@ -38,8 +59,40 @@ StacConditional(
}
}
```
-
+
+
+
+
+
## Conditional with Complex Widgets
diff --git a/docs/widgets/container.mdx b/docs/widgets/container.mdx
index d45084e0d..b7f59916f 100644
--- a/docs/widgets/container.mdx
+++ b/docs/widgets/container.mdx
@@ -3,6 +3,39 @@ title: "Container"
description: "Documentation for Container"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const containerPreviewJson = {
+ "type": "container",
+ "alignment": "center",
+ "padding": {
+ "top": 16,
+ "bottom": 16,
+ "left": 16,
+ "right": 16
+ },
+ "decoration": {
+ "color": "#FF5733",
+ "borderRadius": {
+ "topLeft": 16,
+ "topRight": 16,
+ "bottomLeft": 16,
+ "bottomRight": 16
+ }
+ },
+ "width": 200,
+ "height": 200,
+ "child": {
+ "type": "text",
+ "data": "Hello, World!",
+ "style": {
+ "color": "#FFFFFF",
+ "fontSize": 24
+ }
+ }
+};
+export const containerPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Container allows you to build a Flutter Container widget using JSON.
To know more about the container widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Container-class.html).
@@ -23,11 +56,12 @@ To know more about the container widget in Flutter, refer to the [official docum
| child | `StacWidget` | The child widget of the container. |
| clipBehavior | `StacClip` | The clip behavior of the container. |
-
## Example
-
-```dart Dart
+
+
+
+```dart
StacContainer(
alignment: StacAlignment.center,
padding: StacEdgeInsets(
@@ -57,37 +91,72 @@ StacContainer(
)
```
-```json JSON
+
+
+
+```json
{
"type": "container",
"alignment": "center",
"padding": {
- "top": 16.0,
- "bottom": 16.0,
- "left": 16.0,
- "right": 16.0
+ "top": 16,
+ "bottom": 16,
+ "left": 16,
+ "right": 16
},
"decoration": {
"color": "#FF5733",
"borderRadius": {
- "topLeft": 16.0,
- "topRight": 16.0,
- "bottomLeft": 16.0,
- "bottomRight": 16.0
+ "topLeft": 16,
+ "topRight": 16,
+ "bottomLeft": 16,
+ "bottomRight": 16
}
},
- "width": 200.0,
- "height": 200.0,
+ "width": 200,
+ "height": 200,
"child": {
"type": "text",
"data": "Hello, World!",
"style": {
"color": "#FFFFFF",
- "fontSize": 24.0
+ "fontSize": 24
}
}
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/custom_scroll_view.mdx b/docs/widgets/custom_scroll_view.mdx
index 5405971e2..5fecf4c73 100644
--- a/docs/widgets/custom_scroll_view.mdx
+++ b/docs/widgets/custom_scroll_view.mdx
@@ -3,6 +3,32 @@ title: "CustomScrollView"
description: "Documentation for CustomScrollView"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const customScrollViewPreviewJson = {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverAppBar",
+ "title": {
+ "type": "text",
+ "data": "SliverAppBar"
+ },
+ "leading": {
+ "type": "iconButton",
+ "icon": {
+ "type": "icon",
+ "iconType": "material",
+ "icon": "menu"
+ },
+ "onPressed": {}
+ },
+ "backgroundColor": "primary"
+ }
+ ]
+};
+export const customScrollViewPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac CustomScrollView allows you to build a Flutter CustomScrollView widget using JSON.
To know more about the CustomScrollView widget in Flutter, refer to
the [official documentation](https://api.flutter.dev/flutter/widgets/CustomScrollView-class.html).
@@ -24,8 +50,10 @@ the [official documentation](https://api.flutter.dev/flutter/widgets/CustomScrol
## Example
-
-```dart Dart
+
+
+
+```dart
StacCustomScrollView(
slivers: [
StacSliverAppBar(
@@ -40,7 +68,10 @@ StacCustomScrollView(
)
```
-```json JSON
+
+
+
+```json
{
"type": "customScrollView",
"slivers": [
@@ -64,4 +95,37 @@ StacCustomScrollView(
]
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/divider.mdx b/docs/widgets/divider.mdx
index 945d5293b..f4e8ff166 100644
--- a/docs/widgets/divider.mdx
+++ b/docs/widgets/divider.mdx
@@ -3,6 +3,17 @@ title: "Divider"
description: "Documentation for Divider"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const dividerPreviewJson = {
+ "type": "divider",
+ "thickness": 2,
+ "color": "#FF0000",
+ "indent": 16,
+ "endIndent": 16
+};
+export const dividerPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Divider allows you to build a Flutter Divider widget using JSON. It creates a thin horizontal line with padding on either side.
To know more about the Divider widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/Divider-class.html).
@@ -18,8 +29,10 @@ To know more about the Divider widget in Flutter, refer to the [official documen
## Example
-
-```dart Dart
+
+
+
+```dart
StacDivider(
thickness: 2.0,
color: StacColors.red,
@@ -28,17 +41,52 @@ StacDivider(
)
```
-```json JSON
+
+
+
+```json
{
"type": "divider",
- "thickness": 2.0,
+ "thickness": 2,
"color": "#FF0000",
- "indent": 16.0,
- "endIndent": 16.0
+ "indent": 16,
+ "endIndent": 16
}
```
-
+
+
+
+
+
## Divider in a List
diff --git a/docs/widgets/drawer.mdx b/docs/widgets/drawer.mdx
index fe6a85c2b..692463608 100644
--- a/docs/widgets/drawer.mdx
+++ b/docs/widgets/drawer.mdx
@@ -3,6 +3,41 @@ title: "Drawer"
description: "Documentation for Drawer"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const drawerPreviewJson = {
+ "type": "drawer",
+ "backgroundColor": "#FFFFFF",
+ "elevation": 16,
+ "shadowColor": "#000000",
+ "surfaceTintColor": "#F2F2F2",
+ "shape": {
+ "type": "roundedRectangleBorder",
+ "borderRadius": 16
+ },
+ "width": 304,
+ "semanticLabel": "Navigation Drawer",
+ "clipBehavior": "antiAlias",
+ "child": {
+ "type": "column",
+ "children": [
+ {
+ "type": "text",
+ "data": "Drawer Header"
+ },
+ {
+ "type": "text",
+ "data": "Item 1"
+ },
+ {
+ "type": "text",
+ "data": "Item 2"
+ }
+ ]
+ }
+};
+export const drawerPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Drawer allows you to build a Flutter Drawer widget using JSON.
To know more about the Drawer widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/Drawer-class.html).
@@ -22,8 +57,10 @@ To know more about the Drawer widget in Flutter, refer to the [official document
## Example
-
-```dart Dart
+
+
+
+```dart
StacDrawer(
backgroundColor: StacColors.white,
elevation: 16.0,
@@ -43,18 +80,21 @@ StacDrawer(
)
```
-```json JSON
+
+
+
+```json
{
"type": "drawer",
"backgroundColor": "#FFFFFF",
- "elevation": 16.0,
+ "elevation": 16,
"shadowColor": "#000000",
"surfaceTintColor": "#F2F2F2",
"shape": {
"type": "roundedRectangleBorder",
"borderRadius": 16
},
- "width": 304.0,
+ "width": 304,
"semanticLabel": "Navigation Drawer",
"clipBehavior": "antiAlias",
"child": {
@@ -76,4 +116,37 @@ StacDrawer(
}
}
```
-
+
+
+
+
+
+
diff --git a/docs/widgets/dropdown_menu.mdx b/docs/widgets/dropdown_menu.mdx
index b8c1f2fb2..2fcfdc725 100644
--- a/docs/widgets/dropdown_menu.mdx
+++ b/docs/widgets/dropdown_menu.mdx
@@ -3,6 +3,45 @@ title: "DropdownMenu"
description: "Documentation for DropdownMenu"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const dropdownMenuPreviewJson = {
+ "type": "dropdownMenu",
+ "label": {
+ "type": "text",
+ "data": "Select an option"
+ },
+ "hintText": "Please select",
+ "width": 200,
+ "dropdownMenuEntries": [
+ {
+ "value": "option1",
+ "label": "Option 1",
+ "leadingIcon": {
+ "type": "icon",
+ "icon": "home"
+ }
+ },
+ {
+ "value": "option2",
+ "label": "Option 2",
+ "leadingIcon": {
+ "type": "icon",
+ "icon": "settings"
+ }
+ },
+ {
+ "value": "option3",
+ "label": "Option 3",
+ "leadingIcon": {
+ "type": "icon",
+ "icon": "favorite"
+ }
+ }
+ ]
+};
+export const dropdownMenuPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac DropdownMenu allows you to build a Flutter DropdownMenu widget using JSON.
To know more about the DropdownMenu widget in Flutter, refer to
the [official documentation](https://api.flutter.dev/flutter/material/DropdownMenu-class.html).
@@ -46,8 +85,10 @@ the [official documentation](https://api.flutter.dev/flutter/material/DropdownMe
## Example
-
-```dart Dart
+
+
+
+```dart
StacDropdownMenu(
label: StacText(data: 'Select an option'),
hintText: 'Please select',
@@ -72,7 +113,10 @@ StacDropdownMenu(
)
```
-```json JSON
+
+
+
+```json
{
"type": "dropdownMenu",
"label": {
@@ -87,7 +131,7 @@ StacDropdownMenu(
"label": "Option 1",
"leadingIcon": {
"type": "icon",
- "iconData": "home"
+ "icon": "home"
}
},
{
@@ -95,7 +139,7 @@ StacDropdownMenu(
"label": "Option 2",
"leadingIcon": {
"type": "icon",
- "iconData": "settings"
+ "icon": "settings"
}
},
{
@@ -103,10 +147,43 @@ StacDropdownMenu(
"label": "Option 3",
"leadingIcon": {
"type": "icon",
- "iconData": "favorite"
+ "icon": "favorite"
}
}
]
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/dynamic_view.mdx b/docs/widgets/dynamic_view.mdx
index f6be50ba1..c80079eaf 100644
--- a/docs/widgets/dynamic_view.mdx
+++ b/docs/widgets/dynamic_view.mdx
@@ -3,6 +3,21 @@ title: "Dynamic View"
description: "Documentation for Dynamic View"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const dynamicViewPreviewJson = {
+ "type": "dynamicView",
+ "request": {
+ "url": "https://api.example.com/user/1",
+ "method": "get"
+ },
+ "template": {
+ "type": "text",
+ "data": "Hello, {{name}}!"
+ }
+};
+export const dynamicViewPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
## Overview
The `dynamicView` widget allows you to fetch data from an API and render it using a template. This powerful feature enables dynamic content rendering based on remote data sources, making it perfect for creating data-driven UIs without writing custom code.
@@ -32,8 +47,10 @@ The `dynamicView` widget allows you to fetch data from an API and render it usin
## Basic Usage
-
-```dart Dart
+
+
+
+```dart
StacDynamicView(
request: StacNetworkRequest(
url: 'https://api.example.com/user/1',
@@ -43,7 +60,10 @@ StacDynamicView(
)
```
-```json JSON
+
+
+
+```json
{
"type": "dynamicView",
"request": {
@@ -56,8 +76,40 @@ StacDynamicView(
}
}
```
-
+
+
+
+
+
## Data Placeholders
Use double curly braces `{{placeholder}}` to insert data from the API response into your template:
diff --git a/docs/widgets/elevated_button.mdx b/docs/widgets/elevated_button.mdx
index a045713bf..c37fdfef2 100644
--- a/docs/widgets/elevated_button.mdx
+++ b/docs/widgets/elevated_button.mdx
@@ -3,6 +3,27 @@ title: "ElevatedButton"
description: "Documentation for ElevatedButton"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const elevatedButtonPreviewJson = {
+ "type": "elevatedButton",
+ "onPressed": {},
+ "onLongPress": {},
+ "onHover": {},
+ "onFocusChange": {},
+ "style": {
+ "backgroundColor": "primary",
+ "foregroundColor": "#FFFFFF"
+ },
+ "autofocus": false,
+ "clipBehavior": "none",
+ "child": {
+ "type": "text",
+ "data": "Click Me!"
+ }
+};
+export const elevatedButtonPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Elevated Button allows you to build a Flutter elevated button widget using JSON.
To know more about the elevated button widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/ElevatedButton-class.html).
@@ -21,8 +42,10 @@ To know more about the elevated button widget in Flutter, refer to the [official
## Example
-
-```dart Dart
+
+
+
+```dart
StacElevatedButton(
onPressed: StacNoneAction(),
onLongPress: StacNoneAction(),
@@ -36,7 +59,10 @@ StacElevatedButton(
)
```
-```json JSON
+
+
+
+```json
{
"type": "elevatedButton",
"onPressed": {},
@@ -55,4 +81,37 @@ StacElevatedButton(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/expanded.mdx b/docs/widgets/expanded.mdx
index e8f5aa2b4..a90b59589 100644
--- a/docs/widgets/expanded.mdx
+++ b/docs/widgets/expanded.mdx
@@ -3,6 +3,18 @@ title: "Expanded"
description: "Documentation for Expanded"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const expandedPreviewJson = {
+ "type": "expanded",
+ "flex": 2,
+ "child": {
+ "type": "text",
+ "data": "Hello, World!"
+ }
+};
+export const expandedPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Expanded allows you to build a Flutter expanded widget using JSON.
To know more about the expanded widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Expanded-class.html).
@@ -15,15 +27,20 @@ To know more about the expanded widget in Flutter, refer to the [official docume
## Example
-
-```dart Dart
+
+
+
+```dart
StacExpanded(
flex: 2,
child: StacText(data: 'Hello, World!'),
)
```
-```json JSON
+
+
+
+```json
{
"type": "expanded",
"flex": 2,
@@ -33,4 +50,37 @@ StacExpanded(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/filled_button.mdx b/docs/widgets/filled_button.mdx
index 34a210594..94d9095f5 100644
--- a/docs/widgets/filled_button.mdx
+++ b/docs/widgets/filled_button.mdx
@@ -3,6 +3,27 @@ title: "FilledButton"
description: "Documentation for FilledButton"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const filledButtonPreviewJson = {
+ "type": "filledButton",
+ "onPressed": {},
+ "onLongPress": {},
+ "onHover": {},
+ "onFocusChange": {},
+ "style": {
+ "backgroundColor": "#FFC107",
+ "foregroundColor": "#000000"
+ },
+ "autofocus": false,
+ "clipBehavior": "none",
+ "child": {
+ "type": "text",
+ "data": "Click Me!"
+ }
+};
+export const filledButtonPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Filled Button allows you to build a Flutter filled button widget using JSON.
To know more about the filled button widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/FilledButton-class.html).
@@ -21,8 +42,10 @@ To know more about the filled button widget in Flutter, refer to the [official d
## Example
-
-```dart Dart
+
+
+
+```dart
StacFilledButton(
onPressed: StacNoneAction(),
style: StacButtonStyle(
@@ -35,7 +58,10 @@ StacFilledButton(
)
```
-```json JSON
+
+
+
+```json
{
"type": "filledButton",
"onPressed": {},
@@ -54,4 +80,37 @@ StacFilledButton(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/fitted_box.mdx b/docs/widgets/fitted_box.mdx
index a57ea5e0b..8ab34cc75 100644
--- a/docs/widgets/fitted_box.mdx
+++ b/docs/widgets/fitted_box.mdx
@@ -3,6 +3,23 @@ title: "FittedBox"
description: "Documentation for FittedBox"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const fittedBoxPreviewJson = {
+ "type": "fittedBox",
+ "fit": "contain",
+ "alignment": "center",
+ "child": {
+ "type": "text",
+ "data": "Hello, World!",
+ "style": {
+ "fontSize": 20,
+ "color": "#000000"
+ }
+ }
+};
+export const fittedBoxPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
Stac FittedBox allows you to build the Flutter FittedBox widget using JSON.
To know more about the FittedBox widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/FittedBox-class.html).
@@ -21,8 +38,10 @@ To know more about the FittedBox widget in Flutter, refer to the [official docum
## Example
-
-```dart Dart
+
+
+
+```dart
StacFittedBox(
fit: StacBoxFit.contain,
alignment: StacAlignment.center,
@@ -36,7 +55,10 @@ StacFittedBox(
)
```
-```json JSON
+
+
+
+```json
{
"type": "fittedBox",
"fit": "contain",
@@ -51,5 +73,37 @@ StacFittedBox(
}
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/flexible.mdx b/docs/widgets/flexible.mdx
index 83d88cd6e..d38dddaee 100644
--- a/docs/widgets/flexible.mdx
+++ b/docs/widgets/flexible.mdx
@@ -3,6 +3,19 @@ title: "Flexible"
description: "Documentation for Flexible"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const flexiblePreviewJson = {
+ "type": "flexible",
+ "flex": 2,
+ "fit": "tight",
+ "child": {
+ "type": "text",
+ "data": "Hello, World!"
+ }
+};
+export const flexiblePreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Flexible allows you to build a Flutter flexible widget using JSON.
To know more about the flexible widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Flexible-class.html).
@@ -16,8 +29,10 @@ To know more about the flexible widget in Flutter, refer to the [official docume
## Example
-
-```dart Dart
+
+
+
+```dart
StacFlexible(
flex: 2,
fit: StacFlexFit.tight,
@@ -25,7 +40,10 @@ StacFlexible(
)
```
-```json JSON
+
+
+
+```json
{
"type": "flexible",
"flex": 2,
@@ -36,4 +54,37 @@ StacFlexible(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/floating_action_button.mdx b/docs/widgets/floating_action_button.mdx
index d6c12e37b..d53a4696e 100644
--- a/docs/widgets/floating_action_button.mdx
+++ b/docs/widgets/floating_action_button.mdx
@@ -3,6 +3,46 @@ title: "FloatingActionButton"
description: "Documentation for FloatingActionButton"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const floatingActionButtonPreviewJson = {
+ "type": "floatingActionButton",
+ "onPressed": {},
+ "textStyle": {
+ "fontSize": 16,
+ "color": "#FFFFFF"
+ },
+ "buttonType": "small",
+ "autofocus": false,
+ "icon": {
+ "type": "icon",
+ "icon": "add"
+ },
+ "backgroundColor": "#FFC107",
+ "foregroundColor": "#000000",
+ "focusColor": "#FF5722",
+ "hoverColor": "#FF9800",
+ "splashColor": "#FFEB3B",
+ "extendedTextStyle": {
+ "fontSize": 14,
+ "color": "#FFFFFF"
+ },
+ "elevation": 6,
+ "focusElevation": 8,
+ "hoverElevation": 10,
+ "disabledElevation": 2,
+ "highlightElevation": 12,
+ "extendedIconLabelSpacing": 8,
+ "enableFeedback": true,
+ "tooltip": "Add Item",
+ "heroTag": "fab1",
+ "child": {
+ "type": "text",
+ "data": "Add"
+ }
+};
+export const floatingActionButtonPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Floating Action Button allows you to build a Flutter floating action button widget using JSON.
To know more about the floating action button widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/FloatingActionButton-class.html).
@@ -34,8 +74,10 @@ To know more about the floating action button widget in Flutter, refer to the [o
## Example
-
-```dart Dart
+
+
+
+```dart
StacFloatingActionButton(
onPressed: StacNoneAction(),
textStyle: StacTextStyle(fontSize: 16, color: StacColors.white),
@@ -61,7 +103,10 @@ StacFloatingActionButton(
)
```
-```json JSON
+
+
+
+```json
{
"type": "floatingActionButton",
"onPressed": {},
@@ -84,12 +129,12 @@ StacFloatingActionButton(
"fontSize": 14,
"color": "#FFFFFF"
},
- "elevation": 6.0,
- "focusElevation": 8.0,
- "hoverElevation": 10.0,
- "disabledElevation": 2.0,
- "highlightElevation": 12.0,
- "extendedIconLabelSpacing": 8.0,
+ "elevation": 6,
+ "focusElevation": 8,
+ "hoverElevation": 10,
+ "disabledElevation": 2,
+ "highlightElevation": 12,
+ "extendedIconLabelSpacing": 8,
"enableFeedback": true,
"tooltip": "Add Item",
"heroTag": "fab1",
@@ -99,4 +144,37 @@ StacFloatingActionButton(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/form.mdx b/docs/widgets/form.mdx
index 683fbe5d0..7f40f6765 100644
--- a/docs/widgets/form.mdx
+++ b/docs/widgets/form.mdx
@@ -3,6 +3,59 @@ title: "Form"
description: "Documentation for Form"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const formPreviewJson = {
+ "type": "form",
+ "autovalidateMode": "always",
+ "child": {
+ "type": "column",
+ "children": [
+ {
+ "type": "textFormField",
+ "id": "username",
+ "decoration": {
+ "labelText": "Username"
+ }
+ },
+ {
+ "type": "textFormField",
+ "id": "password",
+ "decoration": {
+ "labelText": "Password"
+ }
+ },
+ {
+ "type": "filledButton",
+ "child": {
+ "type": "text",
+ "data": "Submit"
+ },
+ "onPressed": {
+ "actionType": "validateForm",
+ "isValid": {
+ "actionType": "networkRequest",
+ "url": "https://dummyjson.com/auth/login",
+ "method": "post",
+ "contentType": "application/json",
+ "body": {
+ "username": {
+ "actionType": "getFormValue",
+ "id": "username"
+ },
+ "password": {
+ "actionType": "getFormValue",
+ "id": "password"
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+};
+export const formPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Form allows you to build a Flutter form widget using JSON.
To know more about the form widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Form-class.html).
@@ -15,8 +68,10 @@ To know more about the form widget in Flutter, refer to the [official documentat
## Example
-
-```dart Dart
+
+
+
+```dart
StacForm(
autovalidateMode: StacAutovalidateMode.always,
child: StacColumn(
@@ -48,7 +103,10 @@ StacForm(
)
```
-```json JSON
+
+
+
+```json
{
"type": "form",
"autovalidateMode": "always",
@@ -99,4 +157,37 @@ StacForm(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/fractionally_sized_box.mdx b/docs/widgets/fractionally_sized_box.mdx
index 0e6c2beab..33f499810 100644
--- a/docs/widgets/fractionally_sized_box.mdx
+++ b/docs/widgets/fractionally_sized_box.mdx
@@ -3,6 +3,24 @@ title: "FractionallySizedBox"
description: "Documentation for FractionallySizedBox"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const fractionallySizedBoxPreviewJson = {
+ "type": "fractionallySizedBox",
+ "alignment": "center",
+ "widthFactor": 0.5,
+ "heightFactor": 0.5,
+ "child": {
+ "type": "container",
+ "color": "#FF5733",
+ "child": {
+ "type": "text",
+ "data": "Hello, World!"
+ }
+ }
+};
+export const fractionallySizedBoxPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac FractionallySizedBox allows you to build a Flutter fractionally sized box widget using JSON.
To know more about the fractionally sized box widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/FractionallySizedBox-class.html).
@@ -17,8 +35,10 @@ To know more about the fractionally sized box widget in Flutter, refer to the [o
## Example
-
-```dart Dart
+
+
+
+```dart
StacFractionallySizedBox(
alignment: StacAlignment.center,
widthFactor: 0.5,
@@ -30,7 +50,10 @@ StacFractionallySizedBox(
)
```
-```json JSON
+
+
+
+```json
{
"type": "fractionallySizedBox",
"alignment": "center",
@@ -46,4 +69,37 @@ StacFractionallySizedBox(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/gesture_detector.mdx b/docs/widgets/gesture_detector.mdx
index 5dc57df70..50a812d1c 100644
--- a/docs/widgets/gesture_detector.mdx
+++ b/docs/widgets/gesture_detector.mdx
@@ -3,14 +3,45 @@ title: "GestureDetector"
description: "Documentation for GestureDetector"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const gestureDetectorPreviewJson = {
+ "type": "gestureDetector",
+ "child": {
+ "type": "container",
+ "color": "#2196F3",
+ "width": 200,
+ "height": 200,
+ "alignment": "center",
+ "child": {
+ "type": "text",
+ "data": "Tap me!",
+ "style": {
+ "color": "#FFFFFF",
+ "fontSize": 20
+ }
+ }
+ },
+ "onTap": {
+ "actionType": "showSnackBar",
+ "content": {
+ "type": "text",
+ "data": "This is a Snackbar"
+ }
+ }
+};
+export const gestureDetectorPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The `GestureDetector` widget in Stac allows you to detect various gestures and user interactions within your application. It wraps Flutter's native GestureDetector widget, providing a JSON-based interface to handle touch events, taps, drags, and more.
## Usage
To use a GestureDetector in your Stac, specify the widget type as "gestureDetector" and provide a child widget along with any gesture callbacks you want to handle.
-
-```dart Dart
+
+
+
+```dart
StacGestureDetector(
child: StacContainer(
color: StacColors.blue,
@@ -28,7 +59,10 @@ StacGestureDetector(
)
```
-```json JSON
+
+
+
+```json
{
"type": "gestureDetector",
"child": {
@@ -55,8 +89,40 @@ StacGestureDetector(
}
}
```
-
+
+
+
+
+
## Properties
### Child Widget
diff --git a/docs/widgets/grid_view.mdx b/docs/widgets/grid_view.mdx
index f937d92ee..3e099ac68 100644
--- a/docs/widgets/grid_view.mdx
+++ b/docs/widgets/grid_view.mdx
@@ -3,6 +3,51 @@ title: "GridView"
description: "Documentation for GridView"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const gridViewPreviewJson = {
+ "type": "gridView",
+ "scrollDirection": "vertical",
+ "reverse": false,
+ "primary": false,
+ "physics": {
+ "type": "scrollPhysics",
+ "name": "bouncing"
+ },
+ "shrinkWrap": false,
+ "padding": {
+ "left": 10,
+ "top": 10,
+ "right": 10,
+ "bottom": 10
+ },
+ "crossAxisCount": 2,
+ "mainAxisSpacing": 10,
+ "crossAxisSpacing": 10,
+ "childAspectRatio": 1,
+ "mainAxisExtent": 100,
+ "addAutomaticKeepAlives": true,
+ "addRepaintBoundaries": true,
+ "addSemanticIndexes": true,
+ "cacheExtent": 100,
+ "children": [
+ {
+ "type": "text",
+ "data": "Item 1"
+ },
+ {
+ "type": "text",
+ "data": "Item 2"
+ }
+ ],
+ "semanticChildCount": 2,
+ "dragStartBehavior": "start",
+ "keyboardDismissBehavior": "manual",
+ "restorationId": "grid_view_1",
+ "clipBehavior": "hardEdge"
+};
+export const gridViewPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac GridView allows you to build a Flutter GridView widget using JSON.
To know more about the GridView widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/GridView-class.html).
@@ -34,8 +79,10 @@ To know more about the GridView widget in Flutter, refer to the [official docume
## Example
-
-```dart Dart
+
+
+
+```dart
StacGridView(
scrollDirection: StacAxis.vertical,
reverse: false,
@@ -64,7 +111,10 @@ StacGridView(
)
```
-```json JSON
+
+
+
+```json
{
"type": "gridView",
"scrollDirection": "vertical",
@@ -82,14 +132,14 @@ StacGridView(
"bottom": 10
},
"crossAxisCount": 2,
- "mainAxisSpacing": 10.0,
- "crossAxisSpacing": 10.0,
- "childAspectRatio": 1.0,
- "mainAxisExtent": 100.0,
+ "mainAxisSpacing": 10,
+ "crossAxisSpacing": 10,
+ "childAspectRatio": 1,
+ "mainAxisExtent": 100,
"addAutomaticKeepAlives": true,
"addRepaintBoundaries": true,
"addSemanticIndexes": true,
- "cacheExtent": 100.0,
+ "cacheExtent": 100,
"children": [
{
"type": "text",
@@ -107,4 +157,37 @@ StacGridView(
"clipBehavior": "hardEdge"
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/hero.mdx b/docs/widgets/hero.mdx
index b353146e3..ba524f023 100644
--- a/docs/widgets/hero.mdx
+++ b/docs/widgets/hero.mdx
@@ -3,6 +3,18 @@ title: "Hero"
description: "Documentation for Hero"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const heroPreviewJson = {
+ "type": "hero",
+ "tag": "userAvatar",
+ "child": {
+ "type": "image",
+ "network": "https://example.com/avatar.png"
+ }
+};
+export const heroPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Hero allows you to build a Flutter Hero widget using JSON. It enables hero animations between routes by tagging widgets with the same tag.
To know more about the Hero widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Hero-class.html).
@@ -19,15 +31,20 @@ To know more about the Hero widget in Flutter, refer to the [official documentat
## Example
-
-```dart Dart
+
+
+
+```dart
StacHero(
tag: 'userAvatar',
child: StacImage(network: 'https://example.com/avatar.png'),
)
```
-```json JSON
+
+
+
+```json
{
"type": "hero",
"tag": "userAvatar",
@@ -37,8 +54,40 @@ StacHero(
}
}
```
-
+
+
+
+
+
## Hero Animation Example
Here's an example showing a hero animation from a list to a detail page:
diff --git a/docs/widgets/icon.mdx b/docs/widgets/icon.mdx
index 725e0a846..ebb47ede5 100644
--- a/docs/widgets/icon.mdx
+++ b/docs/widgets/icon.mdx
@@ -3,6 +3,18 @@ title: "Icon"
description: "Documentation for Icon"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const iconPreviewJson = {
+ "type": "icon",
+ "icon": "home",
+ "size": 24,
+ "color": "#000000",
+ "semanticLabel": "Home Icon",
+ "textDirection": "ltr"
+};
+export const iconPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Icon allows you to build a Flutter icon widget using JSON.
To know more about the icon widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Icon-class.html).
@@ -21,8 +33,10 @@ To know more about the icon widget in Flutter, refer to the [official documentat
## Example
-
-```dart Dart
+
+
+
+```dart
StacIcon(
icon: 'home',
size: 24.0,
@@ -32,14 +46,50 @@ StacIcon(
)
```
-```json JSON
+
+
+
+```json
{
"type": "icon",
"icon": "home",
- "size": 24.0,
+ "size": 24,
"color": "#000000",
"semanticLabel": "Home Icon",
"textDirection": "ltr"
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/icon_button.mdx b/docs/widgets/icon_button.mdx
index 1c1253908..440484f36 100644
--- a/docs/widgets/icon_button.mdx
+++ b/docs/widgets/icon_button.mdx
@@ -3,6 +3,49 @@ title: "IconButton"
description: "Documentation for IconButton"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const iconButtonPreviewJson = {
+ "type": "iconButton",
+ "iconSize": 24,
+ "padding": {
+ "left": 8,
+ "top": 8,
+ "right": 8,
+ "bottom": 8
+ },
+ "alignment": "center",
+ "splashRadius": 20,
+ "color": "#000000",
+ "focusColor": "#FFC107",
+ "hoverColor": "#FF9800",
+ "highlightColor": "#FF5722",
+ "splashColor": "#FFEB3B",
+ "disabledColor": "#BDBDBD",
+ "onPressed": {},
+ "autofocus": false,
+ "tooltip": "Add Item",
+ "enableFeedback": true,
+ "constraints": {
+ "minWidth": 48,
+ "minHeight": 48
+ },
+ "style": {
+ "backgroundColor": "#FFC107",
+ "foregroundColor": "#000000"
+ },
+ "isSelected": false,
+ "selectedIcon": {
+ "type": "icon",
+ "icon": "check"
+ },
+ "icon": {
+ "type": "icon",
+ "icon": "add"
+ }
+};
+export const iconButtonPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Icon Button allows you to build a Flutter icon button widget using JSON.
To know more about the icon button widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/IconButton-class.html).
@@ -32,8 +75,10 @@ To know more about the icon button widget in Flutter, refer to the [official doc
## Example
-
-```dart Dart
+
+
+
+```dart
StacIconButton(
iconSize: 24.0,
padding: StacEdgeInsets(left: 8.0, top: 8.0, right: 8.0, bottom: 8.0),
@@ -57,18 +102,21 @@ StacIconButton(
)
```
-```json JSON
+
+
+
+```json
{
"type": "iconButton",
- "iconSize": 24.0,
+ "iconSize": 24,
"padding": {
- "left": 8.0,
- "top": 8.0,
- "right": 8.0,
- "bottom": 8.0
+ "left": 8,
+ "top": 8,
+ "right": 8,
+ "bottom": 8
},
"alignment": "center",
- "splashRadius": 20.0,
+ "splashRadius": 20,
"color": "#000000",
"focusColor": "#FFC107",
"hoverColor": "#FF9800",
@@ -80,8 +128,8 @@ StacIconButton(
"tooltip": "Add Item",
"enableFeedback": true,
"constraints": {
- "minWidth": 48.0,
- "minHeight": 48.0
+ "minWidth": 48,
+ "minHeight": 48
},
"style": {
"backgroundColor": "#FFC107",
@@ -98,4 +146,37 @@ StacIconButton(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/image.mdx b/docs/widgets/image.mdx
index dc3996f48..c0c33d526 100644
--- a/docs/widgets/image.mdx
+++ b/docs/widgets/image.mdx
@@ -3,6 +3,18 @@ title: "Image"
description: "Documentation for Image"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const imagePreviewJson = {
+ "type": "image",
+ "src": "assets/logo.png",
+ "imageType": "asset",
+ "width": 200,
+ "height": 100,
+ "fit": "cover"
+};
+export const imagePreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The `Image` widget allows you to display an image in your Flutter app using JSON. It supports images from multiple sources, including assets, files, and network URLs, and provides customization options such as alignment, color, width, height, and fit.
To learn more about the equivalent Flutter widgets and their properties, refer to the [official Flutter documentation for Image](https://api.flutter.dev/flutter/widgets/Image-class.html).
@@ -29,8 +41,10 @@ To learn more about the equivalent Flutter widgets and their properties, refer t
Creates an image widget that loads from Flutter's asset bundle.
-
-```dart Dart
+
+
+
+```dart
const StacImage.asset(
'assets/logo.png',
width: 200,
@@ -39,7 +53,10 @@ const StacImage.asset(
)
```
-```json JSON
+
+
+
+```json
{
"type": "image",
"src": "assets/logo.png",
@@ -49,8 +66,40 @@ const StacImage.asset(
"fit": "cover"
}
```
-
+
+
+
+
+
---
### StacImage.network
diff --git a/docs/widgets/ink_well.mdx b/docs/widgets/ink_well.mdx
index 6a6612f4b..3ac7d25d5 100644
--- a/docs/widgets/ink_well.mdx
+++ b/docs/widgets/ink_well.mdx
@@ -3,10 +3,42 @@ title: "InkWell"
description: "Documentation for InkWell"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const inkWellPreviewJson = {
+ "type": "inkWell",
+ "child": {
+ "type": "padding",
+ "padding": {
+ "top": 20,
+ "bottom": 20,
+ "right": 20,
+ "left": 20
+ },
+ "child": {
+ "type": "text",
+ "data": "Hello, World! from Inkwell",
+ "textAlign": "center"
+ }
+ },
+ "splashColor": "#E1BEE7",
+ "borderRadius": {
+ "topLeft": 20,
+ "topRight": 20,
+ "bottomLeft": 20,
+ "bottomRight": 20
+ },
+ "radius": 20,
+ "hoverDuration": {
+ "seconds": 10
+ },
+ "onTap": {}
+};
+export const inkWellPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
**Stac InkWell** allows you to build the Flutter `InkWell` widget using JSON.
To learn more about the `InkWell` widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/InkWell-class.html).
-
## Properties
| Property | Type | Description |
|-------------------------|------------------------------|-----------------------------------------------------------------------------|
@@ -41,8 +73,10 @@ To learn more about the `InkWell` widget in Flutter, refer to the [official docu
## Example
-
-```dart Dart
+
+
+
+```dart
StacInkWell(
child: StacPadding(
padding: StacEdgeInsets(top: 20, bottom: 20, right: 20, left: 20),
@@ -64,7 +98,10 @@ StacInkWell(
)
```
-```json JSON
+
+
+
+```json
{
"type": "inkWell",
"child": {
@@ -95,5 +132,37 @@ StacInkWell(
"onTap": {}
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/limited_box.mdx b/docs/widgets/limited_box.mdx
index e3f05ee2b..645863b1d 100644
--- a/docs/widgets/limited_box.mdx
+++ b/docs/widgets/limited_box.mdx
@@ -3,6 +3,19 @@ title: "Limited Box"
description: "Documentation for Limited Box"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const limitedBoxPreviewJson = {
+ "type": "limitedBox",
+ "child": {
+ "type": "container",
+ "width": 100,
+ "height": 100,
+ "color": "#FF0000"
+ }
+};
+export const limitedBoxPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
Stac LimitedBox allows you to build the Flutter LimitedBox widget using JSON.
To know more about the LimitedBox widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/LimitedBox-class.html).
@@ -20,8 +33,10 @@ To know more about the LimitedBox widget in Flutter, refer to the [official docu
### Example 1: Limited Box with Default Constraints
-
-```dart Dart
+
+
+
+```dart
StacLimitedBox(
child: StacContainer(
width: 100,
@@ -31,7 +46,10 @@ StacLimitedBox(
)
```
-```json JSON
+
+
+
+```json
{
"type": "limitedBox",
"child": {
@@ -42,8 +60,40 @@ StacLimitedBox(
}
}
```
-
+
+
+
+
+
### Example 2: Limited Box with Custom Constraints
diff --git a/docs/widgets/linear_progress_indicator.mdx b/docs/widgets/linear_progress_indicator.mdx
index 9067f604c..0a02f116b 100644
--- a/docs/widgets/linear_progress_indicator.mdx
+++ b/docs/widgets/linear_progress_indicator.mdx
@@ -3,6 +3,22 @@ title: "LinearProgressIndicator"
description: "Documentation for LinearProgressIndicator"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const linearProgressIndicatorPreviewJson = {
+ "type": "linearProgressIndicator",
+ "color": "#541204",
+ "minHeight": 6,
+ "backgroundColor": "#FFD700",
+ "borderRadius": {
+ "topLeft": 10,
+ "topRight": 10,
+ "bottomLeft": 10,
+ "bottomRight": 10
+ }
+};
+export const linearProgressIndicatorPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac LinearProgressIndicator allows you to build a Flutter LinearProgressIndicator widget using JSON.
To know more about the LinearProgressIndicator widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/LinearProgressIndicator-class.html).
@@ -18,11 +34,12 @@ To know more about the LinearProgressIndicator widget in Flutter, refer to the [
| semanticsValue | `String` | Provides a textual description of the widget. |
| borderRadius | `StacBorderRadius` | The border radius for progress indicator. |
-
## Example
-
-```dart Dart
+
+
+
+```dart
StacLinearProgressIndicator(
color: '#541204',
minHeight: 6,
@@ -36,7 +53,10 @@ StacLinearProgressIndicator(
)
```
-```json JSON
+
+
+
+```json
{
"type": "linearProgressIndicator",
"color": "#541204",
@@ -50,6 +70,38 @@ StacLinearProgressIndicator(
}
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/list_tile.mdx b/docs/widgets/list_tile.mdx
index 781cc74a8..fcbb6c35f 100644
--- a/docs/widgets/list_tile.mdx
+++ b/docs/widgets/list_tile.mdx
@@ -3,6 +3,103 @@ title: "ListTile"
description: "Documentation for ListTile"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const listTilePreviewJson = {
+ "type": "column",
+ "mainAxisAlignment": "start",
+ "crossAxisAlignment": "center",
+ "children": [
+ {
+ "type": "sizedBox",
+ "height": 12
+ },
+ {
+ "type": "listTile",
+ "leading": {
+ "type": "image",
+ "src": "https://cdn-icons-png.flaticon.com/512/3135/3135715.png"
+ },
+ "title": {
+ "type": "padding",
+ "padding": {
+ "top": 10
+ },
+ "child": {
+ "type": "text",
+ "data": "Andrew Symonds",
+ "style": {
+ "fontSize": 18
+ }
+ }
+ },
+ "subtitle": {
+ "type": "padding",
+ "padding": {
+ "top": 10
+ },
+ "child": {
+ "type": "text",
+ "data": "Andrew Symonds was an Australian international cricketer, who played all three formats as a batting all-rounder. Commonly nicknamed \"Roy\", he was a key member of two World Cup winning squads. Symonds played as a right-handed, middle order batsman and alternated between medium pace and off-spin",
+ "style": {
+ "fontSize": 14
+ }
+ }
+ },
+ "trailing": {
+ "type": "icon",
+ "iconType": "material",
+ "icon": "more_vert",
+ "size": 24
+ }
+ },
+ {
+ "type": "sizedBox",
+ "height": 12
+ },
+ {
+ "type": "listTile",
+ "leading": {
+ "type": "image",
+ "src": "https://cdn-icons-png.flaticon.com/512/3135/3135715.png"
+ },
+ "title": {
+ "type": "padding",
+ "padding": {
+ "top": 10
+ },
+ "child": {
+ "type": "text",
+ "data": "Adam Gilchrist",
+ "style": {
+ "fontSize": 18
+ }
+ }
+ },
+ "subtitle": {
+ "type": "padding",
+ "padding": {
+ "top": 10
+ },
+ "child": {
+ "type": "text",
+ "data": "Adam Craig Gilchrist is an Australian cricket commentator and former international cricketer and captain of the Australia national cricket team. He was an attacking left-handed batsman and record-breaking wicket-keeper",
+ "style": {
+ "fontSize": 14
+ }
+ }
+ },
+ "trailing": {
+ "type": "icon",
+ "iconType": "material",
+ "icon": "more_vert",
+ "size": 24
+ }
+ }
+ ]
+};
+export const listTilePreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac ListTile allows you to build a Flutter ListTile widget using JSON.
To know more about the list tile widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/ListTile-class.html).
@@ -37,8 +134,10 @@ To know more about the list tile widget in Flutter, refer to the [official docum
## Example
-
-```dart Dart
+
+
+
+```dart
StacColumn(
mainAxisAlignment: StacMainAxisAlignment.start,
crossAxisAlignment: StacCrossAxisAlignment.center,
@@ -85,7 +184,10 @@ StacColumn(
)
```
-```json JSON
+
+
+
+```json
{
"type": "column",
"mainAxisAlignment": "start",
@@ -180,5 +282,37 @@ StacColumn(
]
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/listview.mdx b/docs/widgets/listview.mdx
index 277c2fbcb..98ac93d1b 100644
--- a/docs/widgets/listview.mdx
+++ b/docs/widgets/listview.mdx
@@ -3,6 +3,185 @@ title: "List View"
description: "Documentation for List View"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const listviewPreviewJson = {
+ "type": "listView",
+ "shrinkWrap": true,
+ "separator": {
+ "type": "container",
+ "height": 10
+ },
+ "children": [
+ {
+ "type": "listTile",
+ "leading": {
+ "type": "container",
+ "height": 50,
+ "width": 50,
+ "color": "#165FC7",
+ "child": {
+ "type": "column",
+ "mainAxisAlignment": "center",
+ "crossAxisAlignment": "center",
+ "children": [
+ {
+ "type": "text",
+ "data": "1",
+ "style": {
+ "fontSize": 21
+ }
+ }
+ ]
+ }
+ },
+ "title": {
+ "type": "padding",
+ "padding": {
+ "top": 10
+ },
+ "child": {
+ "type": "text",
+ "data": "Item 1",
+ "style": {
+ "fontSize": 18
+ }
+ }
+ },
+ "subtitle": {
+ "type": "padding",
+ "padding": {
+ "top": 10
+ },
+ "child": {
+ "type": "text",
+ "data": "Item description",
+ "style": {
+ "fontSize": 14
+ }
+ }
+ },
+ "trailing": {
+ "type": "icon",
+ "iconType": "material",
+ "icon": "more_vert",
+ "size": 24
+ }
+ },
+ {
+ "type": "listTile",
+ "leading": {
+ "type": "container",
+ "height": 50,
+ "width": 50,
+ "color": "#165FC7",
+ "child": {
+ "type": "column",
+ "mainAxisAlignment": "center",
+ "crossAxisAlignment": "center",
+ "children": [
+ {
+ "type": "text",
+ "data": "2",
+ "style": {
+ "fontSize": 21
+ }
+ }
+ ]
+ }
+ },
+ "title": {
+ "type": "padding",
+ "padding": {
+ "top": 10
+ },
+ "child": {
+ "type": "text",
+ "data": "Item 2",
+ "style": {
+ "fontSize": 18
+ }
+ }
+ },
+ "subtitle": {
+ "type": "padding",
+ "padding": {
+ "top": 10
+ },
+ "child": {
+ "type": "text",
+ "data": "Item description",
+ "style": {
+ "fontSize": 14
+ }
+ }
+ },
+ "trailing": {
+ "type": "icon",
+ "iconType": "material",
+ "icon": "more_vert",
+ "size": 24
+ }
+ },
+ {
+ "type": "listTile",
+ "leading": {
+ "type": "container",
+ "height": 50,
+ "width": 50,
+ "color": "#165FC7",
+ "child": {
+ "type": "column",
+ "mainAxisAlignment": "center",
+ "crossAxisAlignment": "center",
+ "children": [
+ {
+ "type": "text",
+ "data": "3",
+ "style": {
+ "fontSize": 21
+ }
+ }
+ ]
+ }
+ },
+ "title": {
+ "type": "padding",
+ "padding": {
+ "top": 10
+ },
+ "child": {
+ "type": "text",
+ "data": "Item 3",
+ "style": {
+ "fontSize": 18
+ }
+ }
+ },
+ "subtitle": {
+ "type": "padding",
+ "padding": {
+ "top": 10
+ },
+ "child": {
+ "type": "text",
+ "data": "Item description",
+ "style": {
+ "fontSize": 14
+ }
+ }
+ },
+ "trailing": {
+ "type": "icon",
+ "iconType": "material",
+ "icon": "more_vert",
+ "size": 24
+ }
+ }
+ ]
+};
+export const listviewPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac ListView allows you to build a Flutter ListView widget using JSON.
To know more about the listview widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/ListView-class.html).
@@ -30,8 +209,10 @@ To know more about the listview widget in Flutter, refer to the [official docume
## Example
-
-```dart Dart
+
+
+
+```dart
StacListView(
shrinkWrap: true,
separator: StacContainer(height: 10),
@@ -87,7 +268,10 @@ StacListView(
)
```
-```json JSON
+
+
+
+```json
{
"type": "listView",
"shrinkWrap": true,
@@ -264,6 +448,38 @@ StacListView(
]
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/network_widget.mdx b/docs/widgets/network_widget.mdx
index e81a55ac6..65a45b0c2 100644
--- a/docs/widgets/network_widget.mdx
+++ b/docs/widgets/network_widget.mdx
@@ -3,6 +3,20 @@ title: "NetworkWidget"
description: "Documentation for NetworkWidget"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const networkWidgetPreviewJson = {
+ "type": "networkWidget",
+ "request": {
+ "url": "https://api.example.com/data",
+ "method": "get",
+ "headers": {
+ "Authorization": "Bearer token"
+ }
+ }
+};
+export const networkWidgetPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac NetworkWidget allows you to build a widget that makes a network request and renders a widget based on the response using JSON.
## Properties
@@ -13,8 +27,10 @@ The Stac NetworkWidget allows you to build a widget that makes a network request
## Example
-
-```dart Dart
+
+
+
+```dart
StacNetworkWidget(
request: StacNetworkRequest(
url: 'https://api.example.com/data',
@@ -24,7 +40,10 @@ StacNetworkWidget(
)
```
-```json JSON
+
+
+
+```json
{
"type": "networkWidget",
"request": {
@@ -36,4 +55,37 @@ StacNetworkWidget(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/opacity.mdx b/docs/widgets/opacity.mdx
index b43987d82..9e8cb4d9b 100644
--- a/docs/widgets/opacity.mdx
+++ b/docs/widgets/opacity.mdx
@@ -3,6 +3,35 @@ title: "Opacity"
description: "Documentation for Opacity"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const opacityPreviewJson = {
+ "type": "scaffold",
+ "appBar": {
+ "type": "appBar",
+ "title": {
+ "type": "text",
+ "data": "Opacity"
+ }
+ },
+ "body": {
+ "type": "center",
+ "child": {
+ "type": "opacity",
+ "opacity": 0.5,
+ "child": {
+ "type": "text",
+ "data": "Opacity Widget",
+ "style": {
+ "fontSize": 23,
+ "fontWeight": "w600"
+ }
+ }
+ }
+ }
+};
+export const opacityPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Opacity allows you to build a Flutter Opacity widget using JSON.
To know more about the Slider widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Opacity-class.html).
@@ -15,8 +44,10 @@ To know more about the Slider widget in Flutter, refer to the [official document
## Example
-
-```dart Dart
+
+
+
+```dart
StacScaffold(
appBar: StacAppBar(
title: StacText(data: 'Opacity'),
@@ -33,7 +64,10 @@ StacScaffold(
)
```
-```json JSON
+
+
+
+```json
{
"type": "scaffold",
"appBar": {
@@ -60,5 +94,37 @@ StacScaffold(
}
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/outlined_button.mdx b/docs/widgets/outlined_button.mdx
index 0d5f16ff5..23f09a30d 100644
--- a/docs/widgets/outlined_button.mdx
+++ b/docs/widgets/outlined_button.mdx
@@ -3,6 +3,27 @@ title: "OutlinedButton"
description: "Documentation for OutlinedButton"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const outlinedButtonPreviewJson = {
+ "type": "outlinedButton",
+ "onPressed": {},
+ "onLongPress": {},
+ "onHover": {},
+ "onFocusChange": {},
+ "style": {
+ "backgroundColor": "#FFFFFF",
+ "foregroundColor": "#000000"
+ },
+ "autofocus": false,
+ "clipBehavior": "none",
+ "child": {
+ "type": "text",
+ "data": "Click Me!"
+ }
+};
+export const outlinedButtonPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Outlined Button allows you to build a Flutter outlined button widget using JSON.
To know more about the outlined button widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/OutlinedButton-class.html).
@@ -21,8 +42,10 @@ To know more about the outlined button widget in Flutter, refer to the [official
## Example
-
-```dart Dart
+
+
+
+```dart
StacOutlinedButton(
onPressed: StacNoneAction(),
style: StacButtonStyle(
@@ -35,7 +58,10 @@ StacOutlinedButton(
)
```
-```json JSON
+
+
+
+```json
{
"type": "outlinedButton",
"onPressed": {},
@@ -54,5 +80,37 @@ StacOutlinedButton(
}
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/padding.mdx b/docs/widgets/padding.mdx
index 22ae3b771..0603aa834 100644
--- a/docs/widgets/padding.mdx
+++ b/docs/widgets/padding.mdx
@@ -3,6 +3,24 @@ title: "Padding"
description: "Documentation for Padding"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const paddingPreviewJson = {
+ "type": "padding",
+ "padding": {
+ "left": 0,
+ "right": 0
+ },
+ "child": {
+ "type": "container",
+ "color": "#672BFF",
+ "clipBehavior": "hardEdge",
+ "height": 75,
+ "width": 700
+ }
+};
+export const paddingPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Padding allows you to build a Flutter Padding widget using JSON.
To know more about the padding widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Padding-class.html).
@@ -15,8 +33,10 @@ To know more about the padding widget in Flutter, refer to the [official documen
## Example
-
-```dart Dart
+
+
+
+```dart
StacPadding(
padding: StacEdgeInsets(left: 0, right: 0),
child: StacContainer(
@@ -28,7 +48,10 @@ StacPadding(
)
```
-```json JSON
+
+
+
+```json
{
"type": "padding",
"padding": {
@@ -44,5 +67,37 @@ StacPadding(
}
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/page_view.mdx b/docs/widgets/page_view.mdx
index c5c153ce3..da05a2685 100644
--- a/docs/widgets/page_view.mdx
+++ b/docs/widgets/page_view.mdx
@@ -3,6 +3,60 @@ title: "PageView"
description: "Documentation for PageView"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const pageViewPreviewJson = {
+ "type": "pageView",
+ "children": [
+ {
+ "type": "container",
+ "color": "#D9D9D9",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Page 1",
+ "style": {
+ "fontSize": 23,
+ "fontWeight": "w400"
+ }
+ }
+ }
+ },
+ {
+ "type": "container",
+ "color": "#FC3F1B",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Page 2",
+ "style": {
+ "fontSize": 23,
+ "fontWeight": "w400"
+ }
+ }
+ }
+ },
+ {
+ "type": "container",
+ "color": "#D9D9D9",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Page 3",
+ "style": {
+ "fontSize": 23,
+ "fontWeight": "w400"
+ }
+ }
+ }
+ }
+ ]
+};
+export const pageViewPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac PageView allows you to build a Flutter PageView widget using JSON.
To know more about the PageView widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/PageView-class.html).
@@ -27,8 +81,10 @@ To know more about the PageView widget in Flutter, refer to the [official docume
## Example
-
-```dart Dart
+
+
+
+```dart
StacPageView(
children: [
StacContainer(
@@ -62,7 +118,10 @@ StacPageView(
)
```
-```json JSON
+
+
+
+```json
{
"type": "pageView",
"children": [
@@ -114,4 +173,37 @@ StacPageView(
]
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/placeholder.mdx b/docs/widgets/placeholder.mdx
index 6dcc8cd0f..4b09bdb78 100644
--- a/docs/widgets/placeholder.mdx
+++ b/docs/widgets/placeholder.mdx
@@ -3,6 +3,17 @@ title: "Placeholder"
description: "Documentation for Placeholder"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const placeholderPreviewJson = {
+ "type": "placeholder",
+ "color": "#455A64",
+ "strokeWidth": 2,
+ "fallbackWidth": 400,
+ "fallbackHeight": 400
+};
+export const placeholderPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac `Placeholder` widget allows you to build the Flutter Placeholder widget using JSON.
is used to draw a box that serves as a placeholder in your Flutter UI. It is typically used to represent areas where widgets are yet to be added or for debugging layout constraints.
@@ -24,8 +35,10 @@ To learn more about the `Placeholder` widget, refer to the [official Flutter doc
## Example
-
-```dart Dart
+
+
+
+```dart
StacPlaceholder(
color: '#455A64',
strokeWidth: 2.0,
@@ -34,14 +47,49 @@ StacPlaceholder(
)
```
-```json JSON
+
+
+
+```json
{
"type": "placeholder",
"color": "#455A64",
- "strokeWidth": 2.0,
- "fallbackWidth": 400.0,
- "fallbackHeight": 400.0
+ "strokeWidth": 2,
+ "fallbackWidth": 400,
+ "fallbackHeight": 400
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/positioned.mdx b/docs/widgets/positioned.mdx
index c9814c487..0d8a2d041 100644
--- a/docs/widgets/positioned.mdx
+++ b/docs/widgets/positioned.mdx
@@ -3,6 +3,26 @@ title: "Positioned"
description: "Documentation for Positioned"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const positionedPreviewJson = {
+ "type": "stack",
+ "children": [
+ {
+ "type": "positioned",
+ "left": 10,
+ "top": 20,
+ "right": 30,
+ "bottom": 40,
+ "child": {
+ "type": "text",
+ "data": "Hello, World!"
+ }
+ }
+ ]
+};
+export const positionedPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Positioned widget controls where a child of a [Stack](https://api.flutter.dev/flutter/widgets/Stack-class.html) is positioned. It corresponds to Flutter's Positioned widget and allows precise positioning using coordinates and optional sizing constraints. Use it with JSON to declare positioned children inside a Stack.
To learn more about the Positioned widget in Flutter, see the [official documentation](https://api.flutter.dev/flutter/widgets/Positioned-class.html).
@@ -29,8 +49,10 @@ The Dart API also supports named constructors: `StacPositioned.fill()`, `StacPos
## Example
-
-```dart Dart
+
+
+
+```dart
StacPositioned(
left: 10,
top: 20,
@@ -40,21 +62,61 @@ StacPositioned(
)
```
-```json JSON
+
+
+
+```json
{
- "type": "positioned",
- "left": 10,
- "top": 20,
- "right": 30,
- "bottom": 40,
- "child": {
- "type": "text",
- "data": "Hello, World!"
- }
+ "type": "stack",
+ "children": [
+ {
+ "type": "positioned",
+ "left": 10,
+ "top": 20,
+ "right": 30,
+ "bottom": 40,
+ "child": {
+ "type": "text",
+ "data": "Hello, World!"
+ }
+ }
+ ]
}
```
-
+
+
+
+
+
## Dart-Only Constructors
The following named constructors are available in Dart but not in JSON:
diff --git a/docs/widgets/radio_group.mdx b/docs/widgets/radio_group.mdx
index 57aeede35..dbbf190c8 100644
--- a/docs/widgets/radio_group.mdx
+++ b/docs/widgets/radio_group.mdx
@@ -3,6 +3,69 @@ title: "RadioGroup"
description: "Documentation for RadioGroup"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const radioGroupPreviewJson = {
+ "type": "radioGroup",
+ "child": {
+ "type": "column",
+ "children": [
+ {
+ "type": "listTile",
+ "leading": {
+ "type": "radio",
+ "radioType": "adaptive",
+ "value": "1",
+ "groupValue": "1"
+ },
+ "title": {
+ "type": "text",
+ "data": "Male",
+ "align": "center",
+ "style": {
+ "fontSize": 21
+ }
+ }
+ },
+ {
+ "type": "listTile",
+ "leading": {
+ "type": "radio",
+ "radioType": "adaptive",
+ "value": "2",
+ "groupValue": "1"
+ },
+ "title": {
+ "type": "text",
+ "data": "Female",
+ "align": "center",
+ "style": {
+ "fontSize": 21
+ }
+ }
+ },
+ {
+ "type": "listTile",
+ "leading": {
+ "type": "radio",
+ "radioType": "adaptive",
+ "value": "3",
+ "groupValue": "1"
+ },
+ "title": {
+ "type": "text",
+ "data": "Other",
+ "align": "center",
+ "style": {
+ "fontSize": 21
+ }
+ }
+ }
+ ]
+ }
+};
+export const radioGroupPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac RadioGroup allows you to build Flutter Radio widgets using JSON.
To know more about the Radio widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/Radio-class.html).
@@ -39,11 +102,12 @@ To know more about the Radio widget in Flutter, refer to the [official documenta
| side | `StacBorderSide` | The border side of the radio. |
| innerRadius | `double` | The inner radius of the radio in logical pixels. |
-
## Example
-
-```dart Dart
+
+
+
+```dart
StacRadioGroup(
child: StacColumn(
children: [
@@ -88,7 +152,10 @@ StacRadioGroup(
)
```
-```json JSON
+
+
+
+```json
{
"type": "radioGroup",
"child": {
@@ -149,6 +216,38 @@ StacRadioGroup(
}
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/refresh_indicator.mdx b/docs/widgets/refresh_indicator.mdx
index d7c852714..01b42bb4e 100644
--- a/docs/widgets/refresh_indicator.mdx
+++ b/docs/widgets/refresh_indicator.mdx
@@ -3,6 +3,52 @@ title: "RefreshIndicator"
description: "Documentation for RefreshIndicator"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const refreshIndicatorPreviewJson = {
+ "type": "refreshIndicator",
+ "onRefresh": {
+ "actionType": "request",
+ "url": "https://raw.githubusercontent.com/StacDev/stac/main/examples/stac_gallery/assets/json/list_view_example.json",
+ "method": "get",
+ "contentType": "application/json"
+ },
+ "child": {
+ "type": "listView",
+ "children": [
+ {
+ "type": "listTile",
+ "title": {
+ "type": "text",
+ "data": "Pull down to refresh"
+ }
+ },
+ {
+ "type": "listTile",
+ "title": {
+ "type": "text",
+ "data": "Item 1"
+ }
+ },
+ {
+ "type": "listTile",
+ "title": {
+ "type": "text",
+ "data": "Item 2"
+ }
+ },
+ {
+ "type": "listTile",
+ "title": {
+ "type": "text",
+ "data": "Item 3"
+ }
+ }
+ ]
+ }
+};
+export const refreshIndicatorPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac RefreshIndicator allows you to build a Flutter RefreshIndicator widget using JSON.
To know more about the RefreshIndicator widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/RefreshIndicator-class.html).
@@ -23,18 +69,31 @@ To know more about the RefreshIndicator widget in Flutter, refer to the [officia
## Example
-
-```dart Dart
+
+
+
+```dart
StacRefreshIndicator(
onRefresh: StacNetworkRequestAction(
url: 'https://raw.githubusercontent.com/StacDev/stac/main/examples/stac_gallery/assets/json/list_view_example.json',
method: Method.get,
contentType: 'application/json',
),
+ child: StacListView(
+ children: [
+ StacListTile(title: StacText(data: 'Pull down to refresh')),
+ StacListTile(title: StacText(data: 'Item 1')),
+ StacListTile(title: StacText(data: 'Item 2')),
+ StacListTile(title: StacText(data: 'Item 3')),
+ ],
+ ),
)
```
-```json JSON
+
+
+
+```json
{
"type": "refreshIndicator",
"onRefresh": {
@@ -42,7 +101,73 @@ StacRefreshIndicator(
"url": "https://raw.githubusercontent.com/StacDev/stac/main/examples/stac_gallery/assets/json/list_view_example.json",
"method": "get",
"contentType": "application/json"
+ },
+ "child": {
+ "type": "listView",
+ "children": [
+ {
+ "type": "listTile",
+ "title": {
+ "type": "text",
+ "data": "Pull down to refresh"
+ }
+ },
+ {
+ "type": "listTile",
+ "title": {
+ "type": "text",
+ "data": "Item 1"
+ }
+ },
+ {
+ "type": "listTile",
+ "title": {
+ "type": "text",
+ "data": "Item 2"
+ }
+ },
+ {
+ "type": "listTile",
+ "title": {
+ "type": "text",
+ "data": "Item 3"
+ }
+ }
+ ]
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/row.mdx b/docs/widgets/row.mdx
index 5438507e5..ece5fd75c 100644
--- a/docs/widgets/row.mdx
+++ b/docs/widgets/row.mdx
@@ -3,6 +3,33 @@ title: "Row"
description: "Documentation for Row"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const rowPreviewJson = {
+ "type": "row",
+ "mainAxisAlignment": "center",
+ "crossAxisAlignment": "center",
+ "spacing": 12,
+ "children": [
+ {
+ "type": "image",
+ "src": "https://images.pexels.com/photos/2718416/pexels-photo-2718416.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2",
+ "width": 100
+ },
+ {
+ "type": "image",
+ "src": "https://images.pexels.com/photos/121629/pexels-photo-121629.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2",
+ "width": 100
+ },
+ {
+ "type": "image",
+ "src": "https://images.pexels.com/photos/1414642/pexels-photo-1414642.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2",
+ "width": 100
+ }
+ ]
+};
+export const rowPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Row allows you to build a Flutter Row widget using JSON.
To know more about the row widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Row-class.html).
@@ -21,8 +48,10 @@ To know more about the row widget in Flutter, refer to the [official documentati
## Example
-
-```dart Dart
+
+
+
+```dart
StacRow(
mainAxisAlignment: StacMainAxisAlignment.center,
crossAxisAlignment: StacCrossAxisAlignment.center,
@@ -44,7 +73,10 @@ StacRow(
)
```
-```json JSON
+
+
+
+```json
{
"type": "row",
"mainAxisAlignment": "center",
@@ -69,4 +101,37 @@ StacRow(
]
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/safe_area.mdx b/docs/widgets/safe_area.mdx
index 4f84d340e..3c2cf40dd 100644
--- a/docs/widgets/safe_area.mdx
+++ b/docs/widgets/safe_area.mdx
@@ -3,6 +3,21 @@ title: "SafeArea"
description: "Documentation for SafeArea"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const safeAreaPreviewJson = {
+ "type": "safeArea",
+ "child": {
+ "type": "text",
+ "data": "Hello, World!",
+ "style": {
+ "color": "#FFFFFF",
+ "fontSize": 24
+ }
+ }
+};
+export const safeAreaPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
Stac `SafeArea` allows you to build the Flutter SafeArea widget using JSON.
To know more about the SafeArea widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/SafeArea-class.html).
@@ -20,8 +35,10 @@ To know more about the SafeArea widget in Flutter, refer to the [official docume
## Example
-
-```dart Dart
+
+
+
+```dart
StacSafeArea(
child: StacText(
data: 'Hello, World!',
@@ -30,7 +47,10 @@ StacSafeArea(
)
```
-```json JSON
+
+
+
+```json
{
"type": "safeArea",
"child": {
@@ -38,10 +58,42 @@ StacSafeArea(
"data": "Hello, World!",
"style": {
"color": "#FFFFFF",
- "fontSize": 24.0
+ "fontSize": 24
}
}
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/scaffold.mdx b/docs/widgets/scaffold.mdx
index a6c304269..2516f6937 100644
--- a/docs/widgets/scaffold.mdx
+++ b/docs/widgets/scaffold.mdx
@@ -3,6 +3,55 @@ title: "Scaffold"
description: "Documentation for Scaffold"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const scaffoldPreviewJson = {
+ "type": "scaffold",
+ "appBar": {
+ "type": "appBar",
+ "title": {
+ "type": "text",
+ "data": "App Bar Title"
+ }
+ },
+ "body": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Hello, World!"
+ }
+ },
+ "floatingActionButton": {
+ "type": "floatingActionButton",
+ "child": {
+ "type": "icon",
+ "icon": "add"
+ },
+ "onPressed": {
+ "type": "function",
+ "name": "onFabPressed"
+ }
+ },
+ "backgroundColor": "#FFFFFF",
+ "drawer": {
+ "type": "drawer",
+ "child": {
+ "type": "column",
+ "children": [
+ {
+ "type": "text",
+ "data": "Drawer Item 1"
+ },
+ {
+ "type": "text",
+ "data": "Drawer Item 2"
+ }
+ ]
+ }
+ }
+};
+export const scaffoldPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Scaffold allows you to build a Flutter scaffold widget using JSON.
To know more about the scaffold widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/Scaffold-class.html).
@@ -36,8 +85,10 @@ To know more about the scaffold widget in Flutter, refer to the [official docume
## Example
-
-```dart Dart
+
+
+
+```dart
StacScaffold(
appBar: StacAppBar(
title: StacText(data: 'App Bar Title'),
@@ -61,7 +112,10 @@ StacScaffold(
)
```
-```json JSON
+
+
+
+```json
{
"type": "scaffold",
"appBar": {
@@ -108,4 +162,37 @@ StacScaffold(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/selectable_text.mdx b/docs/widgets/selectable_text.mdx
index f43061eb9..cf78bb553 100644
--- a/docs/widgets/selectable_text.mdx
+++ b/docs/widgets/selectable_text.mdx
@@ -3,6 +3,20 @@ title: "SelectableText"
description: "Documentation for SelectableText"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const selectableTextPreviewJson = {
+ "type": "selectableText",
+ "data": "This is a selectable text",
+ "style": {
+ "fontSize": 18,
+ "fontWeight": "w600"
+ },
+ "showCursor": true,
+ "cursorColor": "#FF0000"
+};
+export const selectableTextPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
Stac SelectableText allows you to build the Flutter SelectableText widget using JSON.
To know more about the SelectableText widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/SelectableText-class.html).
@@ -37,8 +51,10 @@ To know more about the SelectableText widget in Flutter, refer to the [official
## Example
-
-```dart Dart
+
+
+
+```dart
StacSelectableText(
data: 'This is a selectable text',
style: StacTextStyle(fontSize: 18, fontWeight: StacFontWeight.w600),
@@ -47,7 +63,10 @@ StacSelectableText(
)
```
-```json JSON
+
+
+
+```json
{
"type": "selectableText",
"data": "This is a selectable text",
@@ -59,4 +78,37 @@ StacSelectableText(
"cursorColor": "#FF0000"
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/set_value.mdx b/docs/widgets/set_value.mdx
index 56eeb87b1..d246114dc 100644
--- a/docs/widgets/set_value.mdx
+++ b/docs/widgets/set_value.mdx
@@ -3,6 +3,27 @@ title: "Set Value"
description: "Documentation for Set Value"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const setValuePreviewJson = {
+ "type": "setValue",
+ "values": [
+ {
+ "key": "userName",
+ "value": "John Doe"
+ },
+ {
+ "key": "isLoggedIn",
+ "value": true
+ }
+ ],
+ "child": {
+ "type": "text",
+ "data": "Welcome!"
+ }
+};
+export const setValuePreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac SetValue widget allows you to set multiple key-value pairs in the application's state and optionally render a child widget. It's useful for managing application state through JSON configuration.
## Properties
@@ -18,8 +39,10 @@ Each item in `values` should contain:
## Example
-
-```dart Dart
+
+
+
+```dart
StacSetValue(
values: [
{'key': 'userName', 'value': 'John Doe'},
@@ -29,12 +52,21 @@ StacSetValue(
)
```
-```json JSON
+
+
+
+```json
{
"type": "setValue",
"values": [
- { "key": "userName", "value": "John Doe" },
- { "key": "isLoggedIn", "value": true }
+ {
+ "key": "userName",
+ "value": "John Doe"
+ },
+ {
+ "key": "isLoggedIn",
+ "value": true
+ }
],
"child": {
"type": "text",
@@ -42,8 +74,40 @@ StacSetValue(
}
}
```
-
+
+
+
+
+
## Initializing State on Screen Load
Use `StacSetValue` to initialize state when a screen loads:
diff --git a/docs/widgets/single_child_scroll_view.mdx b/docs/widgets/single_child_scroll_view.mdx
index 70bb9ae96..a7857b0cc 100644
--- a/docs/widgets/single_child_scroll_view.mdx
+++ b/docs/widgets/single_child_scroll_view.mdx
@@ -3,6 +3,34 @@ title: "SingleChildScrollView"
description: "Documentation for SingleChildScrollView"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const singleChildScrollViewPreviewJson = {
+ "type": "singleChildScrollView",
+ "child": {
+ "type": "column",
+ "children": [
+ {
+ "type": "text",
+ "data": "Hello World!"
+ },
+ {
+ "type": "text",
+ "data": "This is a SingleChildScrollView widget."
+ },
+ {
+ "type": "text",
+ "data": "You can scroll vertically."
+ },
+ {
+ "type": "text",
+ "data": "You can also scroll horizontally."
+ }
+ ]
+ }
+};
+export const singleChildScrollViewPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac SingleChildScrollView allows you to build a Flutter SingleChildScrollView widget using JSON.
To know more about the SingleChildScrollView widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/SingleChildScrollView-class.html).
@@ -23,8 +51,10 @@ To know more about the SingleChildScrollView widget in Flutter, refer to the [of
## Example
-
-```dart Dart
+
+
+
+```dart
StacSingleChildScrollView(
child: StacColumn(
children: [
@@ -37,7 +67,10 @@ StacSingleChildScrollView(
)
```
-```json JSON
+
+
+
+```json
{
"type": "singleChildScrollView",
"child": {
@@ -63,4 +96,37 @@ StacSingleChildScrollView(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/sized_box.mdx b/docs/widgets/sized_box.mdx
index 3bdfb013d..1835276c5 100644
--- a/docs/widgets/sized_box.mdx
+++ b/docs/widgets/sized_box.mdx
@@ -3,6 +3,14 @@ title: "SizedBox"
description: "Documentation for SizedBox"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const sizedBoxPreviewJson = {
+ "type": "sizedBox",
+ "height": 25
+};
+export const sizedBoxPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac SizedBox allows you to build a Flutter SizedBox widget using JSON.
To know more about the sizedBox widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/SizedBox-class.html).
@@ -16,16 +24,53 @@ To know more about the sizedBox widget in Flutter, refer to the [official docume
## Example
-
-```dart Dart
+
+
+
+```dart
StacSizedBox(height: 25)
```
-```json JSON
+
+
+
+```json
{
"type": "sizedBox",
"height": 25
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/slider.mdx b/docs/widgets/slider.mdx
index 8f599c047..b42e5754a 100644
--- a/docs/widgets/slider.mdx
+++ b/docs/widgets/slider.mdx
@@ -3,6 +3,34 @@ title: "Slider"
description: "Documentation for Slider"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const sliderPreviewJson = {
+ "type": "scaffold",
+ "appBar": {
+ "type": "appBar",
+ "title": {
+ "type": "text",
+ "data": "Stac Slider"
+ }
+ },
+ "body": {
+ "type": "form",
+ "child": {
+ "type": "center",
+ "child": {
+ "id": "example_slider",
+ "type": "slider",
+ "sliderType": "material",
+ "value": 20,
+ "max": 100,
+ "divisions": 5
+ }
+ }
+ }
+};
+export const sliderPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Slider allows you to build a Flutter Slider widget using JSON.
To know more about the Slider widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/Slider-class.html).
@@ -32,8 +60,10 @@ To know more about the Slider widget in Flutter, refer to the [official document
## Example
-
-```dart Dart
+
+
+
+```dart
StacScaffold(
appBar: StacAppBar(
title: StacText(data: 'Stac Slider'),
@@ -52,7 +82,10 @@ StacScaffold(
)
```
-```json JSON
+
+
+
+```json
{
"type": "scaffold",
"appBar": {
@@ -78,4 +111,37 @@ StacScaffold(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/sliver_app_bar.mdx b/docs/widgets/sliver_app_bar.mdx
index a435274b6..212ab13b4 100644
--- a/docs/widgets/sliver_app_bar.mdx
+++ b/docs/widgets/sliver_app_bar.mdx
@@ -3,6 +3,45 @@ title: "SliverAppBar"
description: "Documentation for SliverAppBar"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const sliverAppBarPreviewJson = {
+ "type": "scaffold",
+ "body": {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverAppBar",
+ "title": {
+ "type": "text",
+ "data": "SliverAppBar"
+ },
+ "leading": {
+ "type": "iconButton",
+ "icon": {
+ "type": "icon",
+ "iconType": "material",
+ "icon": "menu"
+ },
+ "onPressed": {}
+ },
+ "actions": [
+ {
+ "type": "iconButton",
+ "icon": {
+ "type": "icon",
+ "iconType": "cupertino",
+ "icon": "heart_solid"
+ },
+ "onPressed": {}
+ }
+ ]
+ }
+ ]
+ }
+};
+export const sliverAppBarPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac SliverAppBar allows you to build a Flutter sliver app bar widget using JSON.
To know more about the app bar widget in Flutter, refer to
the [official documentation](https://api.flutter.dev/flutter/material/SliverAppBar-class.html).
@@ -46,15 +85,16 @@ the [official documentation](https://api.flutter.dev/flutter/material/SliverAppB
## Example
-
-```dart Dart
+
+
+
+```dart
StacSliverAppBar(
title: StacText(data: 'SliverAppBar'),
leading: StacIconButton(
icon: StacIcon(iconType: 'material', icon: 'menu'),
onPressed: StacNoneAction(),
),
- backgroundColor: 'primary',
actions: [
StacIconButton(
icon: StacIcon(iconType: 'cupertino', icon: 'heart_solid'),
@@ -64,34 +104,77 @@ StacSliverAppBar(
)
```
-```json JSON
+
+
+
+```json
{
- "type": "sliverAppBar",
- "title": {
- "type": "text",
- "data": "SliverAppBar"
- },
- "leading": {
- "type": "iconButton",
- "icon": {
- "type": "icon",
- "iconType": "material",
- "icon": "menu"
- },
- "onPressed": {}
- },
- "backgroundColor": "primary",
- "actions": [
- {
- "type": "iconButton",
- "icon": {
- "type": "icon",
- "iconType": "cupertino",
- "icon": "heart_solid"
- },
- "onPressed": {}
- }
- ]
+ "type": "scaffold",
+ "body": {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverAppBar",
+ "title": {
+ "type": "text",
+ "data": "SliverAppBar"
+ },
+ "leading": {
+ "type": "iconButton",
+ "icon": {
+ "type": "icon",
+ "iconType": "material",
+ "icon": "menu"
+ },
+ "onPressed": {}
+ },
+ "actions": [
+ {
+ "type": "iconButton",
+ "icon": {
+ "type": "icon",
+ "iconType": "cupertino",
+ "icon": "heart_solid"
+ },
+ "onPressed": {}
+ }
+ ]
+ }
+ ]
+ }
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/sliver_fill_remaining.mdx b/docs/widgets/sliver_fill_remaining.mdx
index 968716b09..1a868ba8d 100644
--- a/docs/widgets/sliver_fill_remaining.mdx
+++ b/docs/widgets/sliver_fill_remaining.mdx
@@ -3,6 +3,29 @@ title: "SliverFillRemaining"
description: "Documentation for SliverFillRemaining"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const sliverFillRemainingPreviewJson = {
+ "type": "scaffold",
+ "body": {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverFillRemaining",
+ "hasScrollBody": false,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "This content fills the remaining space"
+ }
+ }
+ }
+ ]
+ }
+};
+export const sliverFillRemainingPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac SliverFillRemaining allows you to build a Flutter `SliverFillRemaining`
widget using JSON.
@@ -28,8 +51,10 @@ To learn more about the SliverFillRemaining widget in Flutter, refer to the
## Example
-
-```dart Dart
+
+
+
+```dart
const StacSliverFillRemaining(
hasScrollBody: false,
child: StacCenter(
@@ -38,17 +63,61 @@ const StacSliverFillRemaining(
)
```
-```json JSON
+
+
+
+```json
{
- "type": "sliverFillRemaining",
- "hasScrollBody": false,
- "child": {
- "type": "center",
- "child": {
- "type": "text",
- "data": "This content fills the remaining space"
- }
+ "type": "scaffold",
+ "body": {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverFillRemaining",
+ "hasScrollBody": false,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "This content fills the remaining space"
+ }
+ }
+ }
+ ]
}
}
```
-
\ No newline at end of file
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/sliver_grid.mdx b/docs/widgets/sliver_grid.mdx
index 0dff62981..13eb236ea 100644
--- a/docs/widgets/sliver_grid.mdx
+++ b/docs/widgets/sliver_grid.mdx
@@ -3,6 +3,84 @@ title: "SliverGrid"
description: "Documentation for SliverGrid"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const sliverGridPreviewJson = {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverGrid",
+ "crossAxisCount": 2,
+ "mainAxisSpacing": 16,
+ "crossAxisSpacing": 16,
+ "childAspectRatio": 1,
+ "children": [
+ {
+ "type": "container",
+ "color": "#4CAF50",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Grid Item 1",
+ "style": {
+ "color": "#FFFFFF",
+ "fontWeight": "bold"
+ }
+ }
+ }
+ },
+ {
+ "type": "container",
+ "color": "#4CAF50",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Grid Item 2",
+ "style": {
+ "color": "#FFFFFF",
+ "fontWeight": "bold"
+ }
+ }
+ }
+ },
+ {
+ "type": "container",
+ "color": "#4CAF50",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Grid Item 3",
+ "style": {
+ "color": "#FFFFFF",
+ "fontWeight": "bold"
+ }
+ }
+ }
+ },
+ {
+ "type": "container",
+ "color": "#4CAF50",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Grid Item 4",
+ "style": {
+ "color": "#FFFFFF",
+ "fontWeight": "bold"
+ }
+ }
+ }
+ }
+ ]
+ }
+ ]
+};
+export const sliverGridPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac **SliverGrid** allows you to build a Flutter `SliverGrid` widget using JSON.
It displays its children in a two-dimensional scrollable grid within a sliver
context.
@@ -10,7 +88,6 @@ context.
To learn more about Flutter’s `SliverGrid`, refer to the
[official documentation](https://api.flutter.dev/flutter/widgets/SliverGrid-class.html).
-
## Properties
| Property | Type | Description |
@@ -33,135 +110,182 @@ To learn more about Flutter’s `SliverGrid`, refer to the
## Example
-
-```dart Dart
-const StacSliverGrid(
- crossAxisCount: 2,
- mainAxisSpacing: 16,
- crossAxisSpacing: 16,
- childAspectRatio: 1,
- children: [
- StacContainer(
- color: StacColor('#4CAF50'),
- child: StacCenter(
- child: StacText(
- data: 'Grid Item 1',
- style: StacTextStyle(
- color: StacColor('#FFFFFF'),
- fontWeight: StacFontWeight.bold,
+
+
+
+```dart
+const StacCustomScrollView(
+ slivers: [
+ StacSliverGrid(
+ crossAxisCount: 2,
+ mainAxisSpacing: 16,
+ crossAxisSpacing: 16,
+ childAspectRatio: 1,
+ children: [
+ StacContainer(
+ color: StacColor('#4CAF50'),
+ child: StacCenter(
+ child: StacText(
+ data: 'Grid Item 1',
+ style: StacTextStyle(
+ color: StacColor('#FFFFFF'),
+ fontWeight: StacFontWeight.bold,
+ ),
+ ),
),
),
- ),
- ),
- StacContainer(
- color: StacColor('#4CAF50'),
- child: StacCenter(
- child: StacText(
- data: 'Grid Item 2',
- style: StacTextStyle(
- color: StacColor('#FFFFFF'),
- fontWeight: StacFontWeight.bold,
+ StacContainer(
+ color: StacColor('#4CAF50'),
+ child: StacCenter(
+ child: StacText(
+ data: 'Grid Item 2',
+ style: StacTextStyle(
+ color: StacColor('#FFFFFF'),
+ fontWeight: StacFontWeight.bold,
+ ),
+ ),
),
),
- ),
- ),
- StacContainer(
- color: StacColor('#4CAF50'),
- child: StacCenter(
- child: StacText(
- data: 'Grid Item 3',
- style: StacTextStyle(
- color: StacColor('#FFFFFF'),
- fontWeight: StacFontWeight.bold,
+ StacContainer(
+ color: StacColor('#4CAF50'),
+ child: StacCenter(
+ child: StacText(
+ data: 'Grid Item 3',
+ style: StacTextStyle(
+ color: StacColor('#FFFFFF'),
+ fontWeight: StacFontWeight.bold,
+ ),
+ ),
),
),
- ),
- ),
- StacContainer(
- color: StacColor('#4CAF50'),
- child: StacCenter(
- child: StacText(
- data: 'Grid Item 4',
- style: StacTextStyle(
- color: StacColor('#FFFFFF'),
- fontWeight: StacFontWeight.bold,
+ StacContainer(
+ color: StacColor('#4CAF50'),
+ child: StacCenter(
+ child: StacText(
+ data: 'Grid Item 4',
+ style: StacTextStyle(
+ color: StacColor('#FFFFFF'),
+ fontWeight: StacFontWeight.bold,
+ ),
+ ),
),
),
- ),
+ ],
),
],
)
```
-```json JSON
+
+
+
+```json
{
- "type": "sliverGrid",
- "crossAxisCount": 2,
- "mainAxisSpacing": 16,
- "crossAxisSpacing": 16,
- "childAspectRatio": 1,
- "children": [
+ "type": "customScrollView",
+ "slivers": [
{
- "type": "container",
- "color": "#4CAF50",
- "child": {
- "type": "center",
- "child": {
- "type": "text",
- "data": "Grid Item 1",
- "style": {
- "color": "#FFFFFF",
- "fontWeight": "bold"
+ "type": "sliverGrid",
+ "crossAxisCount": 2,
+ "mainAxisSpacing": 16,
+ "crossAxisSpacing": 16,
+ "childAspectRatio": 1,
+ "children": [
+ {
+ "type": "container",
+ "color": "#4CAF50",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Grid Item 1",
+ "style": {
+ "color": "#FFFFFF",
+ "fontWeight": "bold"
+ }
+ }
}
- }
- }
- },
- {
- "type": "container",
- "color": "#4CAF50",
- "child": {
- "type": "center",
- "child": {
- "type": "text",
- "data": "Grid Item 2",
- "style": {
- "color": "#FFFFFF",
- "fontWeight": "bold"
+ },
+ {
+ "type": "container",
+ "color": "#4CAF50",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Grid Item 2",
+ "style": {
+ "color": "#FFFFFF",
+ "fontWeight": "bold"
+ }
+ }
}
- }
- }
- },
- {
- "type": "container",
- "color": "#4CAF50",
- "child": {
- "type": "center",
- "child": {
- "type": "text",
- "data": "Grid Item 3",
- "style": {
- "color": "#FFFFFF",
- "fontWeight": "bold"
+ },
+ {
+ "type": "container",
+ "color": "#4CAF50",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Grid Item 3",
+ "style": {
+ "color": "#FFFFFF",
+ "fontWeight": "bold"
+ }
+ }
}
- }
- }
- },
- {
- "type": "container",
- "color": "#4CAF50",
- "child": {
- "type": "center",
- "child": {
- "type": "text",
- "data": "Grid Item 4",
- "style": {
- "color": "#FFFFFF",
- "fontWeight": "bold"
+ },
+ {
+ "type": "container",
+ "color": "#4CAF50",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Grid Item 4",
+ "style": {
+ "color": "#FFFFFF",
+ "fontWeight": "bold"
+ }
+ }
}
}
- }
+ ]
}
]
}
```
-
\ No newline at end of file
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/sliver_list.mdx b/docs/widgets/sliver_list.mdx
index 3fd31859b..3f4fda958 100644
--- a/docs/widgets/sliver_list.mdx
+++ b/docs/widgets/sliver_list.mdx
@@ -3,6 +3,59 @@ title: "SliverList"
description: "Documentation for SliverList"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const sliverListPreviewJson = {
+ "type": "scaffold",
+ "body": {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverList",
+ "children": [
+ {
+ "type": "container",
+ "height": 80,
+ "color": "primary",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "List Item 1"
+ }
+ }
+ },
+ {
+ "type": "container",
+ "height": 80,
+ "color": "secondary",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "List Item 2"
+ }
+ }
+ },
+ {
+ "type": "container",
+ "height": 80,
+ "color": "success",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "List Item 3"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+};
+export const sliverListPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac SliverList allows you to build a Flutter sliver list widget using JSON.
It displays its children in a linear, scrollable list within a sliver context.
@@ -28,8 +81,10 @@ To learn more about the SliverList widget in Flutter, refer to the
## Example
-
-```dart Dart
+
+
+
+```dart
const StacSliverList(
children: [
StacContainer(
@@ -57,7 +112,10 @@ const StacSliverList(
)
```
-```json JSON
+
+
+
+```json
{
"type": "scaffold",
"body": {
@@ -108,4 +166,37 @@ const StacSliverList(
}
}
```
-
\ No newline at end of file
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/sliver_opacity.mdx b/docs/widgets/sliver_opacity.mdx
index a53135c9c..99235820f 100644
--- a/docs/widgets/sliver_opacity.mdx
+++ b/docs/widgets/sliver_opacity.mdx
@@ -3,6 +3,37 @@ title: "SliverOpacity"
description: "Documentation for SliverOpacity"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const sliverOpacityPreviewJson = {
+ "type": "scaffold",
+ "body": {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverOpacity",
+ "opacity": 0.5,
+ "sliver": {
+ "type": "sliverToBoxAdapter",
+ "child": {
+ "type": "container",
+ "height": 200,
+ "color": "red",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "I am a faded sliver"
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+};
+export const sliverOpacityPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac SliverOpacity allows you to apply opacity to an entire sliver inside a `CustomScrollView`.
It is useful for creating fade effects on scrollable content.
@@ -20,8 +51,10 @@ To know more about the SliverOpacity widget in Flutter, refer to the
## Example
-
-```dart Dart
+
+
+
+```dart
StacSliverOpacity(
opacity: 0.5,
sliver: StacSliverToBoxAdapter(
@@ -36,25 +69,69 @@ StacSliverOpacity(
)
```
-```json JSON
+
+
+
+```json
{
- "type": "sliverOpacity",
- "opacity": 0.5,
- "sliver": {
- "type": "sliverToBoxAdapter",
- "child": {
- "type": "container",
- "height": 200,
- "color": "red",
- "child": {
- "type": "center",
- "child": {
- "type": "text",
- "data": "I am a faded sliver"
+ "type": "scaffold",
+ "body": {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverOpacity",
+ "opacity": 0.5,
+ "sliver": {
+ "type": "sliverToBoxAdapter",
+ "child": {
+ "type": "container",
+ "height": 200,
+ "color": "red",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "I am a faded sliver"
+ }
+ }
+ }
}
}
- }
+ ]
}
}
```
-
\ No newline at end of file
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/sliver_padding.mdx b/docs/widgets/sliver_padding.mdx
index c070b331a..382ca9eec 100644
--- a/docs/widgets/sliver_padding.mdx
+++ b/docs/widgets/sliver_padding.mdx
@@ -3,6 +3,41 @@ title: "SliverPadding"
description: "Documentation for SliverPadding"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const sliverPaddingPreviewJson = {
+ "type": "scaffold",
+ "body": {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverPadding",
+ "padding": 16,
+ "sliver": {
+ "type": "sliverToBoxAdapter",
+ "child": {
+ "type": "container",
+ "height": 150,
+ "color": "#4CAF50",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "I am a Box inside a SliverPadding!",
+ "style": {
+ "color": "#FFFFFF",
+ "fontWeight": "bold"
+ }
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+};
+export const sliverPaddingPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac SliverPadding allows you to inset a sliver widget by a given padding using JSON. It is typically used inside a `CustomScrollView`.
To know more about the sliver padding widget in Flutter, refer to
the [official documentation](https://api.flutter.dev/flutter/widgets/SliverPadding-class.html).
@@ -16,8 +51,10 @@ the [official documentation](https://api.flutter.dev/flutter/widgets/SliverPaddi
## Example
-
-```dart Dart
+
+
+
+```dart
StacSliverPadding(
padding: StacEdgeInsets.all(16.0),
sliver: StacSliverToBoxAdapter(
@@ -35,29 +72,73 @@ StacSliverPadding(
)
```
-```json JSON
+
+
+
+```json
{
- "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 SliverPadding!",
- "style": {
- "color": "#FFFFFF",
- "fontWeight": "bold"
+ "type": "scaffold",
+ "body": {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverPadding",
+ "padding": 16,
+ "sliver": {
+ "type": "sliverToBoxAdapter",
+ "child": {
+ "type": "container",
+ "height": 150,
+ "color": "#4CAF50",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "I am a Box inside a SliverPadding!",
+ "style": {
+ "color": "#FFFFFF",
+ "fontWeight": "bold"
+ }
+ }
+ }
}
}
}
- }
+ ]
}
}
```
-
\ No newline at end of file
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/sliver_safe_area.mdx b/docs/widgets/sliver_safe_area.mdx
index b6e1d0bb6..4ead9b40e 100644
--- a/docs/widgets/sliver_safe_area.mdx
+++ b/docs/widgets/sliver_safe_area.mdx
@@ -3,6 +3,29 @@ title: "SliverSafeArea"
description: "Documentation for SliverSafeArea"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const sliverSafeAreaPreviewJson = {
+ "type": "scaffold",
+ "body": {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverSafeArea",
+ "top": true,
+ "sliver": {
+ "type": "sliverToBoxAdapter",
+ "child": {
+ "type": "text",
+ "data": "Hello World"
+ }
+ }
+ }
+ ]
+ }
+};
+export const sliverSafeAreaPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac SliverSafeArea allows you to build a Flutter sliver safe area widget using JSON.
To know more about the safe area widget in Flutter, refer to
the [official documentation](https://api.flutter.dev/flutter/widgets/SliverSafeArea-class.html).
@@ -20,8 +43,10 @@ the [official documentation](https://api.flutter.dev/flutter/widgets/SliverSafeA
## Example
-
-```dart Dart
+
+
+
+```dart
StacSliverSafeArea(
top: true,
sliver: StacSliverToBoxAdapter(
@@ -30,17 +55,61 @@ StacSliverSafeArea(
)
```
-```json JSON
+
+
+
+```json
{
- "type": "sliverSafeArea",
- "top": true,
- "sliver": {
- "type": "sliverToBoxAdapter",
- "child": {
- "type": "text",
- "data": "Hello World"
- }
+ "type": "scaffold",
+ "body": {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverSafeArea",
+ "top": true,
+ "sliver": {
+ "type": "sliverToBoxAdapter",
+ "child": {
+ "type": "text",
+ "data": "Hello World"
+ }
+ }
+ }
+ ]
}
}
```
-
\ No newline at end of file
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/sliver_to_box_adapter.mdx b/docs/widgets/sliver_to_box_adapter.mdx
index 43f5c9d37..2c2f26285 100644
--- a/docs/widgets/sliver_to_box_adapter.mdx
+++ b/docs/widgets/sliver_to_box_adapter.mdx
@@ -3,6 +3,33 @@ title: "SliverToBoxAdapter"
description: "A sliver that contains a single box widget."
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const sliverToBoxAdapterPreviewJson = {
+ "type": "sliverPadding",
+ "padding": 16,
+ "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"
+ }
+ }
+ }
+ }
+ }
+};
+export const sliverToBoxAdapterPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac SliverToBoxAdapter allows you to build a Flutter sliver-to-box-adapter widget using JSON. It creates a sliver that contains a single box widget.
To know more about the sliver-to-box-adapter widget in Flutter, refer to
the [official documentation](https://api.flutter.dev/flutter/widgets/SliverToBoxAdapter-class.html).
@@ -15,8 +42,10 @@ the [official documentation](https://api.flutter.dev/flutter/widgets/SliverToBox
## Example
-
-```dart Dart
+
+
+
+```dart
StacSliverPadding(
padding: StacEdgeInsets.all(16),
sliver: StacSliverToBoxAdapter(
@@ -34,7 +63,10 @@ StacSliverPadding(
)
```
-```json JSON
+
+
+
+```json
{
"type": "sliverPadding",
"padding": 16,
@@ -59,4 +91,37 @@ StacSliverPadding(
}
}
```
-
\ No newline at end of file
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/sliver_visibility.mdx b/docs/widgets/sliver_visibility.mdx
index 3b95bca2a..0eb61302d 100644
--- a/docs/widgets/sliver_visibility.mdx
+++ b/docs/widgets/sliver_visibility.mdx
@@ -3,6 +3,37 @@ title: "SliverVisibility"
description: "Documentation for SliverVisibility"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const sliverVisibilityPreviewJson = {
+ "type": "scaffold",
+ "body": {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverVisibility",
+ "visible": false,
+ "sliver": {
+ "type": "sliverToBoxAdapter",
+ "child": {
+ "type": "container",
+ "height": 180,
+ "color": "warning",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "This sliver is hidden"
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+};
+export const sliverVisibilityPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac SliverVisibility allows you to conditionally show or hide a sliver
inside a `CustomScrollView`.
@@ -27,8 +58,10 @@ the [official documentation](https://api.flutter.dev/flutter/widgets/SliverVisib
## Example
-
-```dart Dart
+
+
+
+```dart
StacSliverVisibility(
visible: false,
sliver: StacSliverToBoxAdapter(
@@ -43,25 +76,69 @@ StacSliverVisibility(
)
```
-```json JSON
+
+
+
+```json
{
- "type": "sliverVisibility",
- "visible": false,
- "sliver": {
- "type": "sliverToBoxAdapter",
- "child": {
- "type": "container",
- "height": 180,
- "color": "warning",
- "child": {
- "type": "center",
- "child": {
- "type": "text",
- "data": "This sliver is hidden"
+ "type": "scaffold",
+ "body": {
+ "type": "customScrollView",
+ "slivers": [
+ {
+ "type": "sliverVisibility",
+ "visible": false,
+ "sliver": {
+ "type": "sliverToBoxAdapter",
+ "child": {
+ "type": "container",
+ "height": 180,
+ "color": "warning",
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "This sliver is hidden"
+ }
+ }
+ }
}
}
- }
+ ]
}
}
```
-
\ No newline at end of file
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/spacer.mdx b/docs/widgets/spacer.mdx
index 87c6cf0e5..dadac476f 100644
--- a/docs/widgets/spacer.mdx
+++ b/docs/widgets/spacer.mdx
@@ -3,6 +3,14 @@ title: "Spacer"
description: "Documentation for Spacer"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const spacerPreviewJson = {
+ "type": "spacer",
+ "flex": 2
+};
+export const spacerPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Spacer allows you to build a Flutter spacer widget using JSON.
To know more about the spacer widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Spacer-class.html).
@@ -14,15 +22,53 @@ To know more about the spacer widget in Flutter, refer to the [official document
## Example
-
-```dart Dart
+
+
+
+```dart
StacSpacer(flex: 2)
```
-```json JSON
+
+
+
+```json
{
"type": "spacer",
"flex": 2
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/stack.mdx b/docs/widgets/stack.mdx
index 30854fcb5..70d65481b 100644
--- a/docs/widgets/stack.mdx
+++ b/docs/widgets/stack.mdx
@@ -3,6 +3,29 @@ title: "Stack"
description: "Documentation for Stack"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const stackPreviewJson = {
+ "type": "stack",
+ "alignment": "center",
+ "clipBehavior": "antiAlias",
+ "fit": "expand",
+ "textDirection": "ltr",
+ "children": [
+ {
+ "type": "text",
+ "data": "Hello, World!"
+ },
+ {
+ "type": "container",
+ "width": 100,
+ "height": 100,
+ "color": "#FF0000"
+ }
+ ]
+};
+export const stackPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Stack allows you to build a Flutter stack widget using JSON.
To know more about the stack widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Stack-class.html).
@@ -18,8 +41,10 @@ To know more about the stack widget in Flutter, refer to the [official documenta
## Example
-
-```dart Dart
+
+
+
+```dart
StacStack(
alignment: StacAlignment.center,
clipBehavior: StacClip.antiAlias,
@@ -32,7 +57,10 @@ StacStack(
)
```
-```json JSON
+
+
+
+```json
{
"type": "stack",
"alignment": "center",
@@ -53,4 +81,37 @@ StacStack(
]
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/switch.mdx b/docs/widgets/switch.mdx
index 62a7c139a..5d92883c0 100644
--- a/docs/widgets/switch.mdx
+++ b/docs/widgets/switch.mdx
@@ -3,6 +3,15 @@ title: "Switch"
description: "Documentation for Switch"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const switchPreviewJson = {
+ "type": "switch",
+ "switchType": "cupertino",
+ "value": true
+};
+export const switchPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac `Switch` widget allows you to build the Flutter Switch widget using JSON.
To know more about the Switch widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/Switch-class.html).
@@ -39,23 +48,60 @@ To know more about the Switch widget in Flutter, refer to the [official document
### Example 1: Cupertino Switch
-
-```dart Dart
+
+
+
+```dart
StacSwitch(
switchType: StacSwitchType.cupertino,
value: true,
)
```
-```json JSON
+
+
+
+```json
{
"type": "switch",
"switchType": "cupertino",
"value": true
}
```
-
+
+
+
+
+
### Example 2: Adaptive Switch
diff --git a/docs/widgets/tab_bar.mdx b/docs/widgets/tab_bar.mdx
index 41840f966..c6d913639 100644
--- a/docs/widgets/tab_bar.mdx
+++ b/docs/widgets/tab_bar.mdx
@@ -3,6 +3,58 @@ title: "TabBar"
description: "Documentation for TabBar"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const tabBarPreviewJson = {
+ "type": "defaultTabController",
+ "length": 3,
+ "child": {
+ "type": "scaffold",
+ "appBar": {
+ "type": "appBar",
+ "title": {
+ "type": "text",
+ "data": "Tabbar"
+ },
+ "bottom": {
+ "type": "tabBar",
+ "tabs": [
+ {
+ "type": "tab",
+ "text": "Red"
+ },
+ {
+ "type": "tab",
+ "text": "Red"
+ },
+ {
+ "type": "tab",
+ "text": "Red"
+ }
+ ]
+ }
+ },
+ "body": {
+ "type": "tabBarView",
+ "children": [
+ {
+ "type": "container",
+ "color": "#D9D9D9"
+ },
+ {
+ "type": "container",
+ "color": "#FC3F1B"
+ },
+ {
+ "type": "container",
+ "color": "#D9D9D9"
+ }
+ ]
+ }
+ }
+};
+export const tabBarPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac TabBar allows you to build a Flutter TabBar widget using JSON.
To know more about the TabBar widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/TabBar-class.html).
@@ -58,7 +110,6 @@ To know more about the Tab widget in Flutter, refer to the [official documentati
| height | `double` | The height of the tab. |
| child | `StacWidget` | The widget below this widget in the tree. |
-
## TabBarView
The Stac TabBarView allows you to build a Flutter TabBarView widget using JSON.
@@ -77,8 +128,10 @@ To know more about the TabBarView widget in Flutter, refer to the [official docu
## Example
-
-```dart Dart
+
+
+
+```dart
StacDefaultTabController(
length: 3,
child: StacScaffold(
@@ -103,7 +156,10 @@ StacDefaultTabController(
)
```
-```json JSON
+
+
+
+```json
{
"type": "defaultTabController",
"length": 3,
@@ -153,5 +209,37 @@ StacDefaultTabController(
}
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/table.mdx b/docs/widgets/table.mdx
index 10129a665..4ce0e812d 100644
--- a/docs/widgets/table.mdx
+++ b/docs/widgets/table.mdx
@@ -3,6 +3,135 @@ title: "Table"
description: "Documentation for Table"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const tablePreviewJson = {
+ "type": "table",
+ "columnWidths": {
+ "1": {
+ "type": "fixedColumnWidth",
+ "value": 200
+ }
+ },
+ "defaultColumnWidth": {
+ "type": "flexColumnWidth",
+ "value": 1
+ },
+ "textDirection": "ltr",
+ "defaultVerticalAlignment": "bottom",
+ "border": {
+ "color": "#428AF5",
+ "width": 1,
+ "style": "solid",
+ "borderRadius": {
+ "topLeft": 16,
+ "topRight": 16,
+ "bottomLeft": 16,
+ "bottomRight": 16
+ }
+ },
+ "children": [
+ {
+ "type": "tableRow",
+ "children": [
+ {
+ "type": "tableCell",
+ "child": {
+ "type": "container",
+ "color": "#40000000",
+ "height": 50,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Header 1"
+ }
+ }
+ }
+ },
+ {
+ "type": "tableCell",
+ "child": {
+ "type": "container",
+ "color": "#40000000",
+ "height": 50,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Header 2"
+ }
+ }
+ }
+ },
+ {
+ "type": "tableCell",
+ "child": {
+ "type": "container",
+ "color": "#40000000",
+ "height": 50,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Header 3"
+ }
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "tableRow",
+ "children": [
+ {
+ "type": "tableCell",
+ "child": {
+ "type": "sizedBox",
+ "height": 50,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Row 1, Cell 1"
+ }
+ }
+ }
+ },
+ {
+ "type": "tableCell",
+ "child": {
+ "type": "sizedBox",
+ "height": 50,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Row 1, Cell 2"
+ }
+ }
+ }
+ },
+ {
+ "type": "tableCell",
+ "child": {
+ "type": "sizedBox",
+ "height": 50,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Row 1, Cell 3"
+ }
+ }
+ }
+ }
+ ]
+ }
+ ]
+};
+export const tablePreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
StacTable allows you to build the Flutter Table widget using JSON.
To know more about the Table widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Table-class.html).
@@ -20,8 +149,10 @@ To know more about the Table widget in Flutter, refer to the [official documenta
## Example
-
-```dart Dart
+
+
+
+```dart
StacTable(
columnWidths: {
1: StacFixedColumnWidth(value: 200),
@@ -87,7 +218,10 @@ StacTable(
)
```
-```json JSON
+
+
+
+```json
{
"type": "table",
"columnWidths": {
@@ -104,13 +238,13 @@ StacTable(
"defaultVerticalAlignment": "bottom",
"border": {
"color": "#428AF5",
- "width": 1.0,
+ "width": 1,
"style": "solid",
"borderRadius": {
- "topLeft": 16.0,
- "topRight": 16.0,
- "bottomLeft": 16.0,
- "bottomRight": 16.0
+ "topLeft": 16,
+ "topRight": 16,
+ "bottomLeft": 16,
+ "bottomRight": 16
}
},
"children": [
@@ -122,7 +256,7 @@ StacTable(
"child": {
"type": "container",
"color": "#40000000",
- "height": 50.0,
+ "height": 50,
"child": {
"type": "center",
"child": {
@@ -137,7 +271,7 @@ StacTable(
"child": {
"type": "container",
"color": "#40000000",
- "height": 50.0,
+ "height": 50,
"child": {
"type": "center",
"child": {
@@ -152,7 +286,7 @@ StacTable(
"child": {
"type": "container",
"color": "#40000000",
- "height": 50.0,
+ "height": 50,
"child": {
"type": "center",
"child": {
@@ -171,7 +305,7 @@ StacTable(
"type": "tableCell",
"child": {
"type": "sizedBox",
- "height": 50.0,
+ "height": 50,
"child": {
"type": "center",
"child": {
@@ -185,7 +319,7 @@ StacTable(
"type": "tableCell",
"child": {
"type": "sizedBox",
- "height": 50.0,
+ "height": 50,
"child": {
"type": "center",
"child": {
@@ -199,7 +333,7 @@ StacTable(
"type": "tableCell",
"child": {
"type": "sizedBox",
- "height": 50.0,
+ "height": 50,
"child": {
"type": "center",
"child": {
@@ -214,4 +348,37 @@ StacTable(
]
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/table_cell.mdx b/docs/widgets/table_cell.mdx
index 44acce7cc..085b38977 100644
--- a/docs/widgets/table_cell.mdx
+++ b/docs/widgets/table_cell.mdx
@@ -3,6 +3,26 @@ title: "TableCell"
description: "Documentation for TableCell"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const tableCellPreviewJson = {
+ "type": "tableCell",
+ "verticalAlignment": "top",
+ "child": {
+ "type": "container",
+ "color": "#40000000",
+ "height": 50,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Header 1"
+ }
+ }
+ }
+};
+export const tableCellPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
StacTableCell allows you to define the Flutter TableCell widget using JSON.
To know more about the TableCell widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/TableCell-class.html).
@@ -14,8 +34,10 @@ To know more about the TableCell widget in Flutter, refer to the [official docum
## Example
-
-```dart Dart
+
+
+
+```dart
StacTableCell(
verticalAlignment: StacTableCellVerticalAlignment.top,
child: StacContainer(
@@ -28,14 +50,17 @@ StacTableCell(
)
```
-```json JSON
+
+
+
+```json
{
"type": "tableCell",
"verticalAlignment": "top",
"child": {
"type": "container",
"color": "#40000000",
- "height": 50.0,
+ "height": 50,
"child": {
"type": "center",
"child": {
@@ -46,4 +71,37 @@ StacTableCell(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/table_row.mdx b/docs/widgets/table_row.mdx
index d6d92c701..85dc591ce 100644
--- a/docs/widgets/table_row.mdx
+++ b/docs/widgets/table_row.mdx
@@ -3,6 +3,60 @@ title: "TableRow"
description: "Documentation for TableRow"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const tableRowPreviewJson = {
+ "type": "tableRow",
+ "children": [
+ {
+ "type": "tableCell",
+ "child": {
+ "type": "container",
+ "color": "#40000000",
+ "height": 50,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Header 1"
+ }
+ }
+ }
+ },
+ {
+ "type": "tableCell",
+ "child": {
+ "type": "container",
+ "color": "#40000000",
+ "height": 50,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Header 2"
+ }
+ }
+ }
+ },
+ {
+ "type": "tableCell",
+ "child": {
+ "type": "container",
+ "color": "#40000000",
+ "height": 50,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "Header 3"
+ }
+ }
+ }
+ }
+ ]
+};
+export const tableRowPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
StacTableRow allows you to define the Flutter TableRow widget using JSON.
To know more about the TableRow widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/TableRow-class.html).
@@ -15,8 +69,10 @@ To know more about the TableRow widget in Flutter, refer to the [official docume
## Example
-
-```dart Dart
+
+
+
+```dart
StacTableRow(
children: [
StacTableCell(
@@ -44,7 +100,10 @@ StacTableRow(
)
```
-```json JSON
+
+
+
+```json
{
"type": "tableRow",
"children": [
@@ -53,7 +112,7 @@ StacTableRow(
"child": {
"type": "container",
"color": "#40000000",
- "height": 50.0,
+ "height": 50,
"child": {
"type": "center",
"child": {
@@ -68,7 +127,7 @@ StacTableRow(
"child": {
"type": "container",
"color": "#40000000",
- "height": 50.0,
+ "height": 50,
"child": {
"type": "center",
"child": {
@@ -83,7 +142,7 @@ StacTableRow(
"child": {
"type": "container",
"color": "#40000000",
- "height": 50.0,
+ "height": 50,
"child": {
"type": "center",
"child": {
@@ -96,4 +155,37 @@ StacTableRow(
]
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/text.mdx b/docs/widgets/text.mdx
index c748f215e..8171d6361 100644
--- a/docs/widgets/text.mdx
+++ b/docs/widgets/text.mdx
@@ -3,6 +3,18 @@ title: "Text"
description: "Documentation for Text"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const textPreviewJson = {
+ "type": "text",
+ "data": "Hello, World!",
+ "style": {
+ "color": "#FFFFFF",
+ "fontSize": 24
+ }
+};
+export const textPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Text allows you to build a Flutter Text widget using JSON.
To know more about the text widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Text-class.html).
@@ -26,8 +38,10 @@ To know more about the text widget in Flutter, refer to the [official documentat
## Example
-
-```dart Dart
+
+
+
+```dart
StacText(
data: 'Hello, World!',
style: StacTextStyle(
@@ -37,15 +51,50 @@ StacText(
)
```
-```json JSON
+
+
+
+```json
{
"type": "text",
"data": "Hello, World!",
"style": {
"color": "#FFFFFF",
- "fontSize": 24.0
+ "fontSize": 24
}
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/text_button.mdx b/docs/widgets/text_button.mdx
index 18ecaf7b1..30721af73 100644
--- a/docs/widgets/text_button.mdx
+++ b/docs/widgets/text_button.mdx
@@ -3,6 +3,27 @@ title: "TextButton"
description: "Documentation for TextButton"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const textButtonPreviewJson = {
+ "type": "textButton",
+ "onPressed": {},
+ "onLongPress": {},
+ "onHover": {},
+ "onFocusChange": {},
+ "style": {
+ "backgroundColor": "#FFC107",
+ "foregroundColor": "#000000"
+ },
+ "autofocus": false,
+ "clipBehavior": "none",
+ "child": {
+ "type": "text",
+ "data": "Click Me!"
+ }
+};
+export const textButtonPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Text Button allows you to build a Flutter text button widget using JSON.
To know more about the text button widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/TextButton-class.html).
@@ -22,8 +43,10 @@ To know more about the text button widget in Flutter, refer to the [official doc
## Example
-
-```dart Dart
+
+
+
+```dart
StacTextButton(
onPressed: StacNoneAction(),
style: StacButtonStyle(
@@ -36,7 +59,10 @@ StacTextButton(
)
```
-```json JSON
+
+
+
+```json
{
"type": "textButton",
"onPressed": {},
@@ -55,4 +81,37 @@ StacTextButton(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/text_field.mdx b/docs/widgets/text_field.mdx
index 62dc98b71..e1d02237a 100644
--- a/docs/widgets/text_field.mdx
+++ b/docs/widgets/text_field.mdx
@@ -3,6 +3,24 @@ title: "TextField"
description: "Documentation for TextField"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const textFieldPreviewJson = {
+ "type": "textField",
+ "initialValue": "Enter text here",
+ "decoration": {
+ "hintText": "Enter your name"
+ },
+ "style": {
+ "color": "#000000",
+ "fontSize": 16
+ },
+ "textAlign": "center",
+ "obscureText": false,
+ "maxLength": 50
+};
+export const textFieldPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac TextField allows you to build a Flutter text field widget using JSON. To know more about the text field widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/TextField-class.html).
## Properties
@@ -37,8 +55,10 @@ The Stac TextField allows you to build a Flutter text field widget using JSON. T
## Example
-
-```dart Dart
+
+
+
+```dart
StacTextField(
initialValue: 'Enter text here',
decoration: StacInputDecoration(hintText: 'Enter your name'),
@@ -49,7 +69,10 @@ StacTextField(
)
```
-```json JSON
+
+
+
+```json
{
"type": "textField",
"initialValue": "Enter text here",
@@ -58,11 +81,44 @@ StacTextField(
},
"style": {
"color": "#000000",
- "fontSize": 16.0
+ "fontSize": 16
},
"textAlign": "center",
"obscureText": false,
"maxLength": 50
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/text_form_field.mdx b/docs/widgets/text_form_field.mdx
index 4b93395f2..5e74ddd22 100644
--- a/docs/widgets/text_form_field.mdx
+++ b/docs/widgets/text_form_field.mdx
@@ -3,6 +3,36 @@ title: "TextFormField"
description: "Documentation for TextFormField"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const textFormFieldPreviewJson = {
+ "type": "textFormField",
+ "id": "email",
+ "autovalidateMode": "onUserInteraction",
+ "validatorRules": [
+ {
+ "rule": "isEmail",
+ "message": "Please enter a valid email"
+ }
+ ],
+ "style": {
+ "fontSize": 16,
+ "fontWeight": "w400",
+ "height": 1.5
+ },
+ "decoration": {
+ "hintText": "Email",
+ "filled": true,
+ "fillColor": "#FFFFFF",
+ "border": {
+ "type": "outlineInputBorder",
+ "borderRadius": 8,
+ "color": "#24151D29"
+ }
+ }
+};
+export const textFormFieldPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac TextFormField allows you to build a Flutter TextFormField widget using JSON.
To know more about the TextFormField widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/TextFormField-class.html).
@@ -50,8 +80,10 @@ To know more about the TextFormField widget in Flutter, refer to the [official d
## Example
-
-```dart Dart
+
+
+
+```dart
StacTextFormField(
id: 'email',
autovalidateMode: StacAutovalidateMode.onUserInteraction,
@@ -68,7 +100,10 @@ StacTextFormField(
)
```
-```json JSON
+
+
+
+```json
{
"type": "textFormField",
"id": "email",
@@ -96,4 +131,37 @@ StacTextFormField(
}
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/tool_tip.mdx b/docs/widgets/tool_tip.mdx
index 8ecd9273d..52e69a7e8 100644
--- a/docs/widgets/tool_tip.mdx
+++ b/docs/widgets/tool_tip.mdx
@@ -3,6 +3,19 @@ title: "Tooltip"
description: "Documentation for Tooltip"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const toolTipPreviewJson = {
+ "type": "tooltip",
+ "message": "This is a basic tooltip",
+ "child": {
+ "type": "icon",
+ "icon": "info",
+ "size": 32
+ }
+};
+export const toolTipPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The **Stac Tooltip** allows you to build a Flutter `Tooltip` widget using JSON.
To learn more about Flutter’s Tooltip widget, refer to the [official Flutter documentation](https://api.flutter.dev/flutter/material/Tooltip-class.html).
@@ -37,15 +50,20 @@ To learn more about Flutter’s Tooltip widget, refer to the [official Flutter d
#### Basic Tooltip
-
-```dart Dart
+
+
+
+```dart
StacTooltip(
message: 'This is a basic tooltip',
child: StacIcon(icon: 'info', size: 32),
)
```
-```json JSON
+
+
+
+```json
{
"type": "tooltip",
"message": "This is a basic tooltip",
@@ -56,8 +74,40 @@ StacTooltip(
}
}
```
-
+
+
+
+
+
#### Styled Tooltip
@@ -219,4 +269,3 @@ StacTooltip(
```
-
diff --git a/docs/widgets/vertical_divider.mdx b/docs/widgets/vertical_divider.mdx
index 46d6cd894..674621b64 100644
--- a/docs/widgets/vertical_divider.mdx
+++ b/docs/widgets/vertical_divider.mdx
@@ -3,6 +3,18 @@ title: "Vertical Divider"
description: "Documentation for Vertical Divider"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const verticalDividerPreviewJson = {
+ "type": "verticalDivider",
+ "width": 20,
+ "thickness": 4,
+ "indent": 10,
+ "endIndent": 10,
+ "color": "#21814C"
+};
+export const verticalDividerPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Vertical Divider allows you to build a Flutter vertical divider widget using JSON.
To know more about the vertical divider widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/VerticalDivider-class.html).
@@ -18,8 +30,10 @@ To know more about the vertical divider widget in Flutter, refer to the [officia
## Example
-
-```dart Dart
+
+
+
+```dart
StacVerticalDivider(
width: 20,
thickness: 4,
@@ -29,7 +43,10 @@ StacVerticalDivider(
)
```
-```json JSON
+
+
+
+```json
{
"type": "verticalDivider",
"width": 20,
@@ -39,5 +56,37 @@ StacVerticalDivider(
"color": "#21814C"
}
```
-
+
+
+
+
+
diff --git a/docs/widgets/visibility.mdx b/docs/widgets/visibility.mdx
index 6ac09048b..81d5b53a0 100644
--- a/docs/widgets/visibility.mdx
+++ b/docs/widgets/visibility.mdx
@@ -3,6 +3,18 @@ title: "Visibility"
description: "Documentation for Visibility"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const visibilityPreviewJson = {
+ "type": "visibility",
+ "child": {
+ "type": "text",
+ "data": "I am visible!"
+ },
+ "visible": true
+};
+export const visibilityPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
Stac Visibility allows you to build the Flutter Visibility widget using JSON.
To know more about the Visibility widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Visibility-class.html).
@@ -27,15 +39,20 @@ To know more about the Visibility widget in Flutter, refer to the [official docu
### Example 1: Basic Visibility
-
-```dart Dart
+
+
+
+```dart
StacVisibility(
child: StacText(data: 'I am visible!'),
visible: true,
)
```
-```json JSON
+
+
+
+```json
{
"type": "visibility",
"child": {
@@ -45,8 +62,40 @@ StacVisibility(
"visible": true
}
```
-
+
+
+
+
+
### Example 2: Hidden with Replacement
diff --git a/docs/widgets/webview.mdx b/docs/widgets/webview.mdx
index 508a6dda8..30fbd468c 100644
--- a/docs/widgets/webview.mdx
+++ b/docs/widgets/webview.mdx
@@ -3,6 +3,14 @@ title: "WebView"
description: "Documentation for WebView"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const webviewPreviewJson = {
+ "type": "webView",
+ "url": "https://github.com/StacDev/stac"
+};
+export const webviewPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac WebView allows you to display WebView widget using JSON in your app. It is based on the [webview_flutter](https://pub.dev/packages/webview_flutter) plugin.
## Usage
@@ -48,17 +56,55 @@ void main() async {
## Example
-
-```dart Dart
+
+
+
+```dart
StacWebView(
url: 'https://github.com/StacDev/stac',
)
```
-```json JSON
+
+
+
+```json
{
"type": "webView",
"url": "https://github.com/StacDev/stac"
}
```
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/widgets/wrap.mdx b/docs/widgets/wrap.mdx
index 171551441..7b1f843e7 100644
--- a/docs/widgets/wrap.mdx
+++ b/docs/widgets/wrap.mdx
@@ -3,6 +3,81 @@ title: "Wrap"
description: "Documentation for Wrap"
---
+import { PLAYGROUND_BASE_URL } from "/snippets/playground_base.mdx";
+
+export const wrapPreviewJson = {
+ "type": "wrap",
+ "spacing": 8,
+ "runSpacing": 4,
+ "children": [
+ {
+ "type": "container",
+ "color": "#FFF44336",
+ "width": 100,
+ "height": 100,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "1",
+ "style": {
+ "color": "#FFFFFFFF"
+ }
+ }
+ }
+ },
+ {
+ "type": "container",
+ "color": "#FFE91E63",
+ "width": 100,
+ "height": 100,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "2",
+ "style": {
+ "color": "#FFFFFFFF"
+ }
+ }
+ }
+ },
+ {
+ "type": "container",
+ "color": "#FF9C27B0",
+ "width": 100,
+ "height": 100,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "3",
+ "style": {
+ "color": "#FFFFFFFF"
+ }
+ }
+ }
+ },
+ {
+ "type": "container",
+ "color": "#FF673AB7",
+ "width": 100,
+ "height": 100,
+ "child": {
+ "type": "center",
+ "child": {
+ "type": "text",
+ "data": "4",
+ "style": {
+ "color": "#FFFFFFFF"
+ }
+ }
+ }
+ }
+ ]
+};
+export const wrapPreviewSrc = `${PLAYGROUND_BASE_URL}/embed`;
+
The Stac Wrap allows you to build a Flutter Wrap widget using JSON.
To know more about the wrap widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Wrap-class.html).
@@ -23,8 +98,10 @@ To know more about the wrap widget in Flutter, refer to the [official documentat
## Example
-
-```dart Dart
+
+
+
+```dart
StacWrap(
spacing: 8.0,
runSpacing: 4.0,
@@ -57,11 +134,14 @@ StacWrap(
)
```
-```json JSON
+
+
+
+```json
{
"type": "wrap",
- "spacing": 8.0,
- "runSpacing": 4.0,
+ "spacing": 8,
+ "runSpacing": 4,
"children": [
{
"type": "container",
@@ -130,7 +210,38 @@ StacWrap(
]
}
```
-
+
+
+
+
+
diff --git a/examples/counter_example/pubspec.lock b/examples/counter_example/pubspec.lock
index 24d756a89..5062314b0 100644
--- a/examples/counter_example/pubspec.lock
+++ b/examples/counter_example/pubspec.lock
@@ -784,34 +784,30 @@ packages:
stac:
dependency: "direct main"
description:
- name: stac
- sha256: f1a53751157e7882d7218765b6e13016aa345007f2c6b48520c6edb32b4d02d3
- url: "https://pub.dev"
- source: hosted
+ path: "../../packages/stac"
+ relative: true
+ source: path
version: "1.4.0"
stac_core:
- dependency: transitive
+ dependency: "direct overridden"
description:
- name: stac_core
- sha256: fd7e618b62b8ea136ec56837a466ab3f639a124e371d18f9d75af8631f4e2980
- url: "https://pub.dev"
- source: hosted
+ path: "../../packages/stac_core"
+ relative: true
+ source: path
version: "1.4.0"
stac_framework:
- dependency: transitive
+ dependency: "direct overridden"
description:
- name: stac_framework
- sha256: e75d1a1b2fd46c65acbc6ce174c7272aef4eb4020722f09c35fce2b3dadf858e
- url: "https://pub.dev"
- source: hosted
+ path: "../../packages/stac_framework"
+ relative: true
+ source: path
version: "1.0.0"
stac_logger:
- dependency: transitive
+ dependency: "direct overridden"
description:
- name: stac_logger
- sha256: bc3c1cc486d59d2378c1e18bfd9bfa078be564b58d4ae2b3898633c05a02df26
- url: "https://pub.dev"
- source: hosted
+ path: "../../packages/stac_logger"
+ relative: true
+ source: path
version: "1.1.0"
stack_trace:
dependency: transitive
@@ -990,5 +986,5 @@ packages:
source: hosted
version: "3.1.3"
sdks:
- dart: ">=3.9.2 <4.0.0"
+ dart: ">=3.9.0 <4.0.0"
flutter: ">=3.35.0"
diff --git a/examples/movie_app/pubspec.lock b/examples/movie_app/pubspec.lock
index 48b37aed9..7ed7c023e 100644
--- a/examples/movie_app/pubspec.lock
+++ b/examples/movie_app/pubspec.lock
@@ -712,34 +712,30 @@ packages:
stac:
dependency: "direct main"
description:
- name: stac
- sha256: f1a53751157e7882d7218765b6e13016aa345007f2c6b48520c6edb32b4d02d3
- url: "https://pub.dev"
- source: hosted
+ path: "../../packages/stac"
+ relative: true
+ source: path
version: "1.4.0"
stac_core:
- dependency: transitive
+ dependency: "direct overridden"
description:
- name: stac_core
- sha256: fd7e618b62b8ea136ec56837a466ab3f639a124e371d18f9d75af8631f4e2980
- url: "https://pub.dev"
- source: hosted
+ path: "../../packages/stac_core"
+ relative: true
+ source: path
version: "1.4.0"
stac_framework:
- dependency: transitive
+ dependency: "direct overridden"
description:
- name: stac_framework
- sha256: e75d1a1b2fd46c65acbc6ce174c7272aef4eb4020722f09c35fce2b3dadf858e
- url: "https://pub.dev"
- source: hosted
+ path: "../../packages/stac_framework"
+ relative: true
+ source: path
version: "1.0.0"
stac_logger:
- dependency: transitive
+ dependency: "direct overridden"
description:
- name: stac_logger
- sha256: bc3c1cc486d59d2378c1e18bfd9bfa078be564b58d4ae2b3898633c05a02df26
- url: "https://pub.dev"
- source: hosted
+ path: "../../packages/stac_logger"
+ relative: true
+ source: path
version: "1.1.0"
stack_trace:
dependency: transitive
@@ -910,5 +906,5 @@ packages:
source: hosted
version: "3.1.3"
sdks:
- dart: ">=3.9.2 <4.0.0"
+ dart: ">=3.9.0 <4.0.0"
flutter: ">=3.35.0"
diff --git a/examples/stac_gallery/pubspec.lock b/examples/stac_gallery/pubspec.lock
index 820e330ef..ff6d69155 100644
--- a/examples/stac_gallery/pubspec.lock
+++ b/examples/stac_gallery/pubspec.lock
@@ -776,42 +776,37 @@ packages:
stac:
dependency: "direct main"
description:
- name: stac
- sha256: f1a53751157e7882d7218765b6e13016aa345007f2c6b48520c6edb32b4d02d3
- url: "https://pub.dev"
- source: hosted
+ path: "../../packages/stac"
+ relative: true
+ source: path
version: "1.4.0"
stac_core:
- dependency: transitive
+ dependency: "direct overridden"
description:
- name: stac_core
- sha256: fd7e618b62b8ea136ec56837a466ab3f639a124e371d18f9d75af8631f4e2980
- url: "https://pub.dev"
- source: hosted
+ path: "../../packages/stac_core"
+ relative: true
+ source: path
version: "1.4.0"
stac_framework:
- dependency: transitive
+ dependency: "direct overridden"
description:
- name: stac_framework
- sha256: e75d1a1b2fd46c65acbc6ce174c7272aef4eb4020722f09c35fce2b3dadf858e
- url: "https://pub.dev"
- source: hosted
+ path: "../../packages/stac_framework"
+ relative: true
+ source: path
version: "1.0.0"
stac_logger:
- dependency: transitive
+ dependency: "direct overridden"
description:
- name: stac_logger
- sha256: bc3c1cc486d59d2378c1e18bfd9bfa078be564b58d4ae2b3898633c05a02df26
- url: "https://pub.dev"
- source: hosted
+ path: "../../packages/stac_logger"
+ relative: true
+ source: path
version: "1.1.0"
stac_webview:
dependency: "direct main"
description:
- name: stac_webview
- sha256: "6cf9a59a8b7b9aea85e599777a57618365b45f544d0a66916995a9dd4b2ee379"
- url: "https://pub.dev"
- source: hosted
+ path: "../../packages/stac_webview"
+ relative: true
+ source: path
version: "1.0.0"
stack_trace:
dependency: transitive
@@ -1022,5 +1017,5 @@ packages:
source: hosted
version: "3.1.3"
sdks:
- dart: ">=3.9.2 <4.0.0"
+ dart: ">=3.9.0 <4.0.0"
flutter: ">=3.35.0"
diff --git a/packages/stac_cli/pubspec.lock b/packages/stac_cli/pubspec.lock
index 20428a541..ea1f4bd3b 100644
--- a/packages/stac_cli/pubspec.lock
+++ b/packages/stac_cli/pubspec.lock
@@ -241,11 +241,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.1"
- flutter:
- dependency: transitive
- description: flutter
- source: sdk
- version: "0.0.0"
frontend_server_client:
dependency: transitive
description:
@@ -358,14 +353,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.12.19"
- material_color_utilities:
- dependency: transitive
- description:
- name: material_color_utilities
- sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
- url: "https://pub.dev"
- source: hosted
- version: "0.13.0"
meta:
dependency: transitive
description:
@@ -462,11 +449,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.0"
- sky_engine:
- dependency: transitive
- description: flutter
- source: sdk
- version: "0.0.0"
source_gen:
dependency: transitive
description:
@@ -510,18 +492,16 @@ packages:
stac_core:
dependency: "direct main"
description:
- name: stac_core
- sha256: fd7e618b62b8ea136ec56837a466ab3f639a124e371d18f9d75af8631f4e2980
- url: "https://pub.dev"
- source: hosted
+ path: "../stac_core"
+ relative: true
+ source: path
version: "1.4.0"
stac_logger:
- dependency: transitive
+ dependency: "direct overridden"
description:
- name: stac_logger
- sha256: bc3c1cc486d59d2378c1e18bfd9bfa078be564b58d4ae2b3898633c05a02df26
- url: "https://pub.dev"
- source: hosted
+ path: "../stac_logger"
+ relative: true
+ source: path
version: "1.1.0"
stack_trace:
dependency: transitive
@@ -603,14 +583,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.4.0"
- vector_math:
- dependency: transitive
- description:
- name: vector_math
- sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
- url: "https://pub.dev"
- source: hosted
- version: "2.2.0"
vm_service:
dependency: transitive
description:
@@ -677,4 +649,3 @@ packages:
version: "3.1.3"
sdks:
dart: ">=3.10.0 <4.0.0"
- flutter: ">=1.17.0"