initial router setup
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:lixo/components/nc_base_page.dart';
|
||||
import 'package:lixo/components/nc_button.dart';
|
||||
|
||||
class InitialPage extends StatelessWidget {
|
||||
@@ -6,8 +8,7 @@ class InitialPage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xffa600f9),
|
||||
return NcBasePage(
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -16,7 +17,7 @@ class InitialPage extends StatelessWidget {
|
||||
caption: "Quero me registrar",
|
||||
backgroundColor: Colors.black,
|
||||
captionColor: Colors.white,
|
||||
onPressed: _register,
|
||||
onPressed: () => context.go('/register'),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 40,
|
||||
@@ -25,19 +26,11 @@ class InitialPage extends StatelessWidget {
|
||||
caption: "Já sou cliente",
|
||||
backgroundColor: Colors.black,
|
||||
captionColor: Colors.white,
|
||||
onPressed: _login,
|
||||
onPressed: () => context.go('/login'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _register() {
|
||||
print("Quero me registrar");
|
||||
}
|
||||
|
||||
void _login() {
|
||||
print("Quero fazer login");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lixo/components/nc_base_page.dart';
|
||||
|
||||
class LoginPage extends StatelessWidget {
|
||||
const LoginPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const NcBasePage(
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text("Login Page"),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lixo/components/nc_base_page.dart';
|
||||
|
||||
class RegisterPage extends StatelessWidget {
|
||||
const RegisterPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const NcBasePage(
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text("Register Page"),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user