gemini-app/lib/main.dart

52 lines
1.5 KiB
Dart
Raw Permalink Normal View History

2024-07-16 19:02:02 +02:00
import 'package:flutter/material.dart';
import 'package:gemini_app/eeg/eeg_service.dart';
import 'package:gemini_app/screens/eeg_calibration_screen.dart';
import 'package:get_it/get_it.dart';
2024-08-09 01:03:08 +02:00
import 'package:google_fonts/google_fonts.dart';
2024-07-16 19:02:02 +02:00
void main() {
GetIt.I.registerSingleton<EegService>(EegService());
2024-07-16 19:02:02 +02:00
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'MindEasy',
2024-08-10 15:17:59 +02:00
debugShowCheckedModeBanner: false,
2024-07-16 19:02:02 +02:00
theme: ThemeData(
2024-08-09 01:03:08 +02:00
brightness: Brightness.dark,
primarySwatch: Colors.teal,
textTheme: GoogleFonts.openSansTextTheme(
Theme.of(context).textTheme,
),
2024-07-16 19:02:02 +02:00
),
home: const MindWanderScreen(),
2024-07-16 19:02:02 +02:00
);
}
}
Route createSmoothRoute(Widget page) {
return PageRouteBuilder(
pageBuilder: (context, animation, secondaryAnimation) => page,
transitionsBuilder: (context, animation, secondaryAnimation, child) {
const begin = Offset(1.0, 0.0);
const end = Offset.zero;
final tween = Tween(begin: begin, end: end)
.chain(CurveTween(curve: Curves.easeInOut));
return SlideTransition(
position: animation.drive(tween),
child: child,
);
},
transitionDuration:
Duration(milliseconds: 300), // Adjust the duration to your preference
reverseTransitionDuration:
Duration(milliseconds: 300), // Adjust for reverse transition too
);
2024-07-16 19:02:02 +02:00
}