Commit 66072505 authored by Thiago Nitschke Simões's avatar Thiago Nitschke Simões
Browse files

Implement buttons themes + place them on the page

parent 48590308
Showing with 92 additions and 26 deletions
+92 -26
......@@ -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())),
),
)
],
));
),
),
);
}
}
......@@ -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.
......
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