diff --git a/lib/thumbnail/thumbnail.dart b/lib/thumbnail/thumbnail.dart deleted file mode 100644 index be1da8f..0000000 --- a/lib/thumbnail/thumbnail.dart +++ /dev/null @@ -1,56 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:vehicle_cockpit/dashboard/dashboard.dart'; -import 'package:vehicle_cockpit/ui/ui.dart'; - -class Thumbnail extends StatelessWidget { - const Thumbnail({super.key}); - - @override - Widget build(BuildContext context) { - final theme = const AppDarkTheme().themeData; - - return Theme( - data: theme, - child: ColoredBox( - color: theme.colorScheme.surface, - child: const Center(child: LapViewer()), - ), - ); - } -} - -class LapViewer extends StatefulWidget { - const LapViewer({super.key}); - - @override - State createState() => LapViewerState(); -} - -class LapViewerState extends State with TickerProviderStateMixin { - late final AnimationController _controller; - - @override - void initState() { - super.initState(); - _controller = AnimationController(vsync: this) - ..duration = const Duration(seconds: 12) - ..forward() - ..repeat(); - } - - @override - void dispose() { - _controller.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return AnimatedBuilder( - animation: _controller, - builder: (_, __) => RouteMap( - animationValue: _controller.value, - ), - ); - } -} diff --git a/test/thumbnail/thumbnail_test.dart b/test/thumbnail/thumbnail_test.dart deleted file mode 100644 index ab44714..0000000 --- a/test/thumbnail/thumbnail_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:vehicle_cockpit/dashboard/dashboard.dart'; -import 'package:vehicle_cockpit/thumbnail/thumbnail.dart'; - -import '../helpers/helpers.dart'; - -void main() { - group('Thumbnail', () { - testWidgets('renders the LapViewer with RouteMap', (tester) async { - await tester.pumpApp(const Thumbnail()); - expect(find.byType(LapViewer), findsOneWidget); - expect(find.byType(RouteMap), findsOneWidget); - }); - }); -}