Repository: macosui/macos_ui

Issue:
MacosPopupButton - ScrollController not attached to any scroll views
When I click on MacosPopupButton, I am getting the following exception:

Unhandled Exception: 'package:flutter/src/widgets/scroll_controller.dart': Failed assertion: line 151 pos 12: '_positions.isNotEmpty': ScrollController not attached to any scroll views.

macos_ui: ^1.7.5

<details>
<summary>Code</summary>

```dart
MacosScaffold(
      toolBar: ToolBar(
        title: const Text('Dependencies'),
        actions: [
          ToolBarIconButton(
            label: 'Toggle Sidebar',
            icon: const MacosIcon(CupertinoIcons.sidebar_left),
            showLabel: false,
            tooltipMessage: 'Toggle Sidebar',
            onPressed: () {
              MacosWindowScope.of(context).toggleSidebar();
            },
          )
        ],
      ),
      children: [
        ContentArea(
          builder: (context, scrollController) {
            return SingleChildScrollView(
              padding: const EdgeInsets.all(16.0),
              child: Column(
                children: [
                  Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      MacosPopupButton<String>(
                        value: 'One',
                        onChanged: (String? newValue) {},
                        items: <String>[
                          'One',
                          'Two',
                          'Three',
                          'Four'
                        ].map<MacosPopupMenuItem<String>>((String value) {
                          return MacosPopupMenuItem<String>(
                            value: value,
                            child: Text(value),
                          );
                        }).toList(),
                      ),
                      const SizedBox(width: 20),
                      MacosPopupButton<String>(
                        disabledHint: const Text("Disabled"),
                        onChanged: null,
                        items: null,
                      ),
                    ],
                  ),
                ],
              ),
            );
          },
        ),
      ],
    );
```

</details>

**Logs**
```
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:flutter/src/widgets/scroll_controller.dart': Failed assertion: line 151 pos 12: '_positions.isNotEmpty': ScrollController not attached to any scroll views.
package:flutter/…/widgets/scroll_controller.dart:151
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2      ScrollController.animateTo
package:flutter/…/widgets/scroll_controller.dart:151
#3      _MacosPopupMenuItemButtonState._handleFocusChange
package:macos_ui/…/buttons/popup_button.dart:57
#4      _FocusState._handleFocusChanged
package:flutter/…/widgets/focus_scope.dart:632
#5      ChangeNotifier.notifyListeners
package:flutter/…/foundation/change_notifier.dart:351
#6      FocusNode._notify
package:flutter/…/widgets/focus_manager.dart:1038
#7      FocusManager._applyFocusChange
package:flutter/…/widgets/focus_manager.dart:1804
#8      _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#9      _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
```
Incorrect rendering of titlebar in full screen mode
**Description**

The demo app, when switched to Full Screen Mode, displays an empty titlebar. See the screenshot attached.

**Steps To Reproduce**

1. Compile the demo.
2. Launch the demo.
3. Enter the full screen mode.

**Expected behavior**

The upper part of the sidebar and the upper part of the main pane should still be visible.

**Screenshots**

<img width="1280" alt="Capture d’écran 2022-05-13 à 12 45 05" src="https://user-images.githubusercontent.com/75051/168219096-8015b9dd-8d62-41af-b215-799f8e798fbb.png">

Typo in relevance_indicator parameter (unselectedolor)
Sorry for raising this and not fixing it. If no one gets to it I will sort it when I get a chance. I wouldn't normally raise it by m VS Code spell check is triggering my OCD ;) 

`unselectedolor` should be `unselectedColor`

`macos_ui: ^1.5.1`

https://github.com/GroovinChip/macos_ui/blob/dev/lib/src/indicators/relevance_indicator.dart#L23



Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 23d127fb..06984cb8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,8 @@
+## [1.7.6]
+* Fixed a bug where `MacosPopupButton` would report that a `ScrollController` was not attached to any views
+
 ## [1.7.5]
-* Address Flutter 3.3 analyzer warnings
+* Addressed Flutter 3.3 analyzer warnings
 
 ## [1.7.4]
 * Added `backgroundColor` to `MacosSheet`
@@ -8,7 +11,7 @@
 * Fixed an issue where the `title` property of `TitleBar` did not apply a fitting `DefaultTextStyle`
 
 ## [1.7.2]
-* Add padding as parameter to MacosTabView constructor.
+* Added padding as parameter to MacosTabView constructor.
 
 ## [1.7.1]
 * Fixed an issue where end sidebar window breakpoints were not respected
diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock
index bf38dd65..5bd494b2 100644
--- a/example/macos/Podfile.lock
+++ b/example/macos/Podfile.lock
@@ -14,7 +14,7 @@ EXTERNAL SOURCES:
     :path: Flutter/ephemeral/.symlinks/plugins/macos_ui/macos
 
 SPEC CHECKSUMS:
-  FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
+  FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
   macos_ui: 125c911559d646194386d84c017ad6819122e2db
 
 PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
diff --git a/example/pubspec.lock b/example/pubspec.lock
index 1366ce97..89ae8821 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -80,7 +80,7 @@ packages:
       path: ".."
       relative: true
     source: path
-    version: "1.7.5"
+    version: "1.7.6"
   matcher:
     dependency: transitive
     description:
diff --git a/lib/src/buttons/popup_button.dart b/lib/src/buttons/popup_button.dart
index e0d8979c..481a25fe 100644
--- a/lib/src/buttons/popup_button.dart
+++ b/lib/src/buttons/popup_button.dart
@@ -222,6 +222,7 @@ class _MacosPopupMenuState<T> extends State<_MacosPopupMenu<T>> {
         brightness.resolve(CupertinoColors.black, CupertinoColors.white);
 
     final itemsList = ListView.builder(
+      controller: widget.route.scrollController,
       itemCount: children.length,
       itemBuilder: (context, index) {
         return children[index];
diff --git a/pubspec.yaml b/pubspec.yaml
index 321dc5e3..12962428 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
 name: macos_ui
 description: Flutter widgets and themes implementing the current macOS design language.
-version: 1.7.5
+version: 1.7.6
 homepage: "https://macosui.dev"
 repository: "https://github.com/GroovinChip/macos_ui"
 


Test patch:
diff --git a/test/selectors/date_picker_test.dart b/test/selectors/date_picker_test.dart
index 18e10768..77a96af8 100644
--- a/test/selectors/date_picker_test.dart
+++ b/test/selectors/date_picker_test.dart
@@ -217,6 +217,7 @@ void main() {
       (tester) async {
         final today = DateTime.now();
         int selectedMonth = 0;
+        DateTime? selectedDate;
         await tester.pumpWidget(
           MacosApp(
             home: MacosWindow(
@@ -227,6 +228,7 @@ void main() {
                       return Center(
                         child: MacosDatePicker(
                           onDateChanged: (date) {
+                            selectedDate = date;
                             selectedMonth = date.month;
                           },
                         ),
@@ -243,13 +245,26 @@ void main() {
         final rightControl = find.byType(MacosIcon).last;
         await tester.tap(leftControl);
         await tester.pumpAndSettle();
-        expect(selectedMonth, today.month - 1);
+        final diff = today.difference(selectedDate!);
+
+        // Account for going from January to December
+        if (today.month == 1) {
+          expect(today.subtract(diff).month, 12);
+        } else {
+          expect(selectedMonth, today.month - 1);
+        }
         await tester.tap(rightControl);
         await tester.pumpAndSettle();
         expect(selectedMonth, today.month);
         await tester.tap(rightControl);
         await tester.pumpAndSettle();
-        expect(selectedMonth, today.month + 1);
+
+        // Account for going from December to January
+        if (today.month == 12) {
+          expect(today.add(diff).month, 1);
+        } else {
+          expect(selectedMonth, today.month + 1);
+        }
       },
     );
   });