diff --git a/example/lib/widgets/widget_text_title1.dart b/example/lib/widgets/widget_text_title1.dart index d7dafc90..77ab7314 100644 --- a/example/lib/widgets/widget_text_title1.dart +++ b/example/lib/widgets/widget_text_title1.dart @@ -27,4 +27,4 @@ class WidgetTextTitle1 extends StatelessWidget { ), ); } -} \ No newline at end of file +} diff --git a/lib/src/selectors/date_picker.dart b/lib/src/selectors/date_picker.dart index a3e20fc0..2b3cd9b0 100644 --- a/lib/src/selectors/date_picker.dart +++ b/lib/src/selectors/date_picker.dart @@ -107,9 +107,9 @@ class MacosDatePicker extends StatefulWidget { /// Allows for changing the order of day headers in the graphical Date Picker /// to Mo, Tu, We, Th, Fr, Sa, Su. - /// + /// /// This is useful for internationalization purposes, as many countries begin their weeks on Mondays. - /// + /// /// Defaults to `false`. final bool? startWeekOnMonday; diff --git a/lib/src/theme/macos_theme.dart b/lib/src/theme/macos_theme.dart index 6de99369..0cae2b9a 100644 --- a/lib/src/theme/macos_theme.dart +++ b/lib/src/theme/macos_theme.dart @@ -224,9 +224,8 @@ class MacosThemeData with Diagnosticable { ); pushButtonTheme ??= PushButtonThemeData( color: primaryColor, - secondaryColor: isDark - ? const Color.fromRGBO(110, 109, 112, 1.0) - : MacosColors.white, + secondaryColor: + isDark ? const Color.fromRGBO(110, 109, 112, 1.0) : MacosColors.white, disabledColor: isDark ? const Color.fromRGBO(255, 255, 255, 0.1) : const Color.fromRGBO(244, 245, 245, 1.0), diff --git a/test/selectors/date_picker_test.dart b/test/selectors/date_picker_test.dart index e5f4f495..f0996546 100644 --- a/test/selectors/date_picker_test.dart +++ b/test/selectors/date_picker_test.dart @@ -84,30 +84,32 @@ void main() { testWidgets( 'Textual MacosDatePicker renders the date with respect to "dateFormat" property', - (tester) async { + (tester) async { renderWidget(String dateFormat) => MacosApp( - home: MacosWindow( - disableWallpaperTinting: true, - child: MacosScaffold( - children: [ - ContentArea( - builder: (context, _) { - return Center( - child: MacosDatePicker( - initialDate: DateTime.parse('2023-04-01'), - onDateChanged: (date) {}, - dateFormat: dateFormat, - style: DatePickerStyle.textual, - ), - ); - }, + home: MacosWindow( + disableWallpaperTinting: true, + child: MacosScaffold( + children: [ + ContentArea( + builder: (context, _) { + return Center( + child: MacosDatePicker( + initialDate: DateTime.parse('2023-04-01'), + onDateChanged: (date) {}, + dateFormat: dateFormat, + style: DatePickerStyle.textual, + ), + ); + }, + ), + ], ), - ], - ), - ), - ); + ), + ); - getNthTextFromWidget(int index) => (find.byType(Text).at(index).evaluate().first.widget as Text).data as String; + getNthTextFromWidget(int index) => + (find.byType(Text).at(index).evaluate().first.widget as Text).data + as String; await tester.pumpWidget(renderWidget('dd.mm.yyyy')); String firstDateElement = getNthTextFromWidget(0); @@ -363,7 +365,7 @@ void main() { testWidgets( 'Graphical MacosDatePicker renders abbreviations based on "weekdayAbbreviations" and "monthAbbreviations" properties', - (tester) async { + (tester) async { await tester.pumpWidget( MacosApp( home: MacosWindow( @@ -424,7 +426,7 @@ void main() { testWidgets( 'Graphical MacosDatePicker with "startWeekOnMonday" set to true shows Monday as the first day of the week', - (tester) async { + (tester) async { await tester.pumpWidget( MacosApp( home: MacosWindow( @@ -453,7 +455,8 @@ void main() { matching: find.byType(Text), ); final firstWeekday = dayHeaders.first; - final firstWeekdayText = (firstWeekday.evaluate().first.widget as Text).data; + final firstWeekdayText = + (firstWeekday.evaluate().first.widget as Text).data; await tester.pumpAndSettle(); expect(firstWeekdayText, 'Mo'); @@ -474,7 +477,7 @@ void main() { // TODO: remove this once the issue is fixed and test starts failing testWidgets( 'Graphical MacosDatePicker still needs "startWeekOnMonday" to show Monday as the first day of the week, even when the locale is set to something other than "en_US"', - (tester) async { + (tester) async { await tester.pumpWidget( MacosApp( supportedLocales: const [ @@ -506,7 +509,8 @@ void main() { matching: find.byType(Text), ); final firstWeekday = dayHeaders.first; - final firstWeekdayText = (firstWeekday.evaluate().first.widget as Text).data; + final firstWeekdayText = + (firstWeekday.evaluate().first.widget as Text).data; await tester.pumpAndSettle(); // The result will be 'Tu' if the fix is no longer needed and can be removed