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
66072505
Commit
66072505
authored
4 years ago
by
Thiago Nitschke Simões
Browse files
Options
Download
Email Patches
Plain Diff
Implement buttons themes + place them on the page
parent
48590308
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/pages/weekly_routine_registration.dart
+42
-24
lib/pages/weekly_routine_registration.dart
lib/styles/app_theme.dart
+50
-2
lib/styles/app_theme.dart
with
92 additions
and
26 deletions
+92
-26
lib/pages/weekly_routine_registration.dart
View file @
66072505
...
...
@@ -8,32 +8,50 @@ class WeeklyRoutineRegistration extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
textTheme:
Theme
.
of
(
context
).
textTheme
,
title:
Text
(
'1ª Semana'
),
),
backgroundColor:
backgroundGrey
,
body:
Column
(
mainAxisSize:
MainAxisSize
.
max
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
appBar:
AppBar
(
textTheme:
Theme
.
of
(
context
).
textTheme
,
title:
Text
(
'1ª Semana'
),
),
backgroundColor:
backgroundGrey
,
body:
Column
(
mainAxisSize:
MainAxisSize
.
max
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
WeekdaysCard
(),
Padding
(
padding:
EdgeInsets
.
only
(
top:
16
,
left:
16
,
right:
16
,
bottom:
5
),
child:
Text
(
'TAREFAS E DESAFIOS'
,
textAlign:
TextAlign
.
start
,
style:
Theme
.
of
(
context
).
textTheme
.
headline5
),
),
Expanded
(
child:
SingleChildScrollView
(
scrollDirection:
Axis
.
vertical
,
physics:
BouncingScrollPhysics
(),
child:
ListBody
(
children:
List
.
generate
(
7
,
(
index
)
=>
TaskCard
())),
),
)
],
),
bottomSheet:
Padding
(
padding:
EdgeInsets
.
symmetric
(
vertical:
16
,
horizontal:
32
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
WeekdaysCard
(),
Padding
(
padding:
EdgeInsets
.
only
(
top:
16
,
left:
16
,
right:
16
,
bottom:
5
),
child:
Text
(
'TAREFAS E DESAFIOS'
,
textAlign:
TextAlign
.
start
,
style:
Theme
.
of
(
context
).
textTheme
.
headline5
),
OutlinedButton
(
child:
Text
(
'CANCELAR'
),
onPressed:
()
=>
print
(
'Tapped Cancel button!'
),
),
ElevatedButton
(
child:
Text
(
'CONFIRMAR'
),
onPressed:
()
=>
print
(
'Tapped Confirm button!'
),
),
Expanded
(
child:
SingleChildScrollView
(
scrollDirection:
Axis
.
vertical
,
physics:
BouncingScrollPhysics
(),
child:
ListBody
(
children:
List
.
generate
(
7
,
(
index
)
=>
TaskCard
())),
),
)
],
));
),
),
);
}
}
This diff is collapsed.
Click to expand it.
lib/styles/app_theme.dart
View file @
66072505
...
...
@@ -15,6 +15,9 @@ final appTheme = ThemeData(
foregroundColor:
primary
,
iconTheme:
IconThemeData
(
color:
primary
)),
// Define the default font family.
fontFamily:
'Baloo 2'
,
visualDensity:
VisualDensity
.
standard
,
cardTheme:
CardTheme
(
clipBehavior:
Clip
.
none
,
...
...
@@ -23,9 +26,54 @@ final appTheme = ThemeData(
color:
Colors
.
white
,
margin:
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
16
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
10
))),
bottomSheetTheme:
BottomSheetThemeData
(
backgroundColor:
Colors
.
white
,
elevation:
3.0
,
modalElevation:
3.0
,
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
10
),
topRight:
Radius
.
circular
(
10
),
),
)),
// Define the default font family.
fontFamily:
'Baloo 2'
,
elevatedButtonTheme:
ElevatedButtonThemeData
(
style:
ButtonStyle
(
visualDensity:
VisualDensity
.
standard
,
minimumSize:
MaterialStateProperty
.
all
(
Size
(
136
,
44
)),
backgroundColor:
MaterialStateProperty
.
resolveWith
((
states
)
{
if
(
states
.
contains
(
MaterialState
.
pressed
))
{
return
primaryAccent
;
}
else
{
return
primaryDark
;
}
}),
overlayColor:
MaterialStateProperty
.
all
(
primaryAccent
),
textStyle:
MaterialStateProperty
.
all
(
TextStyle
(
fontFamily:
'Baloo 2'
,
letterSpacing:
1.25
,
fontWeight:
FontWeight
.
w500
,
fontSize:
14.0
)),
)),
outlinedButtonTheme:
OutlinedButtonThemeData
(
style:
ButtonStyle
(
visualDensity:
VisualDensity
.
standard
,
minimumSize:
MaterialStateProperty
.
all
(
Size
(
136
,
44
)),
overlayColor:
MaterialStateProperty
.
all
(
primaryAccent
),
foregroundColor:
MaterialStateProperty
.
resolveWith
((
states
)
{
if
(
states
.
contains
(
MaterialState
.
pressed
))
{
return
primaryAccent
;
}
else
{
return
primaryDark
;
}
}),
side:
MaterialStateProperty
.
all
(
BorderSide
(
color:
primary
)),
textStyle:
MaterialStateProperty
.
all
(
TextStyle
(
fontFamily:
'Baloo 2'
,
letterSpacing:
1.25
,
fontWeight:
FontWeight
.
w500
,
fontSize:
14.0
)),
)),
// Define the default TextTheme. Use this to specify the default
// text styling for headlines, titles, bodies of text, and more.
...
...
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