Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Projeto Focus
Frontend
Commits
796081d3
Commit
796081d3
authored
2 years ago
by
Leonardo José Machado Canto
Browse files
Options
Download
Email Patches
Plain Diff
Fix - Integrando as view - tela de cadastro com a tela inicial
parent
f1613413
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
lib/components/cadastro/input_text.dart
+2
-4
lib/components/cadastro/input_text.dart
lib/components/cadastro/logo_text.dart
+1
-1
lib/components/cadastro/logo_text.dart
lib/components/home_componenets/notification_button.dart
+2
-2
lib/components/home_componenets/notification_button.dart
lib/view/app_widget.dart
+3
-2
lib/view/app_widget.dart
lib/view/cadastro/form_view.dart
+17
-25
lib/view/cadastro/form_view.dart
lib/view/home/home_view.dart
+2
-2
lib/view/home/home_view.dart
pubspec.lock
+1
-1
pubspec.lock
pubspec.yaml
+1
-0
pubspec.yaml
with
29 additions
and
37 deletions
+29
-37
lib/components/input_text.dart
→
lib/components/
cadastro/
input_text.dart
View file @
796081d3
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:
Color
s
.
gr
e
y
,
fontSize:
19
),
hintStyle:
TextStyle
(
color:
Color
Pattern
.
gr
a
y
,
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)
},
),
),
...
...
This diff is collapsed.
Click to expand it.
lib/components/logo_text.dart
→
lib/components/
cadastro/
logo_text.dart
View file @
796081d3
...
...
@@ -16,7 +16,7 @@ class LogoFocus extends StatelessWidget {
width:
320
,
child:
const
Text
(
"Let's Focus!"
,
style:
TextStyle
(
color:
Color
s
.
white
,
color:
Color
Pattern
.
white
,
fontSize:
36
,
fontWeight:
FontWeight
.
bold
)),
...
...
This diff is collapsed.
Click to expand it.
lib/components/home_componenets/notification_button.dart
View file @
796081d3
...
...
@@ -10,7 +10,7 @@ class NotificationButton extends StatefulWidget {
}
class
_NotificationButtonState
extends
State
<
NotificationButton
>
{
int
minutos
=
0
;
int
minutos
=
2
0
;
void
edit
()
{
showDialog
(
...
...
@@ -71,7 +71,7 @@ class _NotificationButtonState extends State<NotificationButton> {
style:
const
TextStyle
(
fontSize:
20
,
fontWeight:
FontWeight
.
bold
,
color:
Color
s
.
green
,
color:
Color
Pattern
.
green
,
)),
const
TextSpan
(
text:
' Min'
,
...
...
This diff is collapsed.
Click to expand it.
lib/view/app_widget.dart
View file @
796081d3
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
(),
},
);
}
...
...
This diff is collapsed.
Click to expand it.
lib/
pages
/cadastro.dart
→
lib/
view
/cadastro
/form_view
.dart
View file @
796081d3
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:
Color
s
.
white
,
color:
Color
Pattern
.
white
,
fontSize:
32
),
),
InputText
(),
...
...
@@ -58,13 +57,13 @@ class _CadastroState extends State<Cadastro> {
bodyWidget:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
const
SizedBox
(
height:
1
66
),
const
SizedBox
(
height:
1
45
),
const
Text
(
'Após quantos
\n
minutos devo lhe
\n
lembrar de sair do
\n
celular ? '
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w600
,
color:
Color
s
.
white
,
color:
Color
Pattern
.
white
,
fontSize:
36
),
),
Row
(
...
...
@@ -76,7 +75,7 @@ class _CadastroState extends State<Cadastro> {
'Minutos:'
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w600
,
color:
Color
s
.
white
,
color:
Color
Pattern
.
white
,
fontSize:
32
),
),
InputText
(),
...
...
@@ -90,13 +89,13 @@ class _CadastroState extends State<Cadastro> {
bodyWidget:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
const
SizedBox
(
height:
1
66
),
const
SizedBox
(
height:
1
45
),
const
Text
(
'Qual a sua meta
\n
diária ideal para
\n
passar no celular ? '
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w600
,
color:
Color
s
.
white
,
color:
Color
Pattern
.
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:
Color
s
.
white
,
color:
Color
Pattern
.
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:
Color
s
.
white
,
color:
Color
Pattern
.
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,
);
}
This diff is collapsed.
Click to expand it.
lib/view/home/home_view.dart
View file @
796081d3
...
...
@@ -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:
Color
s
.
white
)),
style:
TextStyle
(
fontSize:
25
,
color:
Color
Pattern
.
white
)),
),
const
Padding
(
padding:
EdgeInsets
.
only
(
bottom:
40
)),
Center
(
...
...
This diff is collapsed.
Click to expand it.
pubspec.lock
View file @
796081d3
...
...
@@ -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"
This diff is collapsed.
Click to expand it.
pubspec.yaml
View file @
796081d3
...
...
@@ -35,6 +35,7 @@ dependencies:
date_format
:
"
^1.0.4"
introduction_screen
:
^3.1.7
circular_countdown_timer
:
^0.2.1
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment