diff --git a/forui/lib/src/theme/theme_data.dart b/forui/lib/src/theme/theme_data.dart index b123de18f..d6970382f 100644 --- a/forui/lib/src/theme/theme_data.dart +++ b/forui/lib/src/theme/theme_data.dart @@ -25,6 +25,9 @@ class FThemeData with Diagnosticable { /// The header styles. final FHeaderStyle headerStyle; + /// The text field style. + final FTextFieldStyle textFieldStyle; + /// The box style. final FBoxStyle boxStyle; @@ -34,9 +37,6 @@ class FThemeData with Diagnosticable { /// The switch style. final FSwitchStyle switchStyle; - /// The text field style. - final FTextFieldStyle textFieldStyle; - /// Creates a [FThemeData]. FThemeData({ required this.colorScheme, @@ -46,10 +46,10 @@ class FThemeData with Diagnosticable { required this.buttonStyles, required this.cardStyle, required this.headerStyle, + required this.textFieldStyle, required this.boxStyle, required this.separatorStyles, required this.switchStyle, - required this.textFieldStyle, }); /// Creates a [FThemeData] that inherits the given properties. @@ -65,10 +65,10 @@ class FThemeData with Diagnosticable { ), cardStyle = FCardStyle.inherit(colorScheme: colorScheme, font: font, style: style), headerStyle = FHeaderStyle.inherit(colorScheme: colorScheme, font: font), + textFieldStyle = FTextFieldStyle.inherit(colorScheme: colorScheme, font: font, style: style), boxStyle = FBoxStyle.inherit(colorScheme: colorScheme), separatorStyles = FSeparatorStyles.inherit(colorScheme: colorScheme, style: style), - switchStyle = FSwitchStyle.inherit(colorScheme: colorScheme), - textFieldStyle = FTextFieldStyle.inherit(colorScheme: colorScheme, font: font, style: style); + switchStyle = FSwitchStyle.inherit(colorScheme: colorScheme); /// Creates a copy of this [FThemeData] with the given properties replaced. FThemeData copyWith({ @@ -79,10 +79,10 @@ class FThemeData with Diagnosticable { FButtonStyles? buttonStyles, FCardStyle? cardStyle, FHeaderStyle? headerStyle, + FTextFieldStyle? textFieldStyle, FBoxStyle? boxStyle, FSeparatorStyles? separatorStyles, FSwitchStyle? switchStyle, - FTextFieldStyle? textFieldStyle, }) => FThemeData( colorScheme: colorScheme ?? this.colorScheme, @@ -92,10 +92,10 @@ class FThemeData with Diagnosticable { buttonStyles: buttonStyles ?? this.buttonStyles, cardStyle: cardStyle ?? this.cardStyle, headerStyle: headerStyle ?? this.headerStyle, + textFieldStyle: textFieldStyle ?? this.textFieldStyle, boxStyle: boxStyle ?? this.boxStyle, separatorStyles: separatorStyles ?? this.separatorStyles, switchStyle: switchStyle ?? this.switchStyle, - textFieldStyle: textFieldStyle ?? this.textFieldStyle, ); @override @@ -109,10 +109,10 @@ class FThemeData with Diagnosticable { ..add(DiagnosticsProperty('buttonStyles', buttonStyles, level: DiagnosticLevel.debug)) ..add(DiagnosticsProperty('cardStyle', cardStyle, level: DiagnosticLevel.debug)) ..add(DiagnosticsProperty('headerStyle', headerStyle, level: DiagnosticLevel.debug)) + ..add(DiagnosticsProperty('textFieldStyle', textFieldStyle, level: DiagnosticLevel.debug)) ..add(DiagnosticsProperty('boxStyle', boxStyle, level: DiagnosticLevel.debug)) ..add(DiagnosticsProperty('separatorStyles', separatorStyles, level: DiagnosticLevel.debug)) - ..add(DiagnosticsProperty('switchStyle', switchStyle, level: DiagnosticLevel.debug)) - ..add(DiagnosticsProperty('textFieldStyle', textFieldStyle, level: DiagnosticLevel.debug)); + ..add(DiagnosticsProperty('switchStyle', switchStyle, level: DiagnosticLevel.debug)); } @override @@ -127,10 +127,10 @@ class FThemeData with Diagnosticable { buttonStyles == other.buttonStyles && cardStyle == other.cardStyle && headerStyle == other.headerStyle && + textFieldStyle == other.textFieldStyle && boxStyle == other.boxStyle && separatorStyles == other.separatorStyles && - switchStyle == other.switchStyle && - textFieldStyle == other.textFieldStyle; + switchStyle == other.switchStyle; @override int get hashCode => @@ -141,8 +141,8 @@ class FThemeData with Diagnosticable { buttonStyles.hashCode ^ cardStyle.hashCode ^ headerStyle.hashCode ^ + textFieldStyle.hashCode ^ boxStyle.hashCode ^ separatorStyles.hashCode ^ - switchStyle.hashCode ^ - textFieldStyle.hashCode; + switchStyle.hashCode; } diff --git a/forui/test/src/widgets/text_field/flutter_test_config.dart b/forui/test/src/widgets/text_field/flutter_test_config.dart index a29864de6..69418f0ba 100644 --- a/forui/test/src/widgets/text_field/flutter_test_config.dart +++ b/forui/test/src/widgets/text_field/flutter_test_config.dart @@ -7,4 +7,4 @@ const _kGoldenTestsThreshold = 4 / 100; Future testExecutable(FutureOr Function() testMain) async { await configureGoldenTests(_kGoldenTestsThreshold); await testMain(); -} \ No newline at end of file +}