Skip to content

Commit

Permalink
fix: broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marwfair committed Jul 24, 2024
1 parent a8fc5d1 commit 2e4f229
Show file tree
Hide file tree
Showing 26 changed files with 185 additions and 205 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Generated by the [Very Good CLI][very_good_cli_link] 🤖

Airplane Entertainment System demo project.
Airplane Entertainment System project.

---

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import 'package:airplane_entertainment_system/demo/demo.dart';
import 'package:airplane_entertainment_system/airplane_entertainment_system/airplane_entertainment_system.dart';
import 'package:airplane_entertainment_system/music_player/music_player.dart';
import 'package:airplane_entertainment_system/overview/overview.dart';
import 'package:flutter/material.dart';

class AirplaneEntertainmentSystemDemo extends StatefulWidget {
const AirplaneEntertainmentSystemDemo({super.key});
class AirplaneEntertainmentSystemScreen extends StatefulWidget {
const AirplaneEntertainmentSystemScreen({super.key});

@override
State<AirplaneEntertainmentSystemDemo> createState() =>
_AirplaneEntertainmentSystemDemoState();
State<AirplaneEntertainmentSystemScreen> createState() =>
_AirplaneEntertainmentSystemScreenState();
}

class _AirplaneEntertainmentSystemDemoState
extends State<AirplaneEntertainmentSystemDemo> {
class _AirplaneEntertainmentSystemScreenState
extends State<AirplaneEntertainmentSystemScreen> {
int _currentPage = 0;

@override
Expand All @@ -23,7 +23,7 @@ class _AirplaneEntertainmentSystemDemoState
return Stack(
children: [
Positioned.fill(
child: DemoBackground(
child: SystemBackground(
page: _currentPage,
),
),
Expand All @@ -42,7 +42,7 @@ class _AirplaneEntertainmentSystemDemoState
},
),
Expanded(
child: _DemoPageView(
child: _ContentPageView(
pageSize: Size(
constraints.maxWidth,
constraints.maxHeight,
Expand Down Expand Up @@ -80,8 +80,8 @@ class _AirplaneEntertainmentSystemDemoState
}
}

class _DemoPageView extends StatefulWidget {
const _DemoPageView({
class _ContentPageView extends StatefulWidget {
const _ContentPageView({
required this.pageSize,
required this.pageIndex,
});
Expand All @@ -90,24 +90,14 @@ class _DemoPageView extends StatefulWidget {
final int pageIndex;

@override
State<_DemoPageView> createState() => _DemoPageViewState();
State<_ContentPageView> createState() => _ContentPageViewState();
}

class _DemoPageViewState extends State<_DemoPageView>
class _ContentPageViewState extends State<_ContentPageView>
with SingleTickerProviderStateMixin {
static const _placeholderPage = Center(
child: SizedBox.square(
dimension: 400,
child: Placeholder(),
),
);
static const _pages = [
OverviewPage(key: Key('overviewPage')),
MusicPlayerPage(key: Key('musicPlayerPage')),
_placeholderPage,
_placeholderPage,
_placeholderPage,
_placeholderPage,
];

late final AnimationController _controller = AnimationController(
Expand Down Expand Up @@ -135,7 +125,7 @@ class _DemoPageViewState extends State<_DemoPageView>
}

@override
void didUpdateWidget(covariant _DemoPageView oldWidget) {
void didUpdateWidget(covariant _ContentPageView oldWidget) {
super.didUpdateWidget(oldWidget);

if (widget.pageIndex != oldWidget.pageIndex) {
Expand Down
1 change: 1 addition & 0 deletions lib/airplane_entertainment_system/view/view.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export 'airplane_entertainment_system_screen.dart';
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,13 @@ class LeftSideNavigationRail extends StatelessWidget {
onDestinationSelected: onOptionSelected,
destinations: const [
NavigationRailDestination(
icon: Icon(Icons.airplanemode_active),
icon: Icon(Icons.airplanemode_active_outlined),
label: Text('airplanemode_active'),
),
NavigationRailDestination(
icon: Icon(Icons.headphones),
label: Text('headphones'),
),
NavigationRailDestination(
icon: Icon(Icons.play_arrow),
label: Text('play_arrow'),
),
NavigationRailDestination(
icon: Icon(Icons.face),
label: Text('face'),
),
NavigationRailDestination(
icon: Icon(Icons.shopping_bag_outlined),
label: Text('shopping_bag_outlined'),
),
NavigationRailDestination(
icon: Icon(Icons.settings),
label: Text('settings'),
),
],
),
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:airplane_entertainment_system/demo/demo.dart';
import 'package:airplane_entertainment_system/airplane_entertainment_system/airplane_entertainment_system.dart';
import 'package:flutter/material.dart' hide Image;

class DemoBackground extends StatelessWidget {
const DemoBackground({
class SystemBackground extends StatelessWidget {
const SystemBackground({
required this.page,
super.key,
});
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export 'clouds.dart';
export 'demo_background.dart';
export 'left_side_navigation_rail.dart';
export 'system_background.dart';
export 'top_button_bar.dart';
4 changes: 2 additions & 2 deletions lib/app/view/app.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:airplane_entertainment_system/demo/demo.dart';
import 'package:airplane_entertainment_system/airplane_entertainment_system/airplane_entertainment_system.dart';
import 'package:airplane_entertainment_system/l10n/l10n.dart';
import 'package:flutter/material.dart';

Expand All @@ -16,7 +16,7 @@ class App extends StatelessWidget {
),
localizationsDelegates: AppLocalizations.localizationsDelegates,
supportedLocales: AppLocalizations.supportedLocales,
home: const AirplaneEntertainmentSystemDemo(),
home: const AirplaneEntertainmentSystemScreen(),
);
}
}
1 change: 0 additions & 1 deletion lib/demo/view/view.dart

This file was deleted.

Loading

0 comments on commit 2e4f229

Please sign in to comment.