rename dashboard drawer (#2313)
diff --git a/dashboard/lib/build_dashboard_page.dart b/dashboard/lib/build_dashboard_page.dart
index 53184a9..56fb3a0 100644
--- a/dashboard/lib/build_dashboard_page.dart
+++ b/dashboard/lib/build_dashboard_page.dart
@@ -8,8 +8,8 @@
import 'package:truncate/truncate.dart';
import 'package:url_launcher/url_launcher.dart';
+import 'dashboard_navigation_drawer.dart';
import 'logic/task_grid_filter.dart';
-import 'navigation_drawer.dart';
import 'service/cocoon.dart';
import 'state/build.dart';
import 'widgets/app_bar.dart';
@@ -434,7 +434,7 @@
],
),
),
- drawer: const NavigationDrawer(),
+ drawer: const DashboardNavigationDrawer(),
),
);
}
diff --git a/dashboard/lib/navigation_drawer.dart b/dashboard/lib/dashboard_navigation_drawer.dart
similarity index 91%
rename from dashboard/lib/navigation_drawer.dart
rename to dashboard/lib/dashboard_navigation_drawer.dart
index 9fd57ef..72bbbcb 100644
--- a/dashboard/lib/navigation_drawer.dart
+++ b/dashboard/lib/dashboard_navigation_drawer.dart
@@ -7,8 +7,8 @@
import 'logic/links.dart';
/// Sidebar for navigating the different pages of Cocoon.
-class NavigationDrawer extends StatelessWidget {
- const NavigationDrawer({super.key});
+class DashboardNavigationDrawer extends StatelessWidget {
+ const DashboardNavigationDrawer({super.key});
@override
Widget build(BuildContext context) {
diff --git a/dashboard/lib/index_page.dart b/dashboard/lib/index_page.dart
index cf68263..6d7de5d 100644
--- a/dashboard/lib/index_page.dart
+++ b/dashboard/lib/index_page.dart
@@ -5,8 +5,8 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
+import 'dashboard_navigation_drawer.dart';
import 'logic/links.dart';
-import 'navigation_drawer.dart';
import 'state/index.dart';
import 'widgets/app_bar.dart';
import 'widgets/error_brook_watcher.dart';
@@ -58,7 +58,7 @@
),
),
),
- drawer: const NavigationDrawer(),
+ drawer: const DashboardNavigationDrawer(),
),
);
}
diff --git a/dashboard/lib/logic/links.dart b/dashboard/lib/logic/links.dart
index 55c6e9f..0f4fbc6 100644
--- a/dashboard/lib/logic/links.dart
+++ b/dashboard/lib/logic/links.dart
@@ -8,7 +8,7 @@
import '../build_dashboard_page.dart';
import '../index_page.dart';
-/// List of links that are shown on [IndexPage] and in the [NavigationDrawer].
+/// List of links that are shown on [IndexPage] and in the [DashboardNavigationDrawer].
List<CocoonLink> createCocoonLinks(BuildContext context) {
return <CocoonLink>[
CocoonLink(
@@ -59,7 +59,7 @@
/// Text shown to users describing this link.
final String? name;
- /// If the link is internal to this Flutter app, this can be passed to highlight on the [NavigationDrawer] the page the user is on.
+ /// If the link is internal to this Flutter app, this can be passed to highlight on the [DashboardNavigationDrawer] the page the user is on.
final String? route;
/// An [Icon] to represent this link.
diff --git a/dashboard/test/navigation_drawer_test.dart b/dashboard/test/dashboard_navigation_drawer_test.dart
similarity index 93%
rename from dashboard/test/navigation_drawer_test.dart
rename to dashboard/test/dashboard_navigation_drawer_test.dart
index 1106d4c..feb0139 100644
--- a/dashboard/test/navigation_drawer_test.dart
+++ b/dashboard/test/dashboard_navigation_drawer_test.dart
@@ -4,7 +4,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_dashboard/main.dart';
-import 'package:flutter_dashboard/navigation_drawer.dart';
+import 'package:flutter_dashboard/dashboard_navigation_drawer.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/mockito.dart';
import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart';
@@ -14,7 +14,7 @@
void main() {
final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized();
- group('NavigationDrawer', () {
+ group('DashboardNavigationDrawer', () {
late FakeUrlLauncher urlLauncher;
setUp(() {
@@ -28,7 +28,7 @@
await tester.pumpWidget(
const MaterialApp(
title: 'Test',
- home: NavigationDrawer(),
+ home: DashboardNavigationDrawer(),
),
);
@@ -46,7 +46,7 @@
final MockNavigatorObserver navigatorObserver = MockNavigatorObserver();
await tester.pumpWidget(
MaterialApp(
- home: const NavigationDrawer(),
+ home: const DashboardNavigationDrawer(),
initialRoute: '/',
routes: <String, WidgetBuilder>{
'/build': (BuildContext context) => const Text('i am build'),
@@ -69,7 +69,7 @@
testWidgets('skia perf links opens skia perf url', (WidgetTester tester) async {
await tester.pumpWidget(
const MaterialApp(
- home: NavigationDrawer(),
+ home: DashboardNavigationDrawer(),
),
);
@@ -85,7 +85,7 @@
testWidgets('source code opens github cocoon url', (WidgetTester tester) async {
await tester.pumpWidget(
const MaterialApp(
- home: NavigationDrawer(),
+ home: DashboardNavigationDrawer(),
),
);