mirror of
https://gitlab.com/moepoi/moepoi.dev.git
synced 2024-11-26 00:37:19 +01:00
44 lines
No EOL
1.4 KiB
Dart
44 lines
No EOL
1.4 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);
|
|
case '/resume':
|
|
return PageTransition(child: const Resume(), type: PageTransitionType.leftToRight);
|
|
case '/skills':
|
|
return PageTransition(child: const Skills(), type: PageTransitionType.bottomToTop);
|
|
case '/projects':
|
|
return PageTransition(child: const Projects(), type: PageTransitionType.rightToLeft);
|
|
default:
|
|
return PageTransition(child: const Home(), type: PageTransitionType.fade);
|
|
}
|
|
},
|
|
);
|
|
}
|
|
} |