Skip to content

Commit

Permalink
Formatted dart
Browse files Browse the repository at this point in the history
  • Loading branch information
wdan31 committed Oct 30, 2024
1 parent 89efae2 commit 8ab451d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
3 changes: 1 addition & 2 deletions flutter_app/lib/widgets/nav_bar_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ class NavBar extends StatelessWidget {
selectedItemColor: Colors.black,
showUnselectedLabels: true,
);

}
}

/// A placeholder screen with title text and the navigation bar
///
///
/// This widget is a placeholder screen containing a title,
/// placeholder body, and the navigation bar.
class PlaceholderScreen extends StatelessWidget {
Expand Down
18 changes: 11 additions & 7 deletions flutter_app/test/widget/nav_bar_widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:imacs/widgets/nav_bar_widget.dart';

void main() {
group ( 'Navbar widget',
() {
testWidgets('NavBar navigates to correct route', (WidgetTester tester) async {
group('Navbar widget', () {
testWidgets('NavBar navigates to correct route',
(WidgetTester tester) async {
await tester.pumpWidget(
MaterialApp(
initialRoute: '/',
routes: {
'/': (context) => const Scaffold(body: Text('Home Page'), bottomNavigationBar: NavBar()),
'/logs': (context) => const Scaffold(body: Text('Logs Page'), bottomNavigationBar: NavBar()),
'/camera': (context) => const Scaffold(body: Text('Camera Page'), bottomNavigationBar: NavBar()),
'/sitl': (context) => const Scaffold(body: Text('SITL Page'), bottomNavigationBar: NavBar()),
'/': (context) => const Scaffold(
body: Text('Home Page'), bottomNavigationBar: NavBar()),
'/logs': (context) => const Scaffold(
body: Text('Logs Page'), bottomNavigationBar: NavBar()),
'/camera': (context) => const Scaffold(
body: Text('Camera Page'), bottomNavigationBar: NavBar()),
'/sitl': (context) => const Scaffold(
body: Text('SITL Page'), bottomNavigationBar: NavBar()),
},
),
);
Expand Down

0 comments on commit 8ab451d

Please sign in to comment.