mirror of
https://gitlab.com/moepoi/moepoi.dev.git
synced 2024-11-29 11:42:48 +01:00
44 lines
No EOL
1.5 KiB
Dart
44 lines
No EOL
1.5 KiB
Dart
import 'package:page_transition/page_transition.dart';
|
|
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:moepoi_site/screens/home.dart';
|
|
import 'package:moepoi_site/screens/projects.dart';
|
|
import 'package:moepoi_site/screens/resume.dart';
|
|
import 'package:moepoi_site/screens/skills.dart';
|
|
|
|
void main() {
|
|
setUrlStrategy(PathUrlStrategy());
|
|
runApp(const Moepoi());
|
|
}
|
|
|
|
class Moepoi extends StatefulWidget {
|
|
const Moepoi({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<Moepoi> createState() => _MoepoiState();
|
|
}
|
|
|
|
class _MoepoiState extends State<Moepoi> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
debugShowCheckedModeBanner: false,
|
|
initialRoute: '/',
|
|
onGenerateRoute: (settings) {
|
|
switch (settings.name) {
|
|
case '/':
|
|
return PageTransition(child: const Home(), type: PageTransitionType.fade, settings: settings);
|
|
case '/resume':
|
|
return PageTransition(child: const Resume(), type: PageTransitionType.leftToRight, settings: settings);
|
|
case '/skills':
|
|
return PageTransition(child: const Skills(), type: PageTransitionType.bottomToTop, settings: settings);
|
|
case '/projects':
|
|
return PageTransition(child: const Projects(), type: PageTransitionType.rightToLeft, settings: settings);
|
|
default:
|
|
return PageTransition(child: const Home(), type: PageTransitionType.fade, settings: settings);
|
|
}
|
|
},
|
|
);
|
|
}
|
|
} |