Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
af1fa73
feat: Add basic Stac Inkwell suppot
AbhijithKonnayil May 7, 2025
e16f43a
feat: Add StacInkWell model and JSON serialization support
AbhijithKonnayil May 7, 2025
11a36cd
feat: Register StacInkwellParser and update WidgetType enum to includ…
AbhijithKonnayil May 7, 2025
e3bd673
feat: Add Stac InkWell json
AbhijithKonnayil May 7, 2025
ae8123d
feat: Enhance StacInkWell with additional gesture handlers and proper…
AbhijithKonnayil May 8, 2025
20ff470
feat: Refactor inkWell example JSON structure for improved clarity an…
AbhijithKonnayil May 8, 2025
a020731
feat: Add Stac InkWell documentation with properties and example JSON
AbhijithKonnayil May 8, 2025
3462b3d
Merge branch 'dev' into 238-inkwell-widget
divyanshub024 May 9, 2025
c84f00b
add empty line in StacInkwellParser for better readability.
AbhijithKonnayil May 9, 2025
6392baa
feat: update home_screen by moving Inkwell to alphabetical order and …
AbhijithKonnayil May 9, 2025
2c87de5
fix: remove unnecessary empty line in StacInkwellParser for cleaner code
AbhijithKonnayil May 10, 2025
cb7bb67
feat: add StacDouble class with JSON serialization and string parsing…
AbhijithKonnayil May 19, 2025
8594de6
refactored existing stac widgets to use `StacDouble` instead of `double`
AbhijithKonnayil May 19, 2025
a9e8be0
restructure container_example.json to use double string values
AbhijithKonnayil May 19, 2025
f7184c8
Merge branch 'dev' into 226-double-class
AbhijithKonnayil May 19, 2025
0315e45
reverted accidental changes in list view
AbhijithKonnayil May 20, 2025
c57ad47
updated container_example.json to fix list child taking full width i…
AbhijithKonnayil May 20, 2025
43b5d63
Merge branch 'dev' into 226-double-class
divyanshub024 May 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 48 additions & 17 deletions examples/stac_gallery/assets/json/container_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,69 @@
},
"body": {
"type": "listView",
"physics": "never",
"shrinkWrap": true,
"children": [
{
"type": "sizedBox",
"height": 52
},
{
"type": "container",
"color": "#672BFF",
"height": 250,
"width": 200
"type": "center",
"child": {
"type": "container",
"color": "#672BFF",
"height": 250,
"width": "maxFinite"
}
},
{
"type": "sizedBox",
"height": 52
},
{
"type": "center",
"child": {
"type": "container",
"color": "#FC5632",
"height": 100,
"width": "200",
"child": {
"type": "align",
"alignment": "bottomCenter",
"child": {
"type": "text",
"data": "Flutter",
"align": "center",
"style": {
"fontSize": 23,
"fontWeight": "w600"
}
}
}
}
},
{
"type": "sizedBox",
"height": 52
},
{
"type": "container",
"color": "#FC5632",
"height": 250,
"width": 200,
"type": "center",
"child": {
"type": "align",
"alignment": "bottomCenter",
"type": "container",
"color": "#FFFF00",
"height": 250,
"width": 250,
"child": {
"type": "text",
"data": "Flutter",
"align": "center",
"style": {
"fontSize": 23,
"fontWeight": "w600"
"type": "align",
"alignment": "bottomCenter",
"child": {
"type": "text",
"data": "Flutter",
"align": "center",
"style": {
"fontSize": 23,
"fontWeight": "w600"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:stac/src/parsers/widgets/stac_alignment_geometry/stac_alignment_geometry.dart';
import 'package:stac/src/parsers/widgets/stac_double/stac_double.dart';
import 'package:stac/src/parsers/widgets/stac_edge_insets/stac_edge_insets.dart';
import 'package:stac/src/parsers/widgets/stac_shape_border/stac_shape_border.dart';
import 'package:stac/src/parsers/widgets/stac_text_style/stac_text_style.dart';
Expand All @@ -27,14 +28,18 @@ abstract class StacAlertDialog with _$StacAlertDialog {
MainAxisAlignment? actionsAlignment,
OverflowBarAlignment? actionsOverflowAlignment,
VerticalDirection? actionsOverflowDirection,
double? actionsOverflowButtonSpacing,
StacDouble? actionsOverflowButtonSpacing,
StacEdgeInsets? buttonPadding,
String? backgroundColor,
double? elevation,
StacDouble? elevation,
String? shadowColor,
String? surfaceTintColor,
String? semanticLabel,
@Default(StacEdgeInsets(left: 40, right: 40, top: 24, bottom: 24))
@Default(StacEdgeInsets(
left: StacDouble(40),
right: StacDouble(40),
top: StacDouble(24),
bottom: StacDouble(24)))
StacEdgeInsets insetPadding,
@Default(Clip.none) Clip clipBehavior,
StacShapeBorder? shape,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:stac/src/framework/framework.dart';
import 'package:stac/src/parsers/widgets/stac_alert_dialog/stac_alert_dialog.dart';
import 'package:stac/src/parsers/widgets/stac_alignment_geometry/stac_alignment_geometry.dart';
import 'package:stac/src/parsers/widgets/stac_double/stac_double.dart';
import 'package:stac/src/parsers/widgets/stac_edge_insets/stac_edge_insets.dart';
import 'package:stac/src/parsers/widgets/stac_shape_border/stac_shape_border.dart';
import 'package:stac/src/parsers/widgets/stac_text_style/stac_text_style.dart';
Expand Down Expand Up @@ -38,10 +39,10 @@ class StacAlertDialogParser extends StacParser<StacAlertDialog> {
actionsAlignment: model.actionsAlignment,
actionsOverflowAlignment: model.actionsOverflowAlignment,
actionsOverflowDirection: model.actionsOverflowDirection,
actionsOverflowButtonSpacing: model.actionsOverflowButtonSpacing,
actionsOverflowButtonSpacing: model.actionsOverflowButtonSpacing?.parse,
buttonPadding: model.buttonPadding.parse,
backgroundColor: model.backgroundColor.toColor(context),
elevation: model.elevation,
elevation: model.elevation?.parse,
shadowColor: model.shadowColor.toColor(context),
surfaceTintColor: model.surfaceTintColor.toColor(context),
semanticLabel: model.semanticLabel,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:stac/src/parsers/widgets/stac_alignment_directional/stac_alignment_directional.dart';
import 'package:stac/src/parsers/widgets/stac_double/stac_double.dart';

export 'stac_align_parser.dart';

Expand All @@ -11,8 +12,8 @@ abstract class StacAlign with _$StacAlign {
const factory StacAlign({
@Default(StacAlignmentDirectional.center)
StacAlignmentDirectional alignment,
double? widthFactor,
double? heightFactor,
StacDouble? widthFactor,
StacDouble? heightFactor,
Map<String, dynamic>? child,
}) = _StacAlign;

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:stac/src/framework/framework.dart';
import 'package:stac/src/parsers/widgets/stac_align/stac_align.dart';
import 'package:stac/src/parsers/widgets/stac_double/stac_double.dart';

import 'package:stac/src/utils/widget_type.dart';
import 'package:stac_framework/stac_framework.dart';
Expand All @@ -18,8 +19,8 @@ class StacAlignParser extends StacParser<StacAlign> {
Widget parse(BuildContext context, StacAlign model) {
return Align(
alignment: model.alignment.value,
heightFactor: model.heightFactor,
widthFactor: model.widthFactor,
heightFactor: model.heightFactor?.parse,
widthFactor: model.widthFactor?.parse,
child: Stac.fromJson(model.child, context),
);
}
Expand Down
Loading