Fix use of deprecated members in cocoon dashboard (#2110)

diff --git a/dashboard/lib/widgets/commit_author_avatar.dart b/dashboard/lib/widgets/commit_author_avatar.dart
index 36322df..0091fb2 100644
--- a/dashboard/lib/widgets/commit_author_avatar.dart
+++ b/dashboard/lib/widgets/commit_author_avatar.dart
@@ -29,7 +29,7 @@
     final ThemeData theme = Theme.of(context);
 
     final double hue = (360.0 * authorHash / (1 << 15)) % 360.0;
-    final double themeValue = HSVColor.fromColor(theme.backgroundColor).value;
+    final double themeValue = HSVColor.fromColor(theme.colorScheme.background).value;
     Color authorColor = HSVColor.fromAHSV(1.0, hue, 0.4, themeValue).toColor();
     if (theme.brightness == Brightness.dark) {
       authorColor = HSLColor.fromColor(authorColor).withLightness(.65).toColor();
diff --git a/dashboard/lib/widgets/commit_box.dart b/dashboard/lib/widgets/commit_box.dart
index b5a7ed6..075ec68 100644
--- a/dashboard/lib/widgets/commit_box.dart
+++ b/dashboard/lib/widgets/commit_box.dart
@@ -56,7 +56,7 @@
       ),
     );
 
-    Overlay.of(context)!.insert(_commitOverlay!);
+    Overlay.of(context).insert(_commitOverlay!);
   }
 
   void _closeOverlay() => _commitOverlay?.remove();
diff --git a/dashboard/lib/widgets/error_brook_watcher.dart b/dashboard/lib/widgets/error_brook_watcher.dart
index d335c3b..f1e94f1 100644
--- a/dashboard/lib/widgets/error_brook_watcher.dart
+++ b/dashboard/lib/widgets/error_brook_watcher.dart
@@ -63,7 +63,7 @@
     ScaffoldMessenger.of(context).showSnackBar(
       SnackBar(
         content: snackbarContent,
-        backgroundColor: Theme.of(context).errorColor,
+        backgroundColor: Theme.of(context).colorScheme.error,
         duration: ErrorBrookWatcher.errorSnackbarDuration,
       ),
     );
diff --git a/dashboard/lib/widgets/task_grid.dart b/dashboard/lib/widgets/task_grid.dart
index 2a95f72..69304e8 100644
--- a/dashboard/lib/widgets/task_grid.dart
+++ b/dashboard/lib/widgets/task_grid.dart
@@ -360,7 +360,7 @@
       _taskOverlay = OverlayEntry(
         builder: (BuildContext context) => TaskOverlayEntry(
           position: (this.context.findRenderObject() as RenderBox)
-              .localToGlobal(localPosition!, ancestor: Overlay.of(context)!.context.findRenderObject()),
+              .localToGlobal(localPosition!, ancestor: Overlay.of(context).context.findRenderObject()),
           task: task,
           showSnackBarCallback: ScaffoldMessenger.of(context).showSnackBar,
           closeCallback: _closeOverlay,
@@ -368,7 +368,7 @@
           commit: commit,
         ),
       );
-      Overlay.of(context)!.insert(_taskOverlay!);
+      Overlay.of(context).insert(_taskOverlay!);
     };
   }