|
@@ -1,5 +1,6 @@
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
+import 'package:namer_app/login.dart';
|
|
|
|
|
|
void main() {
|
|
void main() {
|
|
runApp(MyApp());
|
|
runApp(MyApp());
|
|
@@ -10,11 +11,11 @@ final _router = GoRouter(
|
|
GoRoute(
|
|
GoRoute(
|
|
path: '/',
|
|
path: '/',
|
|
builder: (context, state) => MyHomePage(),
|
|
builder: (context, state) => MyHomePage(),
|
|
- // routes: [
|
|
|
|
- // GoRoute(
|
|
|
|
- // path: '/login',
|
|
|
|
- // builder: (context, state) => Placeholder(),)
|
|
|
|
- // ]
|
|
|
|
|
|
+ routes: [
|
|
|
|
+ GoRoute(
|
|
|
|
+ path: '/login',
|
|
|
|
+ builder: (context, state) => const Login(),)
|
|
|
|
+ ]
|
|
),
|
|
),
|
|
],
|
|
],
|
|
);
|
|
);
|
|
@@ -193,25 +194,25 @@ class Pindai extends StatelessWidget {
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
|
|
-class login extends StatelessWidget {
|
|
|
|
- /// Constructs a [DetailsScreen]
|
|
|
|
- const login({Key? key}) : super(key: key);
|
|
|
|
|
|
+// class Login extends StatelessWidget {
|
|
|
|
+// /// Constructs a [DetailsScreen]
|
|
|
|
+// const Login({Key? key}) : super(key: key);
|
|
|
|
|
|
- @override
|
|
|
|
- Widget build(BuildContext context) {
|
|
|
|
- return Scaffold(
|
|
|
|
- appBar: AppBar(title: const Text('Details Screen')),
|
|
|
|
- body: Center(
|
|
|
|
- child: Column(
|
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
- children: <ElevatedButton>[
|
|
|
|
- ElevatedButton(
|
|
|
|
- onPressed: () {print('x');},
|
|
|
|
- child: const Text('Go back to the Home screen'),
|
|
|
|
- ),
|
|
|
|
- ],
|
|
|
|
- ),
|
|
|
|
- ),
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
+// @override
|
|
|
|
+// Widget build(BuildContext context) {
|
|
|
|
+// return Scaffold(
|
|
|
|
+// appBar: AppBar(title: const Text('Details Screen')),
|
|
|
|
+// body: Center(
|
|
|
|
+// child: Column(
|
|
|
|
+// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
+// children: <ElevatedButton>[
|
|
|
|
+// ElevatedButton(
|
|
|
|
+// onPressed: () {print('x');},
|
|
|
|
+// child: const Text('Go back to the Home screen'),
|
|
|
|
+// ),
|
|
|
|
+// ],
|
|
|
|
+// ),
|
|
|
|
+// ),
|
|
|
|
+// );
|
|
|
|
+// }
|
|
|
|
+// }
|