Skip to content

Commit 31fd6af

Browse files
authored
rename dashboard drawer (#2313)
1 parent 92fa60a commit 31fd6af

5 files changed

+14
-14
lines changed

dashboard/lib/build_dashboard_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import 'package:provider/provider.dart';
88
import 'package:truncate/truncate.dart';
99
import 'package:url_launcher/url_launcher.dart';
1010

11+
import 'dashboard_navigation_drawer.dart';
1112
import 'logic/task_grid_filter.dart';
12-
import 'navigation_drawer.dart';
1313
import 'service/cocoon.dart';
1414
import 'state/build.dart';
1515
import 'widgets/app_bar.dart';
@@ -434,7 +434,7 @@ class BuildDashboardPageState extends State<BuildDashboardPage> {
434434
],
435435
),
436436
),
437-
drawer: const NavigationDrawer(),
437+
drawer: const DashboardNavigationDrawer(),
438438
),
439439
);
440440
}

dashboard/lib/navigation_drawer.dart renamed to dashboard/lib/dashboard_navigation_drawer.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import 'package:flutter/material.dart';
77
import 'logic/links.dart';
88

99
/// Sidebar for navigating the different pages of Cocoon.
10-
class NavigationDrawer extends StatelessWidget {
11-
const NavigationDrawer({super.key});
10+
class DashboardNavigationDrawer extends StatelessWidget {
11+
const DashboardNavigationDrawer({super.key});
1212

1313
@override
1414
Widget build(BuildContext context) {

dashboard/lib/index_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import 'package:flutter/material.dart';
66
import 'package:provider/provider.dart';
77

8+
import 'dashboard_navigation_drawer.dart';
89
import 'logic/links.dart';
9-
import 'navigation_drawer.dart';
1010
import 'state/index.dart';
1111
import 'widgets/app_bar.dart';
1212
import 'widgets/error_brook_watcher.dart';
@@ -58,7 +58,7 @@ class IndexPage extends StatelessWidget {
5858
),
5959
),
6060
),
61-
drawer: const NavigationDrawer(),
61+
drawer: const DashboardNavigationDrawer(),
6262
),
6363
);
6464
}

dashboard/lib/logic/links.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import 'package:url_launcher/url_launcher.dart';
88
import '../build_dashboard_page.dart';
99
import '../index_page.dart';
1010

11-
/// List of links that are shown on [IndexPage] and in the [NavigationDrawer].
11+
/// List of links that are shown on [IndexPage] and in the [DashboardNavigationDrawer].
1212
List<CocoonLink> createCocoonLinks(BuildContext context) {
1313
return <CocoonLink>[
1414
CocoonLink(
@@ -59,7 +59,7 @@ class CocoonLink {
5959
/// Text shown to users describing this link.
6060
final String? name;
6161

62-
/// If the link is internal to this Flutter app, this can be passed to highlight on the [NavigationDrawer] the page the user is on.
62+
/// If the link is internal to this Flutter app, this can be passed to highlight on the [DashboardNavigationDrawer] the page the user is on.
6363
final String? route;
6464

6565
/// An [Icon] to represent this link.

dashboard/test/navigation_drawer_test.dart renamed to dashboard/test/dashboard_navigation_drawer_test.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import 'package:flutter/material.dart';
66
import 'package:flutter_dashboard/main.dart';
7-
import 'package:flutter_dashboard/navigation_drawer.dart';
7+
import 'package:flutter_dashboard/dashboard_navigation_drawer.dart';
88
import 'package:flutter_test/flutter_test.dart';
99
import 'package:mockito/mockito.dart';
1010
import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart';
@@ -14,7 +14,7 @@ import 'utils/wrapper.dart';
1414

1515
void main() {
1616
final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized();
17-
group('NavigationDrawer', () {
17+
group('DashboardNavigationDrawer', () {
1818
late FakeUrlLauncher urlLauncher;
1919

2020
setUp(() {
@@ -28,7 +28,7 @@ void main() {
2828
await tester.pumpWidget(
2929
const MaterialApp(
3030
title: 'Test',
31-
home: NavigationDrawer(),
31+
home: DashboardNavigationDrawer(),
3232
),
3333
);
3434

@@ -46,7 +46,7 @@ void main() {
4646
final MockNavigatorObserver navigatorObserver = MockNavigatorObserver();
4747
await tester.pumpWidget(
4848
MaterialApp(
49-
home: const NavigationDrawer(),
49+
home: const DashboardNavigationDrawer(),
5050
initialRoute: '/',
5151
routes: <String, WidgetBuilder>{
5252
'/build': (BuildContext context) => const Text('i am build'),
@@ -69,7 +69,7 @@ void main() {
6969
testWidgets('skia perf links opens skia perf url', (WidgetTester tester) async {
7070
await tester.pumpWidget(
7171
const MaterialApp(
72-
home: NavigationDrawer(),
72+
home: DashboardNavigationDrawer(),
7373
),
7474
);
7575

@@ -85,7 +85,7 @@ void main() {
8585
testWidgets('source code opens github cocoon url', (WidgetTester tester) async {
8686
await tester.pumpWidget(
8787
const MaterialApp(
88-
home: NavigationDrawer(),
88+
home: DashboardNavigationDrawer(),
8989
),
9090
);
9191

0 commit comments

Comments
 (0)