diff --git a/examples/counter_example/pubspec.lock b/examples/counter_example/pubspec.lock index f5e275f9..b7a8cba5 100644 --- a/examples/counter_example/pubspec.lock +++ b/examples/counter_example/pubspec.lock @@ -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: diff --git a/examples/movie_app/pubspec.lock b/examples/movie_app/pubspec.lock index 93ca1e84..4dfeb69f 100644 --- a/examples/movie_app/pubspec.lock +++ b/examples/movie_app/pubspec.lock @@ -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: diff --git a/examples/stac_gallery/pubspec.lock b/examples/stac_gallery/pubspec.lock index ba36ca12..8b987a98 100644 --- a/examples/stac_gallery/pubspec.lock +++ b/examples/stac_gallery/pubspec.lock @@ -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: diff --git a/packages/stac/CHANGELOG.md b/packages/stac/CHANGELOG.md index 88aeaef2..c13c2e60 100644 --- a/packages/stac/CHANGELOG.md +++ b/packages/stac/CHANGELOG.md @@ -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 @@ -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 🎉 diff --git a/packages/stac/lib/src/parsers/foundation/effects/stac_gradient_parser.dart b/packages/stac/lib/src/parsers/foundation/effects/stac_gradient_parser.dart index 0fc70439..723b4de3 100644 --- a/packages/stac/lib/src/parsers/foundation/effects/stac_gradient_parser.dart +++ b/packages/stac/lib/src/parsers/foundation/effects/stac_gradient_parser.dart @@ -44,7 +44,7 @@ extension StacGradientParser on StacGradient { case StacGradientType.sweep: return sweepGradient(); default: - return null; + return linearGradient(); } } } diff --git a/packages/stac/lib/src/parsers/widgets/stac_align/stac_align.dart b/packages/stac/lib/src/parsers/widgets/stac_align/stac_align.dart index 1eb16313..819beaa5 100644 --- a/packages/stac/lib/src/parsers/widgets/stac_align/stac_align.dart +++ b/packages/stac/lib/src/parsers/widgets/stac_align/stac_align.dart @@ -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'; diff --git a/packages/stac/lib/src/parsers/widgets/stac_align/stac_align_parser.dart b/packages/stac/lib/src/parsers/widgets/stac_align/stac_align_parser.dart index 0d0b8362..92faefa9 100644 --- a/packages/stac/lib/src/parsers/widgets/stac_align/stac_align_parser.dart +++ b/packages/stac/lib/src/parsers/widgets/stac_align/stac_align_parser.dart @@ -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'; @@ -17,7 +18,7 @@ class StacAlignParser extends StacParser { @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), diff --git a/packages/stac/lib/src/parsers/widgets/stac_alignment/stac_alignment.dart b/packages/stac/lib/src/parsers/widgets/stac_alignment/stac_alignment.dart deleted file mode 100644 index d1aad99c..00000000 --- a/packages/stac/lib/src/parsers/widgets/stac_alignment/stac_alignment.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:flutter/material.dart'; - -enum StacAlignment { - topLeft, - topCenter, - topRight, - centerLeft, - center, - centerRight, - bottomLeft, - bottomCenter, - bottomRight; - - Alignment get value { - switch (this) { - case StacAlignment.topLeft: - return Alignment.topLeft; - case StacAlignment.topCenter: - return Alignment.topCenter; - case StacAlignment.topRight: - return Alignment.topRight; - case StacAlignment.centerLeft: - return Alignment.centerLeft; - case StacAlignment.center: - return Alignment.center; - case StacAlignment.centerRight: - return Alignment.centerRight; - case StacAlignment.bottomLeft: - return Alignment.bottomLeft; - case StacAlignment.bottomCenter: - return Alignment.bottomCenter; - case StacAlignment.bottomRight: - return Alignment.bottomRight; - } - } -} diff --git a/packages/stac/lib/src/parsers/widgets/stac_alignment_directional/stac_alignment_directional.dart b/packages/stac/lib/src/parsers/widgets/stac_alignment_directional/stac_alignment_directional.dart deleted file mode 100644 index 1f071113..00000000 --- a/packages/stac/lib/src/parsers/widgets/stac_alignment_directional/stac_alignment_directional.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:flutter/material.dart'; - -enum StacAlignmentDirectional { - topStart, - topCenter, - topEnd, - centerStart, - center, - centerEnd, - bottomStart, - bottomCenter, - bottomEnd; - - AlignmentDirectional get value { - switch (this) { - case StacAlignmentDirectional.topStart: - return AlignmentDirectional.topStart; - case StacAlignmentDirectional.topCenter: - return AlignmentDirectional.topCenter; - case StacAlignmentDirectional.topEnd: - return AlignmentDirectional.topEnd; - case StacAlignmentDirectional.centerStart: - return AlignmentDirectional.centerStart; - case StacAlignmentDirectional.center: - return AlignmentDirectional.center; - case StacAlignmentDirectional.centerEnd: - return AlignmentDirectional.centerEnd; - case StacAlignmentDirectional.bottomStart: - return AlignmentDirectional.bottomStart; - case StacAlignmentDirectional.bottomCenter: - return AlignmentDirectional.bottomCenter; - case StacAlignmentDirectional.bottomEnd: - return AlignmentDirectional.bottomEnd; - } - } -} diff --git a/packages/stac/lib/src/parsers/widgets/stac_bottom_navigation_bar/stac_bottom_navigation_bar.freezed.dart b/packages/stac/lib/src/parsers/widgets/stac_bottom_navigation_bar/stac_bottom_navigation_bar.freezed.dart deleted file mode 100644 index f02a1218..00000000 --- a/packages/stac/lib/src/parsers/widgets/stac_bottom_navigation_bar/stac_bottom_navigation_bar.freezed.dart +++ /dev/null @@ -1,510 +0,0 @@ -// dart format width=80 -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'stac_bottom_navigation_bar.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -// dart format off -T _$identity(T value) => value; - -/// @nodoc -mixin _$StacBottomNavigationBar { - List get items; - StacDouble? get elevation; - BottomNavigationBarType? get bottomNavigationBarType; - String? get fixedColor; - String? get backgroundColor; - StacDouble get iconSize; - String? get selectedItemColor; - String? get unselectedItemColor; - StacDouble get selectedFontSize; - StacDouble get unselectedFontSize; - StacTextStyle? get selectedLabelStyle; - StacTextStyle? get unselectedLabelStyle; - bool? get showSelectedLabels; - bool? get showUnselectedLabels; - bool? get enableFeedback; - BottomNavigationBarLandscapeLayout? get landscapeLayout; - - /// Create a copy of StacBottomNavigationBar - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $StacBottomNavigationBarCopyWith get copyWith => - _$StacBottomNavigationBarCopyWithImpl( - this as StacBottomNavigationBar, _$identity); - - /// Serializes this StacBottomNavigationBar to a JSON map. - Map toJson(); - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is StacBottomNavigationBar && - const DeepCollectionEquality().equals(other.items, items) && - (identical(other.elevation, elevation) || - other.elevation == elevation) && - (identical( - other.bottomNavigationBarType, bottomNavigationBarType) || - other.bottomNavigationBarType == bottomNavigationBarType) && - (identical(other.fixedColor, fixedColor) || - other.fixedColor == fixedColor) && - (identical(other.backgroundColor, backgroundColor) || - other.backgroundColor == backgroundColor) && - (identical(other.iconSize, iconSize) || - other.iconSize == iconSize) && - (identical(other.selectedItemColor, selectedItemColor) || - other.selectedItemColor == selectedItemColor) && - (identical(other.unselectedItemColor, unselectedItemColor) || - other.unselectedItemColor == unselectedItemColor) && - (identical(other.selectedFontSize, selectedFontSize) || - other.selectedFontSize == selectedFontSize) && - (identical(other.unselectedFontSize, unselectedFontSize) || - other.unselectedFontSize == unselectedFontSize) && - (identical(other.selectedLabelStyle, selectedLabelStyle) || - other.selectedLabelStyle == selectedLabelStyle) && - (identical(other.unselectedLabelStyle, unselectedLabelStyle) || - other.unselectedLabelStyle == unselectedLabelStyle) && - (identical(other.showSelectedLabels, showSelectedLabels) || - other.showSelectedLabels == showSelectedLabels) && - (identical(other.showUnselectedLabels, showUnselectedLabels) || - other.showUnselectedLabels == showUnselectedLabels) && - (identical(other.enableFeedback, enableFeedback) || - other.enableFeedback == enableFeedback) && - (identical(other.landscapeLayout, landscapeLayout) || - other.landscapeLayout == landscapeLayout)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(items), - elevation, - bottomNavigationBarType, - fixedColor, - backgroundColor, - iconSize, - selectedItemColor, - unselectedItemColor, - selectedFontSize, - unselectedFontSize, - selectedLabelStyle, - unselectedLabelStyle, - showSelectedLabels, - showUnselectedLabels, - enableFeedback, - landscapeLayout); - - @override - String toString() { - return 'StacBottomNavigationBar(items: $items, elevation: $elevation, bottomNavigationBarType: $bottomNavigationBarType, fixedColor: $fixedColor, backgroundColor: $backgroundColor, iconSize: $iconSize, selectedItemColor: $selectedItemColor, unselectedItemColor: $unselectedItemColor, selectedFontSize: $selectedFontSize, unselectedFontSize: $unselectedFontSize, selectedLabelStyle: $selectedLabelStyle, unselectedLabelStyle: $unselectedLabelStyle, showSelectedLabels: $showSelectedLabels, showUnselectedLabels: $showUnselectedLabels, enableFeedback: $enableFeedback, landscapeLayout: $landscapeLayout)'; - } -} - -/// @nodoc -abstract mixin class $StacBottomNavigationBarCopyWith<$Res> { - factory $StacBottomNavigationBarCopyWith(StacBottomNavigationBar value, - $Res Function(StacBottomNavigationBar) _then) = - _$StacBottomNavigationBarCopyWithImpl; - @useResult - $Res call( - {List items, - StacDouble? elevation, - BottomNavigationBarType? bottomNavigationBarType, - String? fixedColor, - String? backgroundColor, - StacDouble iconSize, - String? selectedItemColor, - String? unselectedItemColor, - StacDouble selectedFontSize, - StacDouble unselectedFontSize, - StacTextStyle? selectedLabelStyle, - StacTextStyle? unselectedLabelStyle, - bool? showSelectedLabels, - bool? showUnselectedLabels, - bool? enableFeedback, - BottomNavigationBarLandscapeLayout? landscapeLayout}); -} - -/// @nodoc -class _$StacBottomNavigationBarCopyWithImpl<$Res> - implements $StacBottomNavigationBarCopyWith<$Res> { - _$StacBottomNavigationBarCopyWithImpl(this._self, this._then); - - final StacBottomNavigationBar _self; - final $Res Function(StacBottomNavigationBar) _then; - - /// Create a copy of StacBottomNavigationBar - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? items = null, - Object? elevation = freezed, - Object? bottomNavigationBarType = freezed, - Object? fixedColor = freezed, - Object? backgroundColor = freezed, - Object? iconSize = null, - Object? selectedItemColor = freezed, - Object? unselectedItemColor = freezed, - Object? selectedFontSize = null, - Object? unselectedFontSize = null, - Object? selectedLabelStyle = freezed, - Object? unselectedLabelStyle = freezed, - Object? showSelectedLabels = freezed, - Object? showUnselectedLabels = freezed, - Object? enableFeedback = freezed, - Object? landscapeLayout = freezed, - }) { - return _then(_self.copyWith( - items: null == items - ? _self.items - : items // ignore: cast_nullable_to_non_nullable - as List, - elevation: freezed == elevation - ? _self.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as StacDouble?, - bottomNavigationBarType: freezed == bottomNavigationBarType - ? _self.bottomNavigationBarType - : bottomNavigationBarType // ignore: cast_nullable_to_non_nullable - as BottomNavigationBarType?, - fixedColor: freezed == fixedColor - ? _self.fixedColor - : fixedColor // ignore: cast_nullable_to_non_nullable - as String?, - backgroundColor: freezed == backgroundColor - ? _self.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - iconSize: null == iconSize - ? _self.iconSize - : iconSize // ignore: cast_nullable_to_non_nullable - as StacDouble, - selectedItemColor: freezed == selectedItemColor - ? _self.selectedItemColor - : selectedItemColor // ignore: cast_nullable_to_non_nullable - as String?, - unselectedItemColor: freezed == unselectedItemColor - ? _self.unselectedItemColor - : unselectedItemColor // ignore: cast_nullable_to_non_nullable - as String?, - selectedFontSize: null == selectedFontSize - ? _self.selectedFontSize - : selectedFontSize // ignore: cast_nullable_to_non_nullable - as StacDouble, - unselectedFontSize: null == unselectedFontSize - ? _self.unselectedFontSize - : unselectedFontSize // ignore: cast_nullable_to_non_nullable - as StacDouble, - selectedLabelStyle: freezed == selectedLabelStyle - ? _self.selectedLabelStyle - : selectedLabelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - unselectedLabelStyle: freezed == unselectedLabelStyle - ? _self.unselectedLabelStyle - : unselectedLabelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - showSelectedLabels: freezed == showSelectedLabels - ? _self.showSelectedLabels - : showSelectedLabels // ignore: cast_nullable_to_non_nullable - as bool?, - showUnselectedLabels: freezed == showUnselectedLabels - ? _self.showUnselectedLabels - : showUnselectedLabels // ignore: cast_nullable_to_non_nullable - as bool?, - enableFeedback: freezed == enableFeedback - ? _self.enableFeedback - : enableFeedback // ignore: cast_nullable_to_non_nullable - as bool?, - landscapeLayout: freezed == landscapeLayout - ? _self.landscapeLayout - : landscapeLayout // ignore: cast_nullable_to_non_nullable - as BottomNavigationBarLandscapeLayout?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _StacBottomNavigationBar implements StacBottomNavigationBar { - const _StacBottomNavigationBar( - {required final List items, - this.elevation, - this.bottomNavigationBarType, - this.fixedColor, - this.backgroundColor, - this.iconSize = const StacDouble(24), - this.selectedItemColor, - this.unselectedItemColor, - this.selectedFontSize = const StacDouble(14.0), - this.unselectedFontSize = const StacDouble(12.0), - this.selectedLabelStyle, - this.unselectedLabelStyle, - this.showSelectedLabels, - this.showUnselectedLabels, - this.enableFeedback, - this.landscapeLayout}) - : _items = items; - factory _StacBottomNavigationBar.fromJson(Map json) => - _$StacBottomNavigationBarFromJson(json); - - final List _items; - @override - List get items { - if (_items is EqualUnmodifiableListView) return _items; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_items); - } - - @override - final StacDouble? elevation; - @override - final BottomNavigationBarType? bottomNavigationBarType; - @override - final String? fixedColor; - @override - final String? backgroundColor; - @override - @JsonKey() - final StacDouble iconSize; - @override - final String? selectedItemColor; - @override - final String? unselectedItemColor; - @override - @JsonKey() - final StacDouble selectedFontSize; - @override - @JsonKey() - final StacDouble unselectedFontSize; - @override - final StacTextStyle? selectedLabelStyle; - @override - final StacTextStyle? unselectedLabelStyle; - @override - final bool? showSelectedLabels; - @override - final bool? showUnselectedLabels; - @override - final bool? enableFeedback; - @override - final BottomNavigationBarLandscapeLayout? landscapeLayout; - - /// Create a copy of StacBottomNavigationBar - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$StacBottomNavigationBarCopyWith<_StacBottomNavigationBar> get copyWith => - __$StacBottomNavigationBarCopyWithImpl<_StacBottomNavigationBar>( - this, _$identity); - - @override - Map toJson() { - return _$StacBottomNavigationBarToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _StacBottomNavigationBar && - const DeepCollectionEquality().equals(other._items, _items) && - (identical(other.elevation, elevation) || - other.elevation == elevation) && - (identical( - other.bottomNavigationBarType, bottomNavigationBarType) || - other.bottomNavigationBarType == bottomNavigationBarType) && - (identical(other.fixedColor, fixedColor) || - other.fixedColor == fixedColor) && - (identical(other.backgroundColor, backgroundColor) || - other.backgroundColor == backgroundColor) && - (identical(other.iconSize, iconSize) || - other.iconSize == iconSize) && - (identical(other.selectedItemColor, selectedItemColor) || - other.selectedItemColor == selectedItemColor) && - (identical(other.unselectedItemColor, unselectedItemColor) || - other.unselectedItemColor == unselectedItemColor) && - (identical(other.selectedFontSize, selectedFontSize) || - other.selectedFontSize == selectedFontSize) && - (identical(other.unselectedFontSize, unselectedFontSize) || - other.unselectedFontSize == unselectedFontSize) && - (identical(other.selectedLabelStyle, selectedLabelStyle) || - other.selectedLabelStyle == selectedLabelStyle) && - (identical(other.unselectedLabelStyle, unselectedLabelStyle) || - other.unselectedLabelStyle == unselectedLabelStyle) && - (identical(other.showSelectedLabels, showSelectedLabels) || - other.showSelectedLabels == showSelectedLabels) && - (identical(other.showUnselectedLabels, showUnselectedLabels) || - other.showUnselectedLabels == showUnselectedLabels) && - (identical(other.enableFeedback, enableFeedback) || - other.enableFeedback == enableFeedback) && - (identical(other.landscapeLayout, landscapeLayout) || - other.landscapeLayout == landscapeLayout)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_items), - elevation, - bottomNavigationBarType, - fixedColor, - backgroundColor, - iconSize, - selectedItemColor, - unselectedItemColor, - selectedFontSize, - unselectedFontSize, - selectedLabelStyle, - unselectedLabelStyle, - showSelectedLabels, - showUnselectedLabels, - enableFeedback, - landscapeLayout); - - @override - String toString() { - return 'StacBottomNavigationBar(items: $items, elevation: $elevation, bottomNavigationBarType: $bottomNavigationBarType, fixedColor: $fixedColor, backgroundColor: $backgroundColor, iconSize: $iconSize, selectedItemColor: $selectedItemColor, unselectedItemColor: $unselectedItemColor, selectedFontSize: $selectedFontSize, unselectedFontSize: $unselectedFontSize, selectedLabelStyle: $selectedLabelStyle, unselectedLabelStyle: $unselectedLabelStyle, showSelectedLabels: $showSelectedLabels, showUnselectedLabels: $showUnselectedLabels, enableFeedback: $enableFeedback, landscapeLayout: $landscapeLayout)'; - } -} - -/// @nodoc -abstract mixin class _$StacBottomNavigationBarCopyWith<$Res> - implements $StacBottomNavigationBarCopyWith<$Res> { - factory _$StacBottomNavigationBarCopyWith(_StacBottomNavigationBar value, - $Res Function(_StacBottomNavigationBar) _then) = - __$StacBottomNavigationBarCopyWithImpl; - @override - @useResult - $Res call( - {List items, - StacDouble? elevation, - BottomNavigationBarType? bottomNavigationBarType, - String? fixedColor, - String? backgroundColor, - StacDouble iconSize, - String? selectedItemColor, - String? unselectedItemColor, - StacDouble selectedFontSize, - StacDouble unselectedFontSize, - StacTextStyle? selectedLabelStyle, - StacTextStyle? unselectedLabelStyle, - bool? showSelectedLabels, - bool? showUnselectedLabels, - bool? enableFeedback, - BottomNavigationBarLandscapeLayout? landscapeLayout}); -} - -/// @nodoc -class __$StacBottomNavigationBarCopyWithImpl<$Res> - implements _$StacBottomNavigationBarCopyWith<$Res> { - __$StacBottomNavigationBarCopyWithImpl(this._self, this._then); - - final _StacBottomNavigationBar _self; - final $Res Function(_StacBottomNavigationBar) _then; - - /// Create a copy of StacBottomNavigationBar - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? items = null, - Object? elevation = freezed, - Object? bottomNavigationBarType = freezed, - Object? fixedColor = freezed, - Object? backgroundColor = freezed, - Object? iconSize = null, - Object? selectedItemColor = freezed, - Object? unselectedItemColor = freezed, - Object? selectedFontSize = null, - Object? unselectedFontSize = null, - Object? selectedLabelStyle = freezed, - Object? unselectedLabelStyle = freezed, - Object? showSelectedLabels = freezed, - Object? showUnselectedLabels = freezed, - Object? enableFeedback = freezed, - Object? landscapeLayout = freezed, - }) { - return _then(_StacBottomNavigationBar( - items: null == items - ? _self._items - : items // ignore: cast_nullable_to_non_nullable - as List, - elevation: freezed == elevation - ? _self.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as StacDouble?, - bottomNavigationBarType: freezed == bottomNavigationBarType - ? _self.bottomNavigationBarType - : bottomNavigationBarType // ignore: cast_nullable_to_non_nullable - as BottomNavigationBarType?, - fixedColor: freezed == fixedColor - ? _self.fixedColor - : fixedColor // ignore: cast_nullable_to_non_nullable - as String?, - backgroundColor: freezed == backgroundColor - ? _self.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - iconSize: null == iconSize - ? _self.iconSize - : iconSize // ignore: cast_nullable_to_non_nullable - as StacDouble, - selectedItemColor: freezed == selectedItemColor - ? _self.selectedItemColor - : selectedItemColor // ignore: cast_nullable_to_non_nullable - as String?, - unselectedItemColor: freezed == unselectedItemColor - ? _self.unselectedItemColor - : unselectedItemColor // ignore: cast_nullable_to_non_nullable - as String?, - selectedFontSize: null == selectedFontSize - ? _self.selectedFontSize - : selectedFontSize // ignore: cast_nullable_to_non_nullable - as StacDouble, - unselectedFontSize: null == unselectedFontSize - ? _self.unselectedFontSize - : unselectedFontSize // ignore: cast_nullable_to_non_nullable - as StacDouble, - selectedLabelStyle: freezed == selectedLabelStyle - ? _self.selectedLabelStyle - : selectedLabelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - unselectedLabelStyle: freezed == unselectedLabelStyle - ? _self.unselectedLabelStyle - : unselectedLabelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - showSelectedLabels: freezed == showSelectedLabels - ? _self.showSelectedLabels - : showSelectedLabels // ignore: cast_nullable_to_non_nullable - as bool?, - showUnselectedLabels: freezed == showUnselectedLabels - ? _self.showUnselectedLabels - : showUnselectedLabels // ignore: cast_nullable_to_non_nullable - as bool?, - enableFeedback: freezed == enableFeedback - ? _self.enableFeedback - : enableFeedback // ignore: cast_nullable_to_non_nullable - as bool?, - landscapeLayout: freezed == landscapeLayout - ? _self.landscapeLayout - : landscapeLayout // ignore: cast_nullable_to_non_nullable - as BottomNavigationBarLandscapeLayout?, - )); - } -} - -// dart format on diff --git a/packages/stac/lib/src/parsers/widgets/stac_bottom_navigation_bar/stac_bottom_navigation_bar.g.dart b/packages/stac/lib/src/parsers/widgets/stac_bottom_navigation_bar/stac_bottom_navigation_bar.g.dart deleted file mode 100644 index e998e6b5..00000000 --- a/packages/stac/lib/src/parsers/widgets/stac_bottom_navigation_bar/stac_bottom_navigation_bar.g.dart +++ /dev/null @@ -1,81 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'stac_bottom_navigation_bar.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_StacBottomNavigationBar _$StacBottomNavigationBarFromJson( - Map json) => - _StacBottomNavigationBar( - items: (json['items'] as List) - .map((e) => - StacBottomNavigationBarItem.fromJson(e as Map)) - .toList(), - elevation: json['elevation'] == null - ? null - : StacDouble.fromJson(json['elevation']), - bottomNavigationBarType: $enumDecodeNullable( - _$BottomNavigationBarTypeEnumMap, json['bottomNavigationBarType']), - fixedColor: json['fixedColor'] as String?, - backgroundColor: json['backgroundColor'] as String?, - iconSize: json['iconSize'] == null - ? const StacDouble(24) - : StacDouble.fromJson(json['iconSize']), - selectedItemColor: json['selectedItemColor'] as String?, - unselectedItemColor: json['unselectedItemColor'] as String?, - selectedFontSize: json['selectedFontSize'] == null - ? const StacDouble(14.0) - : StacDouble.fromJson(json['selectedFontSize']), - unselectedFontSize: json['unselectedFontSize'] == null - ? const StacDouble(12.0) - : StacDouble.fromJson(json['unselectedFontSize']), - selectedLabelStyle: json['selectedLabelStyle'] == null - ? null - : StacTextStyle.fromJson( - json['selectedLabelStyle'] as Map), - unselectedLabelStyle: json['unselectedLabelStyle'] == null - ? null - : StacTextStyle.fromJson( - json['unselectedLabelStyle'] as Map), - showSelectedLabels: json['showSelectedLabels'] as bool?, - showUnselectedLabels: json['showUnselectedLabels'] as bool?, - enableFeedback: json['enableFeedback'] as bool?, - landscapeLayout: $enumDecodeNullable( - _$BottomNavigationBarLandscapeLayoutEnumMap, json['landscapeLayout']), - ); - -Map _$StacBottomNavigationBarToJson( - _StacBottomNavigationBar instance) => - { - 'items': instance.items, - 'elevation': instance.elevation, - 'bottomNavigationBarType': - _$BottomNavigationBarTypeEnumMap[instance.bottomNavigationBarType], - 'fixedColor': instance.fixedColor, - 'backgroundColor': instance.backgroundColor, - 'iconSize': instance.iconSize, - 'selectedItemColor': instance.selectedItemColor, - 'unselectedItemColor': instance.unselectedItemColor, - 'selectedFontSize': instance.selectedFontSize, - 'unselectedFontSize': instance.unselectedFontSize, - 'selectedLabelStyle': instance.selectedLabelStyle, - 'unselectedLabelStyle': instance.unselectedLabelStyle, - 'showSelectedLabels': instance.showSelectedLabels, - 'showUnselectedLabels': instance.showUnselectedLabels, - 'enableFeedback': instance.enableFeedback, - 'landscapeLayout': - _$BottomNavigationBarLandscapeLayoutEnumMap[instance.landscapeLayout], - }; - -const _$BottomNavigationBarTypeEnumMap = { - BottomNavigationBarType.fixed: 'fixed', - BottomNavigationBarType.shifting: 'shifting', -}; - -const _$BottomNavigationBarLandscapeLayoutEnumMap = { - BottomNavigationBarLandscapeLayout.spread: 'spread', - BottomNavigationBarLandscapeLayout.centered: 'centered', - BottomNavigationBarLandscapeLayout.linear: 'linear', -}; diff --git a/packages/stac/lib/src/parsers/widgets/stac_edge_insets/stac_edge_insets.dart b/packages/stac/lib/src/parsers/widgets/stac_edge_insets/stac_edge_insets.dart deleted file mode 100644 index 379639c5..00000000 --- a/packages/stac/lib/src/parsers/widgets/stac_edge_insets/stac_edge_insets.dart +++ /dev/null @@ -1,48 +0,0 @@ -// import 'package:flutter/material.dart'; -// import 'package:freezed_annotation/freezed_annotation.dart'; -// import 'package:stac/src/parsers/widgets/stac_double/stac_double.dart'; - -// part 'stac_edge_insets.freezed.dart'; -// part 'stac_edge_insets.g.dart'; - -// @freezed -// abstract class StacEdgeInsets with _$StacEdgeInsets { -// const factory StacEdgeInsets({ -// StacDouble? left, -// StacDouble? top, -// StacDouble? right, -// StacDouble? bottom, -// }) = _StacEdgeInsets; - -// factory StacEdgeInsets.fromJson(dynamic json) => _fromJson(json); - -// static StacEdgeInsets _fromJson(dynamic json) { -// Map resultantJson; - -// if (json is num) { -// resultantJson = { -// "left": json, -// "top": json, -// "right": json, -// "bottom": json -// }; -// } else if (json is List && json.length == 4) { -// bool allElementsNum = json.every((element) => element is num); -// if (!allElementsNum) { -// throw ArgumentError('Invalid input format for StacEdgeInsets'); -// } -// resultantJson = { -// "left": json[0], -// "top": json[1], -// "right": json[2], -// "bottom": json[3] -// }; -// } else if (json is Map) { -// resultantJson = json; -// } else { -// throw ArgumentError('Invalid input format for StacEdgeInsets'); -// } - -// return _$StacEdgeInsetsFromJson(resultantJson); -// } -// } diff --git a/packages/stac/lib/src/parsers/widgets/stac_gradient/stac_gradient.dart b/packages/stac/lib/src/parsers/widgets/stac_gradient/stac_gradient.dart deleted file mode 100644 index 0094db70..00000000 --- a/packages/stac/lib/src/parsers/widgets/stac_gradient/stac_gradient.dart +++ /dev/null @@ -1,33 +0,0 @@ -// import 'dart:math' as math; - -// import 'package:flutter/material.dart'; -// import 'package:freezed_annotation/freezed_annotation.dart'; -// import 'package:stac/src/parsers/parsers.dart'; -// import 'package:stac/src/parsers/widgets/stac_double/stac_double.dart'; -// import 'package:stac/src/utils/color_utils.dart'; - -// part 'stac_gradient.freezed.dart'; -// part 'stac_gradient.g.dart'; - -// enum StacGradientType { linear, radial, sweep } - -// @freezed -// abstract class StacGradient with _$StacGradient { -// const factory StacGradient({ -// required List colors, -// List? stops, -// @Default(StacAlignment.centerLeft) StacAlignment begin, -// @Default(StacAlignment.centerRight) StacAlignment end, -// @Default(StacAlignment.center) StacAlignment center, -// @Default(StacGradientType.linear) StacGradientType gradientType, -// StacAlignmentGeometry? focal, -// @Default(TileMode.clamp) TileMode tileMode, -// @Default(StacDouble.zero) StacDouble focalRadius, -// @Default(StacDouble(0.5)) StacDouble radius, -// @Default(StacDouble.zero) StacDouble startAngle, -// @Default(StacDouble(math.pi * 2)) StacDouble endAngle, -// }) = _StacGradient; - -// factory StacGradient.fromJson(Map json) => -// _$StacGradientFromJson(json); -// } diff --git a/packages/stac/lib/src/parsers/widgets/stac_navigation_bar_item/stac_bottom_navigation_bar_item.freezed.dart b/packages/stac/lib/src/parsers/widgets/stac_navigation_bar_item/stac_bottom_navigation_bar_item.freezed.dart deleted file mode 100644 index b02f7fb9..00000000 --- a/packages/stac/lib/src/parsers/widgets/stac_navigation_bar_item/stac_bottom_navigation_bar_item.freezed.dart +++ /dev/null @@ -1,271 +0,0 @@ -// dart format width=80 -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'stac_bottom_navigation_bar_item.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -// dart format off -T _$identity(T value) => value; - -/// @nodoc -mixin _$StacBottomNavigationBarItem { - Map get icon; - String get label; - Map? get activeIcon; - String? get backgroundColor; - String? get tooltip; - - /// Create a copy of StacBottomNavigationBarItem - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $StacBottomNavigationBarItemCopyWith - get copyWith => _$StacBottomNavigationBarItemCopyWithImpl< - StacBottomNavigationBarItem>( - this as StacBottomNavigationBarItem, _$identity); - - /// Serializes this StacBottomNavigationBarItem to a JSON map. - Map toJson(); - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is StacBottomNavigationBarItem && - const DeepCollectionEquality().equals(other.icon, icon) && - (identical(other.label, label) || other.label == label) && - const DeepCollectionEquality() - .equals(other.activeIcon, activeIcon) && - (identical(other.backgroundColor, backgroundColor) || - other.backgroundColor == backgroundColor) && - (identical(other.tooltip, tooltip) || other.tooltip == tooltip)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(icon), - label, - const DeepCollectionEquality().hash(activeIcon), - backgroundColor, - tooltip); - - @override - String toString() { - return 'StacBottomNavigationBarItem(icon: $icon, label: $label, activeIcon: $activeIcon, backgroundColor: $backgroundColor, tooltip: $tooltip)'; - } -} - -/// @nodoc -abstract mixin class $StacBottomNavigationBarItemCopyWith<$Res> { - factory $StacBottomNavigationBarItemCopyWith( - StacBottomNavigationBarItem value, - $Res Function(StacBottomNavigationBarItem) _then) = - _$StacBottomNavigationBarItemCopyWithImpl; - @useResult - $Res call( - {Map icon, - String label, - Map? activeIcon, - String? backgroundColor, - String? tooltip}); -} - -/// @nodoc -class _$StacBottomNavigationBarItemCopyWithImpl<$Res> - implements $StacBottomNavigationBarItemCopyWith<$Res> { - _$StacBottomNavigationBarItemCopyWithImpl(this._self, this._then); - - final StacBottomNavigationBarItem _self; - final $Res Function(StacBottomNavigationBarItem) _then; - - /// Create a copy of StacBottomNavigationBarItem - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? icon = null, - Object? label = null, - Object? activeIcon = freezed, - Object? backgroundColor = freezed, - Object? tooltip = freezed, - }) { - return _then(_self.copyWith( - icon: null == icon - ? _self.icon - : icon // ignore: cast_nullable_to_non_nullable - as Map, - label: null == label - ? _self.label - : label // ignore: cast_nullable_to_non_nullable - as String, - activeIcon: freezed == activeIcon - ? _self.activeIcon - : activeIcon // ignore: cast_nullable_to_non_nullable - as Map?, - backgroundColor: freezed == backgroundColor - ? _self.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - tooltip: freezed == tooltip - ? _self.tooltip - : tooltip // ignore: cast_nullable_to_non_nullable - as String?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _StacBottomNavigationBarItem implements StacBottomNavigationBarItem { - const _StacBottomNavigationBarItem( - {required final Map icon, - required this.label, - final Map? activeIcon, - this.backgroundColor, - this.tooltip}) - : _icon = icon, - _activeIcon = activeIcon; - factory _StacBottomNavigationBarItem.fromJson(Map json) => - _$StacBottomNavigationBarItemFromJson(json); - - final Map _icon; - @override - Map get icon { - if (_icon is EqualUnmodifiableMapView) return _icon; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_icon); - } - - @override - final String label; - final Map? _activeIcon; - @override - Map? get activeIcon { - final value = _activeIcon; - if (value == null) return null; - if (_activeIcon is EqualUnmodifiableMapView) return _activeIcon; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - - @override - final String? backgroundColor; - @override - final String? tooltip; - - /// Create a copy of StacBottomNavigationBarItem - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$StacBottomNavigationBarItemCopyWith<_StacBottomNavigationBarItem> - get copyWith => __$StacBottomNavigationBarItemCopyWithImpl< - _StacBottomNavigationBarItem>(this, _$identity); - - @override - Map toJson() { - return _$StacBottomNavigationBarItemToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _StacBottomNavigationBarItem && - const DeepCollectionEquality().equals(other._icon, _icon) && - (identical(other.label, label) || other.label == label) && - const DeepCollectionEquality() - .equals(other._activeIcon, _activeIcon) && - (identical(other.backgroundColor, backgroundColor) || - other.backgroundColor == backgroundColor) && - (identical(other.tooltip, tooltip) || other.tooltip == tooltip)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_icon), - label, - const DeepCollectionEquality().hash(_activeIcon), - backgroundColor, - tooltip); - - @override - String toString() { - return 'StacBottomNavigationBarItem(icon: $icon, label: $label, activeIcon: $activeIcon, backgroundColor: $backgroundColor, tooltip: $tooltip)'; - } -} - -/// @nodoc -abstract mixin class _$StacBottomNavigationBarItemCopyWith<$Res> - implements $StacBottomNavigationBarItemCopyWith<$Res> { - factory _$StacBottomNavigationBarItemCopyWith( - _StacBottomNavigationBarItem value, - $Res Function(_StacBottomNavigationBarItem) _then) = - __$StacBottomNavigationBarItemCopyWithImpl; - @override - @useResult - $Res call( - {Map icon, - String label, - Map? activeIcon, - String? backgroundColor, - String? tooltip}); -} - -/// @nodoc -class __$StacBottomNavigationBarItemCopyWithImpl<$Res> - implements _$StacBottomNavigationBarItemCopyWith<$Res> { - __$StacBottomNavigationBarItemCopyWithImpl(this._self, this._then); - - final _StacBottomNavigationBarItem _self; - final $Res Function(_StacBottomNavigationBarItem) _then; - - /// Create a copy of StacBottomNavigationBarItem - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? icon = null, - Object? label = null, - Object? activeIcon = freezed, - Object? backgroundColor = freezed, - Object? tooltip = freezed, - }) { - return _then(_StacBottomNavigationBarItem( - icon: null == icon - ? _self._icon - : icon // ignore: cast_nullable_to_non_nullable - as Map, - label: null == label - ? _self.label - : label // ignore: cast_nullable_to_non_nullable - as String, - activeIcon: freezed == activeIcon - ? _self._activeIcon - : activeIcon // ignore: cast_nullable_to_non_nullable - as Map?, - backgroundColor: freezed == backgroundColor - ? _self.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - tooltip: freezed == tooltip - ? _self.tooltip - : tooltip // ignore: cast_nullable_to_non_nullable - as String?, - )); - } -} - -// dart format on diff --git a/packages/stac/lib/src/parsers/widgets/stac_navigation_bar_item/stac_bottom_navigation_bar_item.g.dart b/packages/stac/lib/src/parsers/widgets/stac_navigation_bar_item/stac_bottom_navigation_bar_item.g.dart deleted file mode 100644 index 58268d49..00000000 --- a/packages/stac/lib/src/parsers/widgets/stac_navigation_bar_item/stac_bottom_navigation_bar_item.g.dart +++ /dev/null @@ -1,27 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'stac_bottom_navigation_bar_item.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_StacBottomNavigationBarItem _$StacBottomNavigationBarItemFromJson( - Map json) => - _StacBottomNavigationBarItem( - icon: json['icon'] as Map, - label: json['label'] as String, - activeIcon: json['activeIcon'] as Map?, - backgroundColor: json['backgroundColor'] as String?, - tooltip: json['tooltip'] as String?, - ); - -Map _$StacBottomNavigationBarItemToJson( - _StacBottomNavigationBarItem instance) => - { - 'icon': instance.icon, - 'label': instance.label, - 'activeIcon': instance.activeIcon, - 'backgroundColor': instance.backgroundColor, - 'tooltip': instance.tooltip, - }; diff --git a/packages/stac/lib/src/parsers/widgets/stac_rect/stac_rect.dart b/packages/stac/lib/src/parsers/widgets/stac_rect/stac_rect.dart deleted file mode 100644 index 8b137891..00000000 --- a/packages/stac/lib/src/parsers/widgets/stac_rect/stac_rect.dart +++ /dev/null @@ -1 +0,0 @@ - diff --git a/packages/stac/lib/src/parsers/widgets/stac_text_style/stac_text_style.dart b/packages/stac/lib/src/parsers/widgets/stac_text_style/stac_text_style.dart deleted file mode 100644 index 5c528c35..00000000 --- a/packages/stac/lib/src/parsers/widgets/stac_text_style/stac_text_style.dart +++ /dev/null @@ -1,93 +0,0 @@ -// import 'package:flutter/material.dart'; -// import 'package:freezed_annotation/freezed_annotation.dart'; -// import 'package:stac/src/parsers/widgets/stac_double/stac_double.dart'; -// import 'package:stac/src/parsers/widgets/stac_font_weight/stac_font_weight.dart'; -// import 'package:stac/src/utils/color_utils.dart'; - -// part 'stac_text_style.freezed.dart'; -// part 'stac_text_style.g.dart'; - -// @freezed -// abstract class StacTextStyle with _$StacTextStyle { -// const factory StacTextStyle({ -// @Default(true) bool inherit, -// String? color, -// String? backgroundColor, -// String? styleFromTheme, -// StacDouble? fontSize, -// StacFontWeight? fontWeight, -// FontStyle? fontStyle, -// String? fontFamily, -// List? fontFamilyFallback, -// StacDouble? letterSpacing, -// StacDouble? wordSpacing, -// TextBaseline? textBaseline, -// StacDouble? height, -// }) = _StacTextStyle; - -// factory StacTextStyle.fromJson(dynamic json) => _fromJson(json); - -// static StacTextStyle _fromJson(dynamic json) { -// if (json is String) { -// return _$StacTextStyleFromJson({"styleFromTheme": json}); -// } else if (json is Map) { -// return _$StacTextStyleFromJson(json); -// } - -// return _$StacTextStyleFromJson({}); -// } -// } - -// extension StacTextStyleParser on StacTextStyle { -// TextStyle? parse(BuildContext context) { -// if (styleFromTheme != null) { -// switch (styleFromTheme) { -// case 'displayLarge': -// return Theme.of(context).textTheme.displayLarge; -// case 'displayMedium': -// return Theme.of(context).textTheme.displayMedium; -// case 'displaySmall': -// return Theme.of(context).textTheme.displaySmall; -// case 'headlineLarge': -// return Theme.of(context).textTheme.headlineLarge; -// case 'headlineMedium': -// return Theme.of(context).textTheme.headlineMedium; -// case 'headlineSmall': -// return Theme.of(context).textTheme.headlineSmall; -// case 'titleLarge': -// return Theme.of(context).textTheme.titleLarge; -// case 'titleMedium': -// return Theme.of(context).textTheme.titleMedium; -// case 'titleSmall': -// return Theme.of(context).textTheme.titleSmall; -// case 'bodyLarge': -// return Theme.of(context).textTheme.bodyLarge; -// case 'bodyMedium': -// return Theme.of(context).textTheme.bodyMedium; -// case 'bodySmall': -// return Theme.of(context).textTheme.bodySmall; -// case 'labelLarge': -// return Theme.of(context).textTheme.labelLarge; -// case 'labelMedium': -// return Theme.of(context).textTheme.labelMedium; -// case 'labelSmall': -// return Theme.of(context).textTheme.labelSmall; -// } -// } - -// return TextStyle( -// inherit: inherit, -// color: color?.toColor(context), -// backgroundColor: backgroundColor.toColor(context), -// fontSize: fontSize?.parse, -// fontWeight: fontWeight?.value, -// fontStyle: fontStyle, -// fontFamily: fontFamily, -// fontFamilyFallback: fontFamilyFallback, -// letterSpacing: letterSpacing?.parse, -// wordSpacing: wordSpacing?.parse, -// textBaseline: textBaseline, -// height: height?.parse, -// ); -// } -// } diff --git a/packages/stac/lib/src/parsers/widgets/widgets.dart b/packages/stac/lib/src/parsers/widgets/widgets.dart index ad6c1994..6ff2cc67 100644 --- a/packages/stac/lib/src/parsers/widgets/widgets.dart +++ b/packages/stac/lib/src/parsers/widgets/widgets.dart @@ -2,8 +2,6 @@ export 'package:stac/src/parsers/theme/stac_color_scheme/stac_color_scheme.dart' export 'package:stac/src/parsers/theme/stac_floating_action_button_theme_data/stac_floating_action_button_theme_data.dart'; export 'package:stac/src/parsers/widgets/stac_alert_dialog/stac_alert_dialog_parser.dart'; export 'package:stac/src/parsers/widgets/stac_align/stac_align.dart'; -export 'package:stac/src/parsers/widgets/stac_alignment/stac_alignment.dart'; -export 'package:stac/src/parsers/widgets/stac_alignment_directional/stac_alignment_directional.dart'; export 'package:stac/src/parsers/widgets/stac_aspect_ratio/stac_aspect_ratio_parser.dart'; export 'package:stac/src/parsers/widgets/stac_auto_complete/stac_auto_complete_parser.dart'; export 'package:stac/src/parsers/widgets/stac_backdrop_filter/stac_backdrop_filter_parser.dart'; @@ -29,7 +27,6 @@ export 'package:stac/src/parsers/widgets/stac_divider/stac_divider_parser.dart'; export 'package:stac/src/parsers/widgets/stac_drawer/stac_drawer_parser.dart'; export 'package:stac/src/parsers/widgets/stac_dropdown_menu/stac_dropdown_menu_parser.dart'; export 'package:stac/src/parsers/widgets/stac_dynamic_view/stac_dynamic_view_parser.dart'; -export 'package:stac/src/parsers/widgets/stac_edge_insets/stac_edge_insets.dart'; export 'package:stac/src/parsers/widgets/stac_elevated_button/stac_elevated_button_parser.dart'; export 'package:stac/src/parsers/widgets/stac_expanded/stac_expanded_parser.dart'; export 'package:stac/src/parsers/widgets/stac_filled_button/stac_filled_button_parser.dart'; @@ -41,7 +38,6 @@ export 'package:stac/src/parsers/widgets/stac_form/stac_form_parser.dart'; export 'package:stac/src/parsers/widgets/stac_form/stac_form_scope.dart'; export 'package:stac/src/parsers/widgets/stac_fractionally_sized_box/stac_fractionally_sized_box_parser.dart'; export 'package:stac/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector_parser.dart'; -export 'package:stac/src/parsers/widgets/stac_gradient/stac_gradient.dart'; export 'package:stac/src/parsers/widgets/stac_grid_view/stac_grid_view_parser.dart'; export 'package:stac/src/parsers/widgets/stac_hero/stac_hero_parser.dart'; export 'package:stac/src/parsers/widgets/stac_icon/stac_icon_parser.dart'; @@ -79,7 +75,6 @@ export 'package:stac/src/parsers/widgets/stac_table_cell/stac_table_cell_parser. export 'package:stac/src/parsers/widgets/stac_text_button/stac_text_button_parser.dart'; export 'package:stac/src/parsers/widgets/stac_text_field/stac_text_field_parser.dart'; export 'package:stac/src/parsers/widgets/stac_text_form_field/stac_text_form_field_parser.dart'; -export 'package:stac/src/parsers/widgets/stac_text_style/stac_text_style.dart'; export 'package:stac/src/parsers/widgets/stac_vertical_divider/stac_vertical_divider_parser.dart'; export 'package:stac/src/parsers/widgets/stac_visibility/stac_visibility_parser.dart'; export 'package:stac/src/parsers/widgets/stac_wrap/stac_wrap_parser.dart'; diff --git a/packages/stac/pubspec.yaml b/packages/stac/pubspec.yaml index e5a910dc..a3c4d9d8 100644 --- a/packages/stac/pubspec.yaml +++ b/packages/stac/pubspec.yaml @@ -1,7 +1,8 @@ name: stac description: Stac is a Server-Driven UI (SDUI) framework for Flutter. Stac allows you to build beautiful cross-platform applications with JSON in real time. -version: 1.0.0-dev.6 -homepage: https://github.com/StacDev/stac +version: 1.0.0-dev.7 +repository: https://github.com/StacDev/stac +homepage: https://stac.dev/ environment: sdk: ">=3.0.0 <4.0.0" @@ -20,11 +21,11 @@ dependencies: json_annotation: ^4.9.0 logger: ^2.5.0 dio: ^5.8.0+1 - stac_framework: ^0.3.0 + stac_framework: ^0.4.0 cached_network_image: ^3.4.1 flutter_svg: ^2.1.0 - stac_logger: ^1.0.0 - stac_core: + stac_logger: ^1.1.0 + stac_core: ^0.2.0 dev_dependencies: flutter_test: