Skip to content

Commit de31bfe

Browse files
Version 2.0.7 (#511)
* Update radio_button.dart * Update CHANGELOG.md * remove default themes from example app * add accent color and main window support to `MacosThemeData` * regenerate macOS theme on window state and accent color changes * export accent color enum * retrieve accent color from theme in push button * retrieve accent color from theme in sidebar items * add disabled checkbox to buttons page in example * style the `MacosCheckbox` to be match the native checkboxes better * add `example/devtools_options.yaml` to `.gitignore` * bump version to 2.0.7 * organize imports * add changelog entry for version 2.0.7 * fix typo * fix typo * remove `print` call * remove unnecessary imports * change colors in unit tests --------- Co-authored-by: Abbas Hussein <[email protected]>
1 parent 37c95be commit de31bfe

15 files changed

+706
-152
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,4 @@ metrics
8181
coverage_report
8282
coverage
8383
example/macos/Flutter/GeneratedPluginRegistrant.swift
84+
example/devtools_options.yaml

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [2.0.7]
2+
### 🛠️ Updated 🛠️
3+
* Made most widgets aware of the user’s accent color and window state by adding respective fields to `MacosThemeData`.
4+
* `MacosCheckbox` has received a facelift to mimic the look and feel of native macOS checkboxes better.
5+
16
## [2.0.6]
27
### 🛠️ Updated 🛠️
38
* Implemented value equality for `MacosThemeData`.

example/lib/main.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ class MacosUIGalleryApp extends StatelessWidget {
4747
final appTheme = context.watch<AppTheme>();
4848
return MacosApp(
4949
title: 'macos_ui Widget Gallery',
50-
theme: MacosThemeData.light(),
51-
darkTheme: MacosThemeData.dark(),
5250
themeMode: appTheme.mode,
5351
debugShowCheckedModeBanner: false,
5452
home: const WidgetGallery(),

example/lib/pages/buttons_page.dart

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -558,11 +558,20 @@ class _ButtonsPageState extends State<ButtonsPage> {
558558
const SizedBox(height: 16),
559559
const WidgetTextTitle2(widgetName: 'MacosCheckbox'),
560560
const SizedBox(height: 8),
561-
MacosCheckbox(
562-
value: switchValue,
563-
onChanged: (value) {
564-
setState(() => switchValue = value);
565-
},
561+
Row(
562+
children: [
563+
MacosCheckbox(
564+
value: switchValue,
565+
onChanged: (value) {
566+
setState(() => switchValue = value);
567+
},
568+
),
569+
const SizedBox(width: 8),
570+
MacosCheckbox(
571+
value: switchValue,
572+
onChanged: null,
573+
),
574+
],
566575
),
567576
const SizedBox(height: 16),
568577
const WidgetTextTitle2(widgetName: 'MacosRadioButton'),

lib/macos_ui.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,4 @@ export 'src/theme/search_field_theme.dart';
8888
export 'src/theme/time_picker_theme.dart';
8989
export 'src/theme/tooltip_theme.dart';
9090
export 'src/theme/typography.dart';
91+
export 'src/enums/accent_color.dart';

0 commit comments

Comments
 (0)