diff --git a/example/lib/src/storybook/stories/composites/combobox_multi_select.dart b/example/lib/src/storybook/stories/composites/combobox_multi_select.dart index 67e9cccf..cb2e6cc3 100644 --- a/example/lib/src/storybook/stories/composites/combobox_multi_select.dart +++ b/example/lib/src/storybook/stories/composites/combobox_multi_select.dart @@ -226,7 +226,6 @@ class _ComboboxMultiSelectStoryState extends State { ? Center( child: MoonTag( tagSize: MoonTagSize.xs, - isUpperCase: false, backgroundColor: context.moonColors!.bulma, onTap: () => setState(() => _selectedOptions.clear()), label: Text( diff --git a/example/lib/src/storybook/stories/primitives/dropdown.dart b/example/lib/src/storybook/stories/primitives/dropdown.dart index c93b4536..8abb6f70 100644 --- a/example/lib/src/storybook/stories/primitives/dropdown.dart +++ b/example/lib/src/storybook/stories/primitives/dropdown.dart @@ -195,7 +195,6 @@ class _DropdownStoryState extends State { ? Center( child: MoonTag( tagSize: MoonTagSize.xs, - isUpperCase: false, backgroundColor: context.moonColors!.bulma, onTap: () => setState(() => _availableChoices.updateAll((key, value) => false)), label: Text( diff --git a/example/lib/src/storybook/stories/primitives/tag.dart b/example/lib/src/storybook/stories/primitives/tag.dart index 324d85c6..48ae79b3 100644 --- a/example/lib/src/storybook/stories/primitives/tag.dart +++ b/example/lib/src/storybook/stories/primitives/tag.dart @@ -85,11 +85,6 @@ class TagStory extends StatelessWidget { initial: true, ); - final setUpperCaseKnob = context.knobs.boolean( - label: "isUpperCase", - description: "Use upper case text for MoonTag.", - ); - return Center( child: SingleChildScrollView( padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0), @@ -97,7 +92,6 @@ class TagStory extends StatelessWidget { borderRadius: borderRadiusKnob != null ? BorderRadius.circular(borderRadiusKnob.toDouble()) : null, onTap: () {}, tagSize: tagSizeKnob, - isUpperCase: setUpperCaseKnob, backgroundColor: backgroundColor, leading: showLeadingKnob ? Icon( @@ -107,7 +101,7 @@ class TagStory extends StatelessWidget { : null, label: showLabelKnob ? Text( - setUpperCaseKnob ? customLabelTextKnob.toUpperCase() : customLabelTextKnob, + customLabelTextKnob, style: TextStyle(color: textColor), ) : null, diff --git a/lib/src/theme/tag/tag_size_properties.dart b/lib/src/theme/tag/tag_size_properties.dart index 460ca6e0..298d3203 100644 --- a/lib/src/theme/tag/tag_size_properties.dart +++ b/lib/src/theme/tag/tag_size_properties.dart @@ -59,6 +59,7 @@ class MoonTagSizeProperties extends ThemeExtension with D iconSizeValue: iconSizeValue ?? this.iconSizeValue, padding: padding ?? this.padding, textStyle: textStyle ?? this.textStyle, + // ignore: deprecated_member_use_from_same_package upperCaseTextStyle: upperCaseTextStyle ?? this.upperCaseTextStyle, ); } @@ -74,6 +75,7 @@ class MoonTagSizeProperties extends ThemeExtension with D iconSizeValue: lerpDouble(iconSizeValue, other.iconSizeValue, t)!, padding: EdgeInsetsGeometry.lerp(padding, other.padding, t)!, textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!, + // ignore: deprecated_member_use_from_same_package upperCaseTextStyle: TextStyle.lerp(upperCaseTextStyle, other.upperCaseTextStyle, t)!, ); } @@ -89,6 +91,7 @@ class MoonTagSizeProperties extends ThemeExtension with D ..add(DoubleProperty("iconSizeValue", iconSizeValue)) ..add(DiagnosticsProperty("padding", padding)) ..add(DiagnosticsProperty("textStyle", textStyle)) + // ignore: deprecated_member_use_from_same_package ..add(DiagnosticsProperty("upperCaseTextStyle", upperCaseTextStyle)); } } diff --git a/lib/src/widgets/tag/tag.dart b/lib/src/widgets/tag/tag.dart index fcd2bc7f..18b4c8fc 100644 --- a/lib/src/widgets/tag/tag.dart +++ b/lib/src/widgets/tag/tag.dart @@ -70,7 +70,7 @@ class MoonTag extends StatelessWidget { @Deprecated( "Handle upper case text style properly at place of usage. This property will be removed in 1.0.0 release.", ) - this.isUpperCase = true, + this.isUpperCase = false, this.borderRadius, this.backgroundColor, this.height, @@ -153,7 +153,9 @@ class MoonTag extends StatelessWidget { size: effectiveMoonTagSize.iconSizeValue, ), child: DefaultTextStyle( + // ignore: deprecated_member_use_from_same_package style: isUpperCase + // ignore: deprecated_member_use_from_same_package ? effectiveMoonTagSize.upperCaseTextStyle.copyWith(color: effectiveTextColor) : effectiveMoonTagSize.textStyle.copyWith(color: effectiveTextColor), child: Row(