Commit 796081d3 authored by Leonardo José Machado Canto's avatar Leonardo José Machado Canto
Browse files

Fix - Integrando as view - tela de cadastro com a tela inicial

parent f1613413
Showing with 29 additions and 37 deletions
+29 -37
import 'package:flutter/material.dart';
import '../resources/color_pattern.dart';
import '../../resources/color_pattern.dart';
class InputText extends StatefulWidget {
const InputText({Key? key}) : super(key: key);
......@@ -11,7 +11,6 @@ class InputText extends StatefulWidget {
class _InputTextState extends State<InputText> {
final _formKey = GlobalKey<FormState>();
String _inputValue = '';
final _nameController = TextEditingController();
@override
......@@ -31,7 +30,7 @@ class _InputTextState extends State<InputText> {
),
decoration: const InputDecoration(
hintText: 'Digite Aqui',
hintStyle: TextStyle(color: Colors.grey, fontSize: 19),
hintStyle: TextStyle(color: ColorPattern.gray, fontSize: 19),
),
validator: (value) {
if (value == null || value.isEmpty) {
......@@ -41,7 +40,6 @@ class _InputTextState extends State<InputText> {
},
onSaved: (value) {
//_inputValue = value!;
//MaterialPageRoute(builder: builder)
},
),
),
......
......@@ -16,7 +16,7 @@ class LogoFocus extends StatelessWidget {
width: 320,
child: const Text("Let's Focus!",
style: TextStyle(
color: Colors.white,
color: ColorPattern.white,
fontSize: 36,
fontWeight: FontWeight.bold
)),
......
......@@ -10,7 +10,7 @@ class NotificationButton extends StatefulWidget {
}
class _NotificationButtonState extends State<NotificationButton> {
int minutos = 0;
int minutos = 20;
void edit() {
showDialog(
......@@ -71,7 +71,7 @@ class _NotificationButtonState extends State<NotificationButton> {
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.green,
color: ColorPattern.green,
)),
const TextSpan(
text: ' Min',
......
import 'package:flutter/material.dart';
import 'package:front/view/cadastro/form_view.dart';
import 'package:front/view/home/home_view.dart';
import 'start/start_view.dart';
class AppWidget extends StatelessWidget {
const AppWidget({Key? key}) : super(key: key);
......@@ -11,8 +11,9 @@ class AppWidget extends StatelessWidget {
return MaterialApp(
initialRoute: '/cadastro',
routes: {
'/': (context) => const StartPage(),
'/home':(context) => const HomePage(),
'/cadastro':(context) => const Cadastro(),
},
);
}
......
import 'package:flutter/material.dart';
import 'package:front/components/input_text.dart';
import 'package:flutter/material.dart';
import 'package:front/components/cadastro/input_text.dart';
import 'package:front/components/cadastro/logo_text.dart';
import 'package:introduction_screen/introduction_screen.dart';
import '../resources/color_pattern.dart';
import '../../resources/color_pattern.dart';
class Cadastro extends StatefulWidget {
const Cadastro({Key? key}) : super(key: key);
......@@ -18,11 +20,6 @@ class _CadastroState extends State<Cadastro> {
final formKey = GlobalKey<FormState>();
String nome = '';
/*void navigateToNextScreen() {
Navigator.push(context,
MaterialPageRoute(builder: (context) => RoutinePeriodSelection()));
}*/
@override
Widget build(BuildContext context) {
return Scaffold(
......@@ -34,7 +31,9 @@ class _CadastroState extends State<Cadastro> {
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const SizedBox(height: 250),
const SizedBox(height: 20),
const LogoFocus(),
const SizedBox(height: 230),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
......@@ -44,7 +43,7 @@ class _CadastroState extends State<Cadastro> {
'Olá,',
style: TextStyle(
fontWeight: FontWeight.w600,
color: Colors.white,
color: ColorPattern.white,
fontSize: 32),
),
InputText(),
......@@ -58,13 +57,13 @@ class _CadastroState extends State<Cadastro> {
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const SizedBox(height: 166),
const SizedBox(height: 145),
const Text(
'Após quantos\nminutos devo lhe\nlembrar de sair do\ncelular ? ',
textAlign: TextAlign.left,
style: TextStyle(
fontWeight: FontWeight.w600,
color: Colors.white,
color: ColorPattern.white,
fontSize: 36),
),
Row(
......@@ -76,7 +75,7 @@ class _CadastroState extends State<Cadastro> {
'Minutos:',
style: TextStyle(
fontWeight: FontWeight.w600,
color: Colors.white,
color: ColorPattern.white,
fontSize: 32),
),
InputText(),
......@@ -90,13 +89,13 @@ class _CadastroState extends State<Cadastro> {
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const SizedBox(height: 166),
const SizedBox(height: 145),
const Text(
'Qual a sua meta\ndiária ideal para\npassar no celular ? ',
textAlign: TextAlign.left,
style: TextStyle(
fontWeight: FontWeight.w600,
color: Colors.white,
color: ColorPattern.white,
fontSize: 36),
),
Row(
......@@ -105,10 +104,10 @@ class _CadastroState extends State<Cadastro> {
children: const [
Padding(padding: EdgeInsets.only(right: 24)),
Text(
'Horas:',
'Tempo:',
style: TextStyle(
fontWeight: FontWeight.w600,
color: Colors.white,
color: ColorPattern.white,
fontSize: 32),
),
InputText(),
......@@ -122,7 +121,7 @@ class _CadastroState extends State<Cadastro> {
style: ElevatedButton.styleFrom(
backgroundColor: ColorPattern.darkMode),
onPressed: () {
formKey.currentState?.validate();
Navigator.pushNamed(context, '/home');
},
child: const Text(
'PRONTO',
......@@ -179,18 +178,12 @@ class _CadastroState extends State<Cadastro> {
}
DotsDecorator getDotDecorator() => const DotsDecorator(
color: Colors.white,
color: ColorPattern.white,
size: Size(10, 10),
activeSize: Size(15, 15),
activeColor: customizedGreen,
);
/*void goToLogin(context) => Navigator.push(
context, MaterialPageRoute(builder: (context) => LoginPage()));
Widget buildImage(String path) =>
Center(child: Image.asset(path, width: 500));*/
PageDecoration getPageDecoration() => PageDecoration(
titleTextStyle: const TextStyle(
fontSize: 28, fontWeight: FontWeight.bold, color: customizedGreen),
......@@ -198,6 +191,5 @@ class _CadastroState extends State<Cadastro> {
titlePadding: const EdgeInsets.all(8).copyWith(top: 0),
//descriptionPadding: EdgeInsets.all(8).copyWith(bottom: 0),
imagePadding: const EdgeInsets.all(8),
//pageColor: Colors.white,
);
}
......@@ -28,9 +28,9 @@ class _HomePageState extends State<HomePage> {
// ignore: prefer_const_constructors
Padding(
padding: const EdgeInsets.only(left: 45.0, top: 80),
child: const Text('Olá ______',
child: const Text('Olá, Lucas \u{1F44B}',
textAlign: TextAlign.left,
style: TextStyle(fontSize: 25, color: Colors.white)),
style: TextStyle(fontSize: 25, color: ColorPattern.white)),
),
const Padding(padding: EdgeInsets.only(bottom: 40)),
Center(
......
......@@ -291,5 +291,5 @@ packages:
source: hosted
version: "2.1.4"
sdks:
dart: ">=2.18.0 <3.0.0"
dart: ">=2.18.2 <3.0.0"
flutter: ">=1.20.0"
......@@ -35,6 +35,7 @@ dependencies:
date_format: "^1.0.4"
introduction_screen: ^3.1.7
circular_countdown_timer: ^0.2.1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment