Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions examples/counter_example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -726,21 +726,21 @@ packages:
path: "../../packages/stac"
relative: true
source: path
version: "1.0.0-dev.6"
version: "1.0.0-dev.7"
stac_core:
dependency: "direct overridden"
description:
path: "../../packages/stac_core"
relative: true
source: path
version: "0.1.0"
version: "0.2.0"
stac_framework:
dependency: "direct overridden"
description:
path: "../../packages/stac_framework"
relative: true
source: path
version: "0.3.0"
version: "0.4.0"
stac_logger:
dependency: "direct overridden"
description:
Expand Down
6 changes: 3 additions & 3 deletions examples/movie_app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -446,21 +446,21 @@ packages:
path: "../../packages/stac"
relative: true
source: path
version: "1.0.0-dev.6"
version: "1.0.0-dev.7"
stac_core:
dependency: "direct main"
description:
path: "../../packages/stac_core"
relative: true
source: path
version: "0.1.0"
version: "0.2.0"
stac_framework:
dependency: "direct overridden"
description:
path: "../../packages/stac_framework"
relative: true
source: path
version: "0.3.0"
version: "0.4.0"
stac_logger:
dependency: "direct overridden"
description:
Expand Down
6 changes: 3 additions & 3 deletions examples/stac_gallery/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -726,21 +726,21 @@ packages:
path: "../../packages/stac"
relative: true
source: path
version: "1.0.0-dev.6"
version: "1.0.0-dev.7"
stac_core:
dependency: "direct main"
description:
path: "../../packages/stac_core"
relative: true
source: path
version: "0.1.0"
version: "0.2.0"
stac_framework:
dependency: "direct overridden"
description:
path: "../../packages/stac_framework"
relative: true
source: path
version: "0.3.0"
version: "0.4.0"
stac_logger:
dependency: "direct overridden"
description:
Expand Down
213 changes: 110 additions & 103 deletions packages/stac/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,129 +1,136 @@
## 1.0.0-dev.7

- feat: Added support for Dart-to-Json conversion via Stac DSL
- breaking: TextSpan now takes `text` as a pram instead of `data`
- feat: Improved Stac border and styles
- Minor bug fixes and improvements

## 1.0.0-dev.6

* BREAKING: Minimum Flutter SDK is now 3.35.0+
* BREAKING: Switch — rename `activeColor` → `activeThumbColor` (align with Flutter API). Update your JSON accordingly
* BREAKING: `ThemeData.bottomAppBarTheme` now expects `BottomAppBarThemeData` (aligned with Flutter 3.35). No JSON change for `StacBottomAppBarTheme`
* docs: Updated Switch and Radio docs; added guidance for RadioGroup usage
* chore: Static analysis cleanups for latest Flutter
- BREAKING: Minimum Flutter SDK is now 3.35.0+
- BREAKING: Switch — rename `activeColor` → `activeThumbColor` (align with Flutter API). Update your JSON accordingly
- BREAKING: `ThemeData.bottomAppBarTheme` now expects `BottomAppBarThemeData` (aligned with Flutter 3.35). No JSON change for `StacBottomAppBarTheme`
- docs: Updated Switch and Radio docs; added guidance for RadioGroup usage
- chore: Static analysis cleanups for latest Flutter

## 1.0.0-dev.5

* feat: WASM compatibility for Web/WASM platform support
* feat: Implemented conditional widget with expression evaluation for dynamic UI logic
* feat: Added SVG file rendering capability to StacImage by @Potatomonsta
* feat: Added TextStyle.copyWith() functionality via copyWithStyle property by @Abdalqader27
* feat: Implemented border side customization in BoxDecoration by @MohamedAbd0
* feat: Added multi_action_parser support for advanced interaction handling by @antonioacademy10
* feat: Integrated SnackBarThemeData for consistent styling by @Potatomonsta
* feat: Implemented BackdropFilter widget by @manav-m
* feat: Introduced color transparency using @ notation (e.g. "primary@50")
* feat: Added support for Visibility widget by @Abdalqader27
- feat: WASM compatibility for Web/WASM platform support
- feat: Implemented conditional widget with expression evaluation for dynamic UI logic
- feat: Added SVG file rendering capability to StacImage by @Potatomonsta
- feat: Added TextStyle.copyWith() functionality via copyWithStyle property by @Abdalqader27
- feat: Implemented border side customization in BoxDecoration by @MohamedAbd0
- feat: Added multi_action_parser support for advanced interaction handling by @antonioacademy10
- feat: Integrated SnackBarThemeData for consistent styling by @Potatomonsta
- feat: Implemented BackdropFilter widget by @manav-m
- feat: Introduced color transparency using @ notation (e.g. "primary@50")
- feat: Added support for Visibility widget by @Abdalqader27

## 1.0.0-dev.4

* chore: update pub dependencies
- chore: update pub dependencies

## 1.0.0-dev.3

* feat: Replace networkImage with CachedNetwork Image
* feat: add ClipRRect widget support
* fix: rename ItemTemplate → itemTemplate for consistency by @ayatsuno
* feat: Add GestureDetector widget support with tap, drag and press handlers
* feat: Add Material 3 fixed color and new surface variants to color scheme
* feat: add ClipOval widget support by @vijaykarthiktk
* feat: add support for inkwell widget by @AbhijithKonnayil
* feat: add variable support with setValue widget and action
* feat: add support to StacDouble class by @AbhijithKonnayil
- feat: Replace networkImage with CachedNetwork Image
- feat: add ClipRRect widget support
- fix: rename ItemTemplate → itemTemplate for consistency by @ayatsuno
- feat: Add GestureDetector widget support with tap, drag and press handlers
- feat: Add Material 3 fixed color and new surface variants to color scheme
- feat: add ClipOval widget support by @vijaykarthiktk
- feat: add support for inkwell widget by @AbhijithKonnayil
- feat: add variable support with setValue widget and action
- feat: add support to StacDouble class by @AbhijithKonnayil

## 1.0.0-dev.2

* feat: update stac theme with new ThemeData classes
* fix: Make background & onBackground as nullable in ColorScheme by @oyewalekehinde
* feat: Add support for the DropdownMenu widget by @Odinachi
- feat: update stac theme with new ThemeData classes
- fix: Make background & onBackground as nullable in ColorScheme by @oyewalekehinde
- feat: Add support for the DropdownMenu widget by @Odinachi

## 1.0.0-dev.1

* feat: Add SliverAppBar & CustomScrollView parser by @nikb7
* chore: update pub dependencies
* feat: Add StacDynamicView parser for fetching and rendering API data
- feat: Add SliverAppBar & CustomScrollView parser by @nikb7
- chore: update pub dependencies
- feat: Add StacDynamicView parser for fetching and rendering API data

## 0.10.0

* Migrate to Flutter 3.29
* feat: Remove IconAlignment from button widgets by @divyanshub024
- Migrate to Flutter 3.29
- feat: Remove IconAlignment from button widgets by @divyanshub024

## 0.9.3

* Add pub.dev topics
- Add pub.dev topics

## 0.9.2

* chore: update readme
- chore: update readme

## 0.9.0

* feat: Add Stac parser for hero widget by @Yash-Khattar
* feat: Added support for radio widget by @ishanvaghani
* feat: Added support for slider widget by @ishanvaghani
* feat: Add support for Opacity widget by @vinothvino42
* feat: Add material as default icon type and update icon example by @vinothvino42
* fix: filledButton onPressed and onLongPress Functionality by @ShalmonAnandas
* feat: Added support for snackbar by @ishanvaghani
* feat: Adding Support Placeholder by @MohamedAbd0
* feat : Adding AspectRatio, FittedBox, LimitedBox Widgets by @MohamedAbd0
* feat: Update Stac webview @divyanshub024
* fix: Simplify table border configuration by @divyanshub024
* feat: Added support for name colors by @ishanvaghani
* feat: standardize parameters in buttons by @ishanvaghani
* feat: Update Chip widget params by @divyanshub024
* fix: change all icon button widget property from child to icon by @vinothvino42
- feat: Add Stac parser for hero widget by @Yash-Khattar
- feat: Added support for radio widget by @ishanvaghani
- feat: Added support for slider widget by @ishanvaghani
- feat: Add support for Opacity widget by @vinothvino42
- feat: Add material as default icon type and update icon example by @vinothvino42
- fix: filledButton onPressed and onLongPress Functionality by @ShalmonAnandas
- feat: Added support for snackbar by @ishanvaghani
- feat: Adding Support Placeholder by @MohamedAbd0
- feat : Adding AspectRatio, FittedBox, LimitedBox Widgets by @MohamedAbd0
- feat: Update Stac webview @divyanshub024
- fix: Simplify table border configuration by @divyanshub024
- feat: Added support for name colors by @ishanvaghani
- feat: standardize parameters in buttons by @ishanvaghani
- feat: Update Chip widget params by @divyanshub024
- fix: change all icon button widget property from child to icon by @vinothvino42

## 0.8.3

* chore: Rename from Mirai to Stac
* chore: update readme
- chore: Rename from Mirai to Stac
- chore: update readme

## 0.8.0

* chore: Code Refactoring :) by @divyanshub024
* feat: Add Row and Column Spacing by @divyanshub024
* feat: Add Stac carousel view with example by @divyanshub024
* feat: Add Stac colored box parser by @divyanshub024
* fix: Replace cache network image with the Image.network. by @divyanshub024
* feat: Add support for the Divider widget by @bhattkrutij
* feat: added ability to override stac parsers and action_parsers. by @khanjasir90
* feat: Added support for stac progress indicators by @ishanvaghani
- chore: Code Refactoring :) by @divyanshub024
- feat: Add Row and Column Spacing by @divyanshub024
- feat: Add Stac carousel view with example by @divyanshub024
- feat: Add Stac colored box parser by @divyanshub024
- fix: Replace cache network image with the Image.network. by @divyanshub024
- feat: Add support for the Divider widget by @bhattkrutij
- feat: added ability to override stac parsers and action_parsers. by @khanjasir90
- feat: Added support for stac progress indicators by @ishanvaghani

## 0.7.2

* update Readme
- update Readme

## 0.7.0

* Added support for new widgets: CircleAvatar, GridView, Chip, Wrap & FilledButton
* Rename scrollView to SingleChildScrollView
* Added defaultBottomNavigationController & bottomNavigationView
* A new and better way to define Stac Network Request & Network Result
* Revamp Stac Form to add form validation, getting form values and submitting Form
* Use app text theme in text styles
* A new way to declare EdgeInsets & BorderRadius
* A lot of enhancement, refactoring and bug fixes
- Added support for new widgets: CircleAvatar, GridView, Chip, Wrap & FilledButton
- Rename scrollView to SingleChildScrollView
- Added defaultBottomNavigationController & bottomNavigationView
- A new and better way to define Stac Network Request & Network Result
- Revamp Stac Form to add form validation, getting form values and submitting Form
- Use app text theme in text styles
- A new way to declare EdgeInsets & BorderRadius
- A lot of enhancement, refactoring and bug fixes

## 0.6.0

* chore: update readme by @divyanshub024
* feat: Add Stac Switch by @kushalmahapatro
* :bug: fix: Failed assertion 'initialValue == null || controller == null': is not true in TextFormField by @loud-at-heart
* :rocket: Added support for align widget by @loud-at-heart
* feat: Added tabAlignment in stac tab bar by @i-asimkhan
* fix: Added scroll physics export statement in utils.dart by @i-asimkhan
* fix: Added support for `flex` in expanded widget by @i-asimkhan
* feat: Added `PageView` widget parser in `stac` widget parsers by @i-asimkhan
* Update banner by @divyanshub024
* feat: Use app theme colors in color property by @i-asimkhan
* feat: Added support for `textScaler` in Stac Text Parser by @i-asimkhan
* feat: Add Stac Network Widget by @divyanshub024
* feat: Added refresh-indicator to get a fresh `listView` json from the remote URL by @i-asimkhan
- chore: update readme by @divyanshub024
- feat: Add Stac Switch by @kushalmahapatro
- :bug: fix: Failed assertion 'initialValue == null || controller == null': is not true in TextFormField by @loud-at-heart
- :rocket: Added support for align widget by @loud-at-heart
- feat: Added tabAlignment in stac tab bar by @i-asimkhan
- fix: Added scroll physics export statement in utils.dart by @i-asimkhan
- fix: Added support for `flex` in expanded widget by @i-asimkhan
- feat: Added `PageView` widget parser in `stac` widget parsers by @i-asimkhan
- Update banner by @divyanshub024
- feat: Use app theme colors in color property by @i-asimkhan
- feat: Added support for `textScaler` in Stac Text Parser by @i-asimkhan
- feat: Add Stac Network Widget by @divyanshub024
- feat: Added refresh-indicator to get a fresh `listView` json from the remote URL by @i-asimkhan

## 0.5.1

Expand Down Expand Up @@ -168,36 +175,36 @@

## 0.2.0

* BREAKING: feat: Call `Stac.initialize` to initialize Stac (#103)
* feat: Add support for iconTheme (#91)
* feat: Add FractionallySizedBox widget (#100)
* feat: Add support for elevatedButtonTheme (#92)
* feat: Add support for outlinedButtonTheme (#93)
* feat: Add support for iconButtonTheme (#94)
* feat: Add center widget (#102)
* feat: Add support to inject dio instance (#104)
* feat: Add support for InputFormatters (#111)
* feat: Add support for InputValidation (#106)
* feat: Add `BoxDecoration` support for Container (#112)
* feat: Add Stack and Positioned widget (#114)
* chore: Update Readme (#101)
- BREAKING: feat: Call `Stac.initialize` to initialize Stac (#103)
- feat: Add support for iconTheme (#91)
- feat: Add FractionallySizedBox widget (#100)
- feat: Add support for elevatedButtonTheme (#92)
- feat: Add support for outlinedButtonTheme (#93)
- feat: Add support for iconButtonTheme (#94)
- feat: Add center widget (#102)
- feat: Add support to inject dio instance (#104)
- feat: Add support for InputFormatters (#111)
- feat: Add support for InputValidation (#106)
- feat: Add `BoxDecoration` support for Container (#112)
- feat: Add Stack and Positioned widget (#114)
- chore: Update Readme (#101)

## 0.1.0

* Added Stac Theme support
* Added new Stac Tab Parser
* Added BoxFit support for Stac Image
* Fixed AppBar size issue
* Updated examples in Stac Gallery
- Added Stac Theme support
- Added new Stac Tab Parser
- Added BoxFit support for Stac Image
- Fixed AppBar size issue
- Updated examples in Stac Gallery

## 0.0.5

* Update assets
- Update assets

## 0.0.2

* Fix README assets
- Fix README assets

## 0.0.1

* initial release 🎉
- initial release 🎉
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extension StacGradientParser on StacGradient {
case StacGradientType.sweep:
return sweepGradient();
default:
return null;
return linearGradient();
}
Comment on lines +47 to 48
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fallback to LinearGradient on unknown type can assert/crash when colors < 2 (and with mismatched stops).

Previously unknown types yielded null; now we may construct a LinearGradient with 0–1 colors or invalid stops, which hits Flutter assertions and can fail at runtime. Guard or return null.

Apply this minimal, safer fallback:

       default:
-        return linearGradient();
+        // Only fallback to linear when we have a valid gradient payload.
+        if ((colors?.length ?? 0) >= 2) {
+          return linearGradient();
+        }
+        return null;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
return linearGradient();
}
// Only fallback to linear when we have a valid gradient payload.
if ((colors?.length ?? 0) >= 2) {
return linearGradient();
}
return null;
}
🤖 Prompt for AI Agents
In packages/stac/lib/src/parsers/foundation/effects/stac_gradient_parser.dart
around lines 47-48, the fallback that unconditionally returns a LinearGradient
can trigger Flutter assertions when colors has fewer than 2 entries or when
stops length mismatches colors; instead validate before constructing: if colors
is null or colors.length < 2, return null; if stops is non-null and stops.length
!= colors.length, return null (or drop stops by setting to null) and only then
build and return the LinearGradient. Ensure the function preserves the previous
null behavior for invalid/unknown gradient types.

}
}
Original file line number Diff line number Diff line change
@@ -1,6 +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';
import 'package:stac_core/stac_core.dart';

export 'stac_align_parser.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:stac/src/framework/framework.dart';
import 'package:stac/src/parsers/foundation/foundation.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_core/stac_core.dart';
Expand All @@ -17,7 +18,7 @@ class StacAlignParser extends StacParser<StacAlign> {
@override
Widget parse(BuildContext context, StacAlign model) {
return Align(
alignment: model.alignment.value,
alignment: model.alignment.parse,
heightFactor: model.heightFactor?.parse,
widthFactor: model.widthFactor?.parse,
child: Stac.fromJson(model.child, context),
Expand Down
Loading