1
0
Fork 0
mirror of https://gitlab.com/moepoi/moepoi.dev.git synced 2025-04-26 21:16:20 +02:00
This commit is contained in:
Moe Poi ~ 2022-06-08 15:22:55 +07:00
parent dc97831886
commit 27f7ca559e
7 changed files with 8 additions and 47 deletions

View file

@ -28,15 +28,15 @@ class _MoepoiState extends State<Moepoi> {
onGenerateRoute: (settings) {
switch (settings.name) {
case '/':
return PageTransition(child: const Home(), type: PageTransitionType.fade);
return PageTransition(child: const Home(), type: PageTransitionType.fade, settings: settings);
case '/resume':
return PageTransition(child: const Resume(), type: PageTransitionType.leftToRight);
return PageTransition(child: const Resume(), type: PageTransitionType.leftToRight, settings: settings);
case '/skills':
return PageTransition(child: const Skills(), type: PageTransitionType.bottomToTop);
return PageTransition(child: const Skills(), type: PageTransitionType.bottomToTop, settings: settings);
case '/projects':
return PageTransition(child: const Projects(), type: PageTransitionType.rightToLeft);
return PageTransition(child: const Projects(), type: PageTransitionType.rightToLeft, settings: settings);
default:
return PageTransition(child: const Home(), type: PageTransitionType.fade);
return PageTransition(child: const Home(), type: PageTransitionType.fade, settings: settings);
}
},
);

View file

@ -1,4 +1,3 @@
import 'package:universal_html/html.dart' as html;
import 'package:url_launcher/url_launcher.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter/material.dart';
@ -139,7 +138,6 @@ class _HomeState extends State<Home> {
flex: 1,
child: ElevatedButton(
onPressed: () {
html.window.history.pushState(null, '', '/resume');
Navigator.pushNamed(context, '/resume');
},
style: ButtonStyle(
@ -158,7 +156,6 @@ class _HomeState extends State<Home> {
flex: 1,
child: ElevatedButton(
onPressed: () {
html.window.history.pushState(null, '', '/skills');
Navigator.pushNamed(context, '/skills');
},
style: ButtonStyle(
@ -177,7 +174,6 @@ class _HomeState extends State<Home> {
flex: 1,
child: ElevatedButton(
onPressed: () {
html.window.history.pushState(null, '', '/projects');
Navigator.pushNamed(context, '/projects');
},
style: ButtonStyle(

View file

@ -1,4 +1,3 @@
import 'package:universal_html/html.dart' as html;
import 'package:flutter/material.dart';
import 'package:moepoi_site/components/project_box.dart';
@ -32,8 +31,7 @@ class _ProjectsState extends State<Projects> {
child: IconButton(
icon: const Icon(Icons.close, color: Color.fromARGB(255, 80, 192, 144),),
onPressed: () {
html.window.history.pushState(null, '', '/');
Navigator.pushReplacementNamed(context, '/');
Navigator.pop(context);
},
),
),

View file

@ -1,4 +1,3 @@
import 'package:universal_html/html.dart' as html;
import 'package:flutter/material.dart';
import 'package:moepoi_site/components/resume_experience.dart';
@ -32,8 +31,7 @@ class _ResumeState extends State<Resume> {
child: IconButton(
icon: const Icon(Icons.close, color: Color.fromARGB(255, 80, 192, 144),),
onPressed: () {
html.window.history.pushState(null, '', '/');
Navigator.pushReplacementNamed(context, '/');
Navigator.pop(context);
},
),
),

View file

@ -1,4 +1,3 @@
import 'package:universal_html/html.dart' as html;
import 'package:flutter/material.dart';
import 'package:moepoi_site/components/skill_box.dart';
@ -31,8 +30,7 @@ class _SkillsState extends State<Skills> {
child: IconButton(
icon: const Icon(Icons.close, color: Color.fromARGB(255, 80, 192, 144),),
onPressed: () {
html.window.history.pushState(null, '', '/');
Navigator.pushReplacementNamed(context, '/');
Navigator.pop(context);
},
),
),

View file

@ -64,13 +64,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.2"
csslib:
dependency: transitive
description:
name: csslib
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.2"
cupertino_icons:
dependency: "direct main"
description:
@ -121,13 +114,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
html:
dependency: transitive
description:
name: html
url: "https://pub.dartlang.org"
source: hosted
version: "0.15.0"
image:
dependency: transitive
description:
@ -266,20 +252,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
universal_html:
dependency: "direct main"
description:
name: universal_html
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
universal_io:
dependency: transitive
description:
name: universal_io
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
url_launcher:
dependency: "direct main"
description:

View file

@ -35,7 +35,6 @@ dependencies:
flutter_web_plugins:
sdk: flutter
page_transition: ^2.0.5
universal_html: ^2.0.8
url_launcher: ^6.1.2
dev_dependencies: