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
Vittoria C Presa
notar-e-anotar-mobile
Commits
5d5e755b
Commit
5d5e755b
authored
3 years ago
by
Thiago Nitschke Simões
Browse files
Options
Download
Plain Diff
Merge branch 'release/sprint_4'
parents
34599be2
4f15a562
Changes
44
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
android/app/src/main/AndroidManifest.xml
+2
-0
android/app/src/main/AndroidManifest.xml
images/avatar.png
+0
-0
images/avatar.png
ios/Runner/Info.plist
+5
-0
ios/Runner/Info.plist
lib/components/evaluation_task_card.dart
+146
-0
lib/components/evaluation_task_card.dart
lib/components/top_card_user.dart
+140
-0
lib/components/top_card_user.dart
lib/components/weekday_tile.dart
+17
-6
lib/components/weekday_tile.dart
lib/components/weekdays_card.dart
+52
-13
lib/components/weekdays_card.dart
lib/main.dart
+6
-0
lib/main.dart
lib/models/additional_info.dart
+1
-1
lib/models/additional_info.dart
lib/models/mood.dart
+1
-2
lib/models/mood.dart
lib/models/routine_data.dart
+1
-5
lib/models/routine_data.dart
lib/models/routine_day.dart
+1
-4
lib/models/routine_day.dart
lib/models/routine_plan.dart
+6
-4
lib/models/routine_plan.dart
lib/models/subject.dart
+9
-2
lib/models/subject.dart
lib/models/task.dart
+1
-2
lib/models/task.dart
lib/models/user.dart
+1
-2
lib/models/user.dart
lib/models/weekly_routine.dart
+1
-3
lib/models/weekly_routine.dart
lib/pages/home_page.dart
+69
-18
lib/pages/home_page.dart
lib/pages/login_page.dart
+12
-2
lib/pages/login_page.dart
lib/pages/register_page.dart
+178
-0
lib/pages/register_page.dart
with
649 additions
and
64 deletions
+649
-64
android/app/src/main/AndroidManifest.xml
View file @
5d5e755b
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"br.pucrs.ages.notar_e_anotar_app"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<application
android:label=
"notar_e_anotar_app"
android:usesCleartextTraffic=
"true"
android:icon=
"@mipmap/ic_launcher"
>
<activity
android:name=
".MainActivity"
...
...
This diff is collapsed.
Click to expand it.
images/avatar.png
0 → 100644
View file @
5d5e755b
24.6 KB
This diff is collapsed.
Click to expand it.
ios/Runner/Info.plist
View file @
5d5e755b
...
...
@@ -41,5 +41,10 @@
</array>
<key>
UIViewControllerBasedStatusBarAppearance
</key>
<false/>
<key>
NSAppTransportSecurity
</key>
<dict>
<key>
NSAllowsArbitraryLoads
</key>
<true/>
</dict>
</dict>
</plist>
This diff is collapsed.
Click to expand it.
lib/components/evaluation_task_card.dart
0 → 100644
View file @
5d5e755b
import
'package:flutter/material.dart'
;
import
'package:notar_e_anotar_app/styles/global_styles.dart'
;
class
EvaluationTaskCard
extends
StatefulWidget
{
final
String
title
;
final
String
description
;
final
bool
challenge
;
final
Function
callback
;
final
bool
hasGoodEvaluation
;
final
bool
hasBadEvaluation
;
EvaluationTaskCard
(
{
this
.
title
,
this
.
description
,
this
.
challenge
,
this
.
callback
,
this
.
hasGoodEvaluation
,
this
.
hasBadEvaluation
});
@override
_EvaluationTaskCardState
createState
()
=>
_EvaluationTaskCardState
();
}
class
_EvaluationTaskCardState
extends
State
<
EvaluationTaskCard
>
{
String
title
;
String
description
;
bool
challenge
;
bool
hasGoodEvaluation
;
bool
hasBadEvaluation
;
@override
void
initState
()
{
super
.
initState
();
title
=
widget
.
title
;
description
=
widget
.
description
;
challenge
=
widget
.
challenge
;
hasGoodEvaluation
=
widget
.
hasGoodEvaluation
;
hasBadEvaluation
=
widget
.
hasBadEvaluation
;
}
void
changeState
()
{
challenge
=
true
;
}
Color
calculateColorForBackground
()
{
if
(!
challenge
&&
!
hasGoodEvaluation
&&
!
hasBadEvaluation
)
{
return
Colors
.
white
;
}
else
if
(
challenge
&&
!
hasGoodEvaluation
&&
!
hasBadEvaluation
)
{
return
primaryFaded
;
}
else
if
(
hasGoodEvaluation
)
{
return
blueishGreen
;
}
else
{
return
washedRed
;
}
}
Color
calculateColorForTitle
()
{
if
(!
challenge
&&
!
hasGoodEvaluation
&&
!
hasBadEvaluation
)
{
return
primaryDark
;
}
else
if
(
challenge
&&
!
hasGoodEvaluation
&&
!
hasBadEvaluation
)
{
return
primaryDark
;
}
else
{
return
Colors
.
white
;
}
}
Color
calculateColorForSubtitle
()
{
if
(!
challenge
&&
!
hasGoodEvaluation
&&
!
hasBadEvaluation
)
{
return
Colors
.
grey
;
}
else
if
(
challenge
&&
!
hasGoodEvaluation
&&
!
hasBadEvaluation
)
{
return
primaryDark
;
}
else
{
return
Colors
.
white
;
}
}
Color
calculateColorForGoodEvaluationButton
()
{
if
(!
challenge
&&
!
hasGoodEvaluation
&&
!
hasBadEvaluation
)
{
return
blueishGreen
;
}
else
if
(
challenge
&&
!
hasGoodEvaluation
&&
!
hasBadEvaluation
)
{
return
blueishGreen
;
}
else
if
(
hasGoodEvaluation
)
{
return
darkBlueishGreen
;
}
else
if
(
hasBadEvaluation
)
{
return
darkWashedRed
;
}
}
Color
calculateColorForBadEvaluationButton
()
{
if
(!
challenge
&&
!
hasGoodEvaluation
&&
!
hasBadEvaluation
)
{
return
washedRed
;
}
else
if
(
challenge
&&
!
hasGoodEvaluation
&&
!
hasBadEvaluation
)
{
return
washedRed
;
}
else
if
(
hasBadEvaluation
)
{
return
darkWashedRed
;
}
else
if
(
hasGoodEvaluation
)
{
return
darkBlueishGreen
;
}
}
@override
Widget
build
(
BuildContext
context
)
{
return
Card
(
color:
calculateColorForBackground
(),
child:
ListTile
(
title:
Text
(
'
$title
'
,
style:
Theme
.
of
(
context
).
textTheme
.
subtitle1
.
copyWith
(
fontFamily:
'Baloo 2'
,
color:
calculateColorForTitle
(),
fontWeight:
FontWeight
.
w600
),
),
subtitle:
Text
(
'
$description
'
,
style:
Theme
.
of
(
context
)
.
textTheme
.
subtitle2
.
copyWith
(
color:
calculateColorForSubtitle
()),
),
leading:
CircleAvatar
(
backgroundColor:
calculateColorForBadEvaluationButton
(),
child:
IconButton
(
icon:
Icon
(
Icons
.
close_rounded
),
color:
challenge
?
Colors
.
white
:
Colors
.
white
,
onPressed:
()
=>
setState
(()
{
hasBadEvaluation
=
!
hasBadEvaluation
;
hasGoodEvaluation
=
false
;
})),
),
trailing:
CircleAvatar
(
backgroundColor:
calculateColorForGoodEvaluationButton
(),
child:
IconButton
(
icon:
Icon
(
Icons
.
done_rounded
),
color:
challenge
?
Colors
.
white
:
Colors
.
white
,
onPressed:
()
=>
setState
(()
{
hasGoodEvaluation
=
!
hasGoodEvaluation
;
hasBadEvaluation
=
false
;
})),
),
contentPadding:
EdgeInsets
.
only
(
bottom:
5
,
left:
16
,
right:
16
),
visualDensity:
VisualDensity
.
standard
,
dense:
false
,
),
);
}
}
This diff is collapsed.
Click to expand it.
lib/components/top_card_user.dart
0 → 100644
View file @
5d5e755b
import
'package:date_format/date_format.dart'
;
import
'package:flutter/material.dart'
;
import
'package:notar_e_anotar_app/styles/global_styles.dart'
;
import
'package:flutter_localizations/flutter_localizations.dart'
;
import
'package:intl/intl.dart'
;
class
TopCard
extends
StatelessWidget
{
final
String
name
;
final
String
tema
;
const
TopCard
({
this
.
name
,
this
.
tema
});
@override
Widget
build
(
BuildContext
context
)
{
DateTime
__data
=
new
DateTime
.
now
();
return
Container
(
padding:
EdgeInsets
.
only
(
top:
8
,
bottom:
0
,
left:
24
,
right:
24
),
decoration:
BoxDecoration
(
color:
primaryFaded
,
boxShadow:
cardBoxShadow
,
borderRadius:
BorderRadiusDirectional
.
only
(
bottomStart:
Radius
.
circular
(
25
),
bottomEnd:
Radius
.
circular
(
25
))),
alignment:
Alignment
.
center
,
width:
double
.
infinity
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.25
,
child:
SafeArea
(
child:
SizedBox
(
child:
Container
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
<
Widget
>[
Column
(
children:
[
Container
(
child:
CircleAvatar
(
backgroundImage:
AssetImage
(
'images/avatar.png'
),
radius:
40
,
),
),
],
),
Column
(
children:
[
Container
(
child:
Column
(
children:
[
Text
.
rich
(
TextSpan
(
text:
'Olá,'
,
style:
TextStyle
(
color:
darkGreen
,
fontSize:
20
),
children:
<
TextSpan
>[
TextSpan
(
text:
'
$name
'
,
style:
TextStyle
(
color:
darkGreen
,
fontSize:
20
,
fontWeight:
FontWeight
.
bold
),
),
],
),
),
Text
(
"Semana Da Arte"
,
style:
TextStyle
(
color:
Colors
.
black38
,
fontSize:
15
),
)
],
),
)
],
),
Column
(
children:
[
Container
(
//color: Colors.teal.shade200,
height:
80
,
width:
80
,
decoration:
BoxDecoration
(
color:
Colors
.
teal
.
shade200
,
borderRadius:
BorderRadius
.
circular
(
10
)),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
DateFormat
(
"dd"
).
format
(
__data
),
style:
TextStyle
(
fontSize:
30
,
),
),
],
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
DateFormat
(
"EEE"
,
"pt_BR"
).
format
(
__data
),
style:
TextStyle
(
fontSize:
20
,
),
),
],
),
],
),
)
],
),
/*Container(
width: 80,
height: 80,
child: Image.asset('images/teste.png'),
margin: EdgeInsets.all(10.0),
),
Text(
'Olá,',
style: TextStyle(color: darkGreen, fontSize: 20),
textAlign: TextAlign.center,
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
Text(
' $name!',
style: TextStyle(
color: darkGreen, fontSize: 20, fontWeight: FontWeight.bold),
textAlign: TextAlign.center,
maxLines: 2,
overflow: TextOverflow.ellipsis,
),*/
]),
),
),
),
);
}
}
This diff is collapsed.
Click to expand it.
lib/components/weekday_tile.dart
View file @
5d5e755b
...
...
@@ -8,8 +8,10 @@ class WeekdayTile extends StatefulWidget {
final
String
dayName
;
final
bool
isLast
;
final
bool
isToday
;
final
Function
callback
;
WeekdayTile
({
this
.
dayNumber
,
this
.
dayName
,
this
.
isLast
,
this
.
isToday
});
WeekdayTile
(
{
this
.
dayNumber
,
this
.
dayName
,
this
.
isLast
,
this
.
isToday
,
this
.
callback
});
@override
_WeekdayTileState
createState
()
=>
_WeekdayTileState
();
...
...
@@ -20,14 +22,23 @@ class _WeekdayTileState extends State<WeekdayTile> {
String
dayName
;
bool
isLast
;
bool
isToday
;
Function
callback
;
void
changeDay
()
{
setState
(()
{
this
.
callback
(
dayNumber
-
1
);
this
.
isToday
=
this
.
isToday
?
false
:
true
;
});
}
@override
void
initState
()
{
super
.
initState
();
dayNumber
=
widget
.
dayNumber
;
dayName
=
widget
.
dayName
;
isLast
=
widget
.
isLast
;
isToday
=
widget
.
isToday
;
this
.
dayNumber
=
widget
.
dayNumber
;
this
.
dayName
=
widget
.
dayName
;
this
.
isLast
=
widget
.
isLast
;
this
.
isToday
=
widget
.
isToday
;
this
.
callback
=
widget
.
callback
;
}
@override
...
...
@@ -51,7 +62,7 @@ class _WeekdayTileState extends State<WeekdayTile> {
}
}),
),
onPressed:
()
=>
print
(
'Tapped
$dayNumber
$dayName
button!'
),
onPressed:
()
=>
changeDay
(
),
child:
Padding
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
0
),
child:
Column
(
...
...
This diff is collapsed.
Click to expand it.
lib/components/weekdays_card.dart
View file @
5d5e755b
...
...
@@ -3,10 +3,57 @@ import 'package:notar_e_anotar_app/components/weekday_tile.dart';
import
'package:notar_e_anotar_app/styles/global_styles.dart'
;
import
'package:notar_e_anotar_app/utils/constants.dart'
;
class
WeekdaysCard
extends
StatelessWidget
{
const
WeekdaysCard
({
Key
key
,
})
:
super
(
key:
key
);
class
WeekdaysCard
extends
StatefulWidget
{
final
Function
callback
;
const
WeekdaysCard
({
this
.
callback
});
@override
_WeekdaysCardState
createState
()
=>
_WeekdaysCardState
();
}
class
_WeekdaysCardState
extends
State
<
WeekdaysCard
>
{
int
selectedDay
=
0
;
List
<
WeekdayTile
>
weekdaysList
;
Function
callback
;
@override
void
initState
()
{
super
.
initState
();
this
.
selectedDay
=
0
;
this
.
weekdaysList
=
List
.
generate
(
7
,
(
index
)
=>
WeekdayTile
(
dayNumber:
index
+
1
,
dayName:
shortWeekdaysName
[
index
],
isLast:
index
==
6
?
true
:
false
,
isToday:
index
==
selectedDay
?
true
:
false
,
callback:
changeSelectedDay
,
));
this
.
callback
=
widget
.
callback
;
}
void
regenerateList
(
int
selectedDay
)
{
this
.
weekdaysList
=
List
.
generate
(
7
,
(
index
)
=>
WeekdayTile
(
dayNumber:
index
+
1
,
dayName:
shortWeekdaysName
[
index
],
isLast:
index
==
6
?
true
:
false
,
isToday:
index
==
selectedDay
?
true
:
false
,
callback:
changeSelectedDay
,
));
setState
(()
{});
}
void
changeSelectedDay
(
int
dayNumber
)
{
setState
(()
{
this
.
callback
(
dayNumber
);
this
.
selectedDay
=
dayNumber
;
});
regenerateList
(
dayNumber
);
}
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -35,15 +82,7 @@ class WeekdaysCard extends StatelessWidget {
scrollDirection:
Axis
.
horizontal
,
child:
Container
(
clipBehavior:
Clip
.
none
,
child:
Row
(
children:
List
.
generate
(
7
,
(
index
)
=>
WeekdayTile
(
dayNumber:
index
+
1
,
dayName:
shortWeekdaysName
[
index
],
isLast:
index
==
6
?
true
:
false
,
isToday:
index
==
0
?
true
:
false
,
))),
child:
Row
(
children:
weekdaysList
),
),
),
)
...
...
This diff is collapsed.
Click to expand it.
lib/main.dart
View file @
5d5e755b
import
'package:flutter/material.dart'
;
import
'package:flutter_localizations/flutter_localizations.dart'
;
import
'package:notar_e_anotar_app/pages/onboarding.dart'
;
import
'package:notar_e_anotar_app/styles/app_theme.dart'
;
...
...
@@ -11,6 +12,11 @@ class MyApp extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
return
MaterialApp
(
localizationsDelegates:
[
GlobalMaterialLocalizations
.
delegate
,
GlobalWidgetsLocalizations
.
delegate
],
supportedLocales:
[
const
Locale
(
'pt'
,
'BR'
)],
title:
'Notar & Anotar'
,
theme:
appTheme
,
home:
Onboarding
(
title:
'Onboarding'
),
...
...
This diff is collapsed.
Click to expand it.
lib/models/additional_info.dart
View file @
5d5e755b
import
'package:flutter/material.dart'
;
part of
swagger
.
api
;
class
AdditionalInfo
{
String
name
;
...
...
This diff is collapsed.
Click to expand it.
lib/models/mood.dart
View file @
5d5e755b
import
'package:flutter/material.dart'
;
import
'package:objectid/objectid.dart'
;
part of
swagger
.
api
;
class
Mood
{
String
id
;
...
...
This diff is collapsed.
Click to expand it.
lib/models/routine_data.dart
View file @
5d5e755b
import
'package:flutter/material.dart'
;
import
'package:objectid/objectid.dart'
;
import
'additional_info.dart'
;
import
'mood.dart'
;
part of
swagger
.
api
;
class
RoutineData
{
String
id
;
...
...
This diff is collapsed.
Click to expand it.
lib/models/routine_day.dart
View file @
5d5e755b
import
'package:flutter/material.dart'
;
import
'package:notar_e_anotar_app/models/routine_data.dart'
;
import
'package:notar_e_anotar_app/models/task.dart'
;
import
'package:objectid/objectid.dart'
;
part of
swagger
.
api
;
class
RoutineDay
{
String
id
;
...
...
This diff is collapsed.
Click to expand it.
lib/models/routine_plan.dart
View file @
5d5e755b
import
'package:flutter/material.dart'
;
import
'package:notar_e_anotar_app/models/subject.dart'
;
import
'package:objectid/objectid.dart'
;
part of
swagger
.
api
;
class
RoutinePlan
{
String
id
;
...
...
@@ -24,7 +22,11 @@ class RoutinePlan {
}
Map
<
String
,
dynamic
>
toJson
()
{
return
{
'id'
:
id
,
'number_of_weeks'
:
numberOfWeeks
,
'subjects'
:
subjects
};
return
{
'id'
:
id
,
'numberOfWeeks'
:
numberOfWeeks
,
'subjects'
:
Subject
.
listToJson
(
subjects
)
};
}
static
List
<
RoutinePlan
>
listFromJson
(
List
<
dynamic
>
json
)
{
...
...
This diff is collapsed.
Click to expand it.
lib/models/subject.dart
View file @
5d5e755b
import
'package:flutter/material.dart'
;
import
'package:objectid/objectid.dart'
;
part of
swagger
.
api
;
class
Subject
{
String
id
;
...
...
@@ -24,6 +23,14 @@ class Subject {
return
{
'id'
:
id
,
'name'
:
name
};
}
static
List
<
Map
<
String
,
dynamic
>>
listToJson
(
List
<
Subject
>
subjects
)
{
var
list
=
List
<
Map
<
String
,
dynamic
>>();
for
(
Subject
subject
in
subjects
)
{
list
.
add
(
subject
.
toJson
());
}
return
list
;
}
static
List
<
Subject
>
listFromJson
(
List
<
dynamic
>
json
)
{
return
json
==
null
?
new
List
<
Subject
>()
...
...
This diff is collapsed.
Click to expand it.
lib/models/task.dart
View file @
5d5e755b
import
'package:flutter/material.dart'
;
import
'package:objectid/objectid.dart'
;
part of
swagger
.
api
;
class
Task
{
String
id
;
...
...
This diff is collapsed.
Click to expand it.
lib/models/user.dart
View file @
5d5e755b
import
'package:flutter/material.dart'
;
import
'package:objectid/objectid.dart'
;
part of
swagger
.
api
;
class
User
{
String
id
;
...
...
This diff is collapsed.
Click to expand it.
lib/models/weekly_routine.dart
View file @
5d5e755b
import
'package:flutter/material.dart'
;
import
'package:notar_e_anotar_app/models/routine_day.dart'
;
import
'package:objectid/objectid.dart'
;
part of
swagger
.
api
;
class
WeeklyRoutine
{
String
id
;
...
...
This diff is collapsed.
Click to expand it.
lib/pages/home_page.dart
View file @
5d5e755b
import
'package:flutter/material.dart'
;
import
'package:notar_e_anotar_app/widgets/button_widget.dart'
;
import
'package:notar_e_anotar_app/components/task_card.dart'
;
import
'package:notar_e_anotar_app/components/top_card_user.dart'
;
import
'package:notar_e_anotar_app/pages/registration_activity.dart'
;
import
'package:notar_e_anotar_app/pages/weekly_evaluation.dart'
;
import
'package:notar_e_anotar_app/styles/global_styles.dart'
;
List
<
TaskCard
>
tasks
=
[
TaskCard
(
title:
"DESAFIO DO DIA"
,
description:
"Especificações do desafio aqui"
,
challenge:
false
,
)
];
class
HomePage
extends
StatelessWidget
{
final
String
name
=
"Luana"
;
final
String
tema
=
"Aprender a relaxar"
;
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
Text
(
'título aqui'
),
),
body:
Center
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
'HomePage'
,
style:
TextStyle
(
fontSize:
48
,
fontWeight:
FontWeight
.
bold
),
),
const
SizedBox
(
height:
24
),
ButtonWidget
(
text:
'Voltar'
,
onClicked:
()
=>
goToOnBoarding
(
context
),
),
],
textTheme:
Theme
.
of
(
context
).
textTheme
,
automaticallyImplyLeading:
false
,
title:
Padding
(
padding:
const
EdgeInsets
.
all
(
50
),
child:
Text
(
'Home'
,
style:
TextStyle
(
color:
darkGreen
),
),
),
backgroundColor:
Colors
.
transparent
,
elevation:
0.0
,
),
extendBodyBehindAppBar:
true
,
body:
Column
(
children:
[
TopCard
(
name:
this
.
name
,
tema:
this
.
tema
),
ListBody
(
children:
tasks
)
],
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
Padding
(
padding:
EdgeInsets
.
all
(
20.0
),
child:
ElevatedButton
(
child:
Text
(
'Atividades'
),
style:
ButtonStyle
(
minimumSize:
MaterialStateProperty
.
all
(
Size
(
150
,
44
))),
onPressed:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
RegistrationActivity
()));
})),
Padding
(
padding:
EdgeInsets
.
all
(
20.0
),
child:
ElevatedButton
(
child:
Text
(
'Avaliação'
),
style:
ButtonStyle
(
minimumSize:
MaterialStateProperty
.
all
(
Size
(
150
,
44
)),
),
onPressed:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
WeeklyEvaluation
()));
})),
],
),
);
}
void
goToOnBoarding
(
context
)
=>
print
(
"Tapped button"
);
void
goToOnBoarding
(
context
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
RegistrationActivity
()));
}
}
This diff is collapsed.
Click to expand it.
lib/pages/login_page.dart
View file @
5d5e755b
import
'package:flutter/material.dart'
;
import
'package:notar_e_anotar_app/pages/register_page.dart'
;
import
'package:notar_e_anotar_app/pages/routine_period_selection.dart'
;
import
'package:notar_e_anotar_app/styles/global_styles.dart'
;
import
'package:notar_e_anotar_app/widgets/secondary_button.dart'
;
...
...
@@ -90,11 +91,17 @@ class LoginPage extends StatelessWidget {
Text
(
"Não possui conta? "
,
style:
TextStyle
(
color:
primaryFaded
,
fontSize:
18
)),
Text
(
"Registre-se"
,
new
GestureDetector
(
onTap:
()
{
this
.
goToRegister
(
context
);
},
child:
Text
(
"Registre-se"
,
style:
TextStyle
(
color:
primaryFaded
,
fontSize:
18
,
fontWeight:
FontWeight
.
bold
)),
fontWeight:
FontWeight
.
bold
),
)
),
],
),
SizedBox
(
height:
36
)
...
...
@@ -109,4 +116,7 @@ class LoginPage extends StatelessWidget {
void
goToHomePage
(
context
)
=>
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
RoutinePeriodSelection
()));
void
goToRegister
(
context
)
=>
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
RegisterPage
()));
}
This diff is collapsed.
Click to expand it.
lib/pages/register_page.dart
0 → 100644
View file @
5d5e755b
import
'package:flutter/material.dart'
;
import
'package:notar_e_anotar_app/pages/routine_period_selection.dart'
;
import
'package:notar_e_anotar_app/styles/global_styles.dart'
;
import
'package:notar_e_anotar_app/widgets/button_widget.dart'
;
class
RegisterPage
extends
StatelessWidget
{
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
body:
Column
(
mainAxisSize:
MainAxisSize
.
max
,
mainAxisAlignment:
MainAxisAlignment
.
end
,
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
children:
[
Padding
(
padding:
EdgeInsets
.
only
(
left:
16
,
top:
42
),
child:
Align
(
alignment:
Alignment
.
topLeft
,
child:
Row
(
children:
[
GestureDetector
(
onTap:
()
=>
{
Navigator
.
of
(
context
).
pop
()
},
child:
Icon
(
Icons
.
arrow_back
,
color:
primary
,
),
),
SizedBox
(
width:
16
),
Text
(
"Cadastro de usuário"
,
style:
TextStyle
(
color:
primary
,
fontSize:
24
))
],
)
)
),
Padding
(
padding:
EdgeInsets
.
only
(
left:
16
,
top:
24
),
child:
Align
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
"Faça seu cadastro abaixo"
,
style:
TextStyle
(
color:
grey
,
fontSize:
18
)))
),
Expanded
(
child:
Container
(
margin:
const
EdgeInsets
.
only
(
top:
4
),
color:
Colors
.
transparent
,
child:
Container
(
padding:
EdgeInsets
.
only
(
left:
16
,
right:
16
),
decoration:
BoxDecoration
(
color:
backgroundGrey
,
borderRadius:
BorderRadius
.
only
(
topLeft:
const
Radius
.
circular
(
24.0
),
topRight:
const
Radius
.
circular
(
24.0
),
)),
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
children:
[
SizedBox
(
height:
16
),
TextFormField
(
cursorColor:
Theme
.
of
(
context
).
cursorColor
,
style:
TextStyle
(
color:
primary
),
decoration:
InputDecoration
(
labelText:
'Nome do responsável'
,
labelStyle:
TextStyle
(
color:
primary
,
),
filled:
true
,
fillColor:
primaryFaded
,
enabledBorder:
UnderlineInputBorder
(
borderSide:
BorderSide
(
color:
primary
),
),
),
),
SizedBox
(
height:
12
),
TextFormField
(
cursorColor:
Theme
.
of
(
context
).
cursorColor
,
style:
TextStyle
(
color:
primary
),
decoration:
InputDecoration
(
labelText:
'Sobrenome do responsável'
,
labelStyle:
TextStyle
(
color:
primary
,
),
filled:
true
,
fillColor:
primaryFaded
,
enabledBorder:
UnderlineInputBorder
(
borderSide:
BorderSide
(
color:
primary
),
),
),
),
SizedBox
(
height:
12
),
TextFormField
(
cursorColor:
Theme
.
of
(
context
).
cursorColor
,
style:
TextStyle
(
color:
primary
),
decoration:
InputDecoration
(
labelText:
'Nome do dependente'
,
labelStyle:
TextStyle
(
color:
primary
,
),
filled:
true
,
fillColor:
primaryFaded
,
enabledBorder:
UnderlineInputBorder
(
borderSide:
BorderSide
(
color:
primary
),
),
),
),
SizedBox
(
height:
12
),
TextFormField
(
cursorColor:
Theme
.
of
(
context
).
cursorColor
,
style:
TextStyle
(
color:
primary
),
decoration:
InputDecoration
(
labelText:
'E-mail'
,
labelStyle:
TextStyle
(
color:
primary
,
),
filled:
true
,
fillColor:
primaryFaded
,
enabledBorder:
UnderlineInputBorder
(
borderSide:
BorderSide
(
color:
primary
),
),
),
),
SizedBox
(
height:
12
),
TextFormField
(
obscureText:
true
,
cursorColor:
Theme
.
of
(
context
).
cursorColor
,
style:
TextStyle
(
color:
primary
),
decoration:
InputDecoration
(
labelText:
'Senha'
,
suffixIcon:
Icon
(
Icons
.
remove_red_eye
,
color:
primary
,
),
labelStyle:
TextStyle
(
color:
Theme
.
of
(
context
).
primaryColor
),
filled:
true
,
fillColor:
primaryFaded
,
enabledBorder:
UnderlineInputBorder
(
borderSide:
BorderSide
(
color:
Theme
.
of
(
context
).
primaryColor
)),
),
),
SizedBox
(
height:
16
),
],
),
)
)
)
),
Container
(
color:
backgroundWhite
,
child:
Padding
(
padding:
EdgeInsets
.
all
(
16
),
child:
Row
(
children:
[
Expanded
(
child:
ButtonWidget
(
text:
'Finalizar'
,
onClicked:
()
=>
goToHomePage
(
context
),
),
)
],
),
),
)
],
),
);
}
void
goToHomePage
(
context
)
=>
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
RoutinePeriodSelection
()));
}
This diff is collapsed.
Click to expand it.
Prev
1
2
3
Next
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