-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ErnestoMoraes/dev
Merge da Dev
- Loading branch information
Showing
10 changed files
with
481 additions
and
8 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import 'package:academico_mobile/app/pages/daily/widgets/list_semester.dart'; | ||
import 'package:academico_mobile/app/pages/daily/widgets/switcher.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
import '../../core/ui/styles/text_styles.dart'; | ||
|
||
class DailyPage extends StatelessWidget { | ||
const DailyPage({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar( | ||
title: Text( | ||
'Meus Diários', | ||
style: TextStyles.instance.labelPage, | ||
), | ||
automaticallyImplyLeading: false, | ||
), | ||
body: Column( | ||
children: const [ | ||
Switcher(), | ||
SizedBox(height: 10), | ||
Visibility( | ||
visible: true, | ||
child: ListSemester(), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import 'package:academico_mobile/app/core/ui/styles/colors_app.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class ListSemester extends StatefulWidget { | ||
const ListSemester({super.key}); | ||
|
||
@override | ||
State<ListSemester> createState() => _ListSemesterState(); | ||
} | ||
|
||
class _ListSemesterState extends State<ListSemester> { | ||
|
||
EdgeInsetsGeometry padding = const EdgeInsets.symmetric( | ||
horizontal: 15, | ||
vertical: 10, | ||
); | ||
Color _color1 = ColorsApp.instance.cardwhite; | ||
Color _color2 = ColorsApp.instance.labelblack2; | ||
|
||
void _changeColor() { | ||
setState(() { | ||
if (_color1 == ColorsApp.instance.labelblack2) { | ||
_color1 = ColorsApp.instance.cardwhite; | ||
_color2 = ColorsApp.instance.labelblack2; | ||
} else { | ||
_color1 = ColorsApp.instance.labelblack2; | ||
_color2 = ColorsApp.instance.cardwhite; | ||
} | ||
}); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
// padding: const EdgeInsets.symmetric(horizontal: 10), | ||
margin: const EdgeInsets.symmetric(horizontal: 10), | ||
decoration: BoxDecoration( | ||
color: ColorsApp.instance.labelblack2, | ||
borderRadius: BorderRadius.circular(50), | ||
), | ||
child: Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.start, | ||
children: [ | ||
InkWell( | ||
onTap: () { | ||
_changeColor(); | ||
}, | ||
child: Container( | ||
padding: padding, | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(50), | ||
color: _color1, | ||
), | ||
child: Text( | ||
'Diário atual', | ||
style: TextStyle( | ||
color: ColorsApp.instance.labelblack4, | ||
fontSize: 18, | ||
), | ||
), | ||
), | ||
), | ||
const SizedBox(width: 10), | ||
InkWell( | ||
onTap: () { | ||
_changeColor(); | ||
}, | ||
child: Container( | ||
padding: padding, | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(5), | ||
color: _color2, | ||
), | ||
child: Text( | ||
'Diários anteriores', | ||
style: TextStyle( | ||
color: ColorsApp.instance.labelblack4, | ||
fontSize: 18, | ||
), | ||
), | ||
), | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import 'package:academico_mobile/app/core/ui/styles/colors_app.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class Switcher extends StatefulWidget { | ||
const Switcher({super.key}); | ||
|
||
@override | ||
State<Switcher> createState() => _SwitcherState(); | ||
} | ||
|
||
class _SwitcherState extends State<Switcher> { | ||
|
||
EdgeInsetsGeometry padding = const EdgeInsets.symmetric( | ||
horizontal: 15, | ||
vertical: 10, | ||
); | ||
Color _color1 = ColorsApp.instance.cardwhite; | ||
Color _color2 = ColorsApp.instance.labelblack2; | ||
|
||
void _changeColor() { | ||
setState(() { | ||
if (_color1 == ColorsApp.instance.labelblack2) { | ||
_color1 = ColorsApp.instance.cardwhite; | ||
_color2 = ColorsApp.instance.labelblack2; | ||
} else { | ||
_color1 = ColorsApp.instance.labelblack2; | ||
_color2 = ColorsApp.instance.cardwhite; | ||
} | ||
}); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5), | ||
margin: const EdgeInsets.symmetric(horizontal: 10), | ||
decoration: BoxDecoration( | ||
color: ColorsApp.instance.labelblack2, | ||
borderRadius: BorderRadius.circular(5), | ||
), | ||
child: Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceAround, | ||
children: [ | ||
InkWell( | ||
onTap: () { | ||
_changeColor(); | ||
}, | ||
child: Container( | ||
padding: padding, | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(5), | ||
color: _color1, | ||
), | ||
child: Text( | ||
'Diário atual', | ||
style: TextStyle( | ||
color: ColorsApp.instance.labelblack4, | ||
fontSize: 18, | ||
), | ||
), | ||
), | ||
), | ||
const SizedBox(width: 10), | ||
InkWell( | ||
onTap: () { | ||
_changeColor(); | ||
}, | ||
child: Container( | ||
padding: padding, | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(5), | ||
color: _color2, | ||
), | ||
child: Text( | ||
'Diários anteriores', | ||
style: TextStyle( | ||
color: ColorsApp.instance.labelblack4, | ||
fontSize: 18, | ||
), | ||
), | ||
), | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
import 'dart:ffi'; | ||
|
||
import 'package:academico_mobile/app/core/ui/helpers/size_extensions.dart'; | ||
import 'package:academico_mobile/app/core/ui/styles/colors_app.dart'; | ||
import 'package:academico_mobile/app/core/ui/styles/text_styles.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class HomePage extends StatelessWidget { | ||
const HomePage({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
List<Map<String, String>> listaCards = [ | ||
{ | ||
'title': 'Calendário', | ||
'image': 'assets/images/logos/logo_ifce_preto.png', | ||
'route': '/schedule', | ||
}, | ||
{ | ||
'title': 'Notas', | ||
'image': 'assets/images/logos/logo_ifce_preto.png', | ||
'route': '/schedule', | ||
}, | ||
{ | ||
'title': 'Frequência', | ||
'image': 'assets/images/logos/logo_ifce_preto.png', | ||
'route': '/schedule', | ||
}, | ||
{ | ||
'title': 'Disciplinas', | ||
'image': 'assets/images/logos/logo_ifce_preto.png', | ||
'route': '/schedule', | ||
}, | ||
{ | ||
'title': 'Horários', | ||
'image': 'assets/images/logos/logo_ifce_preto.png', | ||
'route': '/schedule', | ||
}, | ||
{ | ||
'title': 'Histórico', | ||
'image': 'assets/images/logos/logo_ifce_preto.png', | ||
'route': '/schedule', | ||
}, | ||
{ | ||
'title': 'Sair', | ||
'image': 'assets/images/logos/logo_ifce_preto.png', | ||
'route': '/schedule', | ||
}, | ||
]; | ||
return Scaffold( | ||
appBar: AppBar( | ||
title: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
SizedBox(height: context.screenHeight * 0.03), | ||
Text( | ||
'Bem vindo ao Qacademico', | ||
style: TextStyles.instance.texLabelH4, | ||
), | ||
Text( | ||
'Ernesto Moraes', | ||
style: TextStyles.instance.labelPage.copyWith(fontSize: 22), | ||
), | ||
], | ||
), | ||
centerTitle: false, | ||
automaticallyImplyLeading: false, | ||
), | ||
body: Center( | ||
child: Column( | ||
children: [ | ||
SizedBox(height: context.percentHeight(.1)), | ||
Expanded( | ||
child: GridView.builder( | ||
padding: const EdgeInsets.symmetric(horizontal: 20), | ||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( | ||
crossAxisCount: 2, | ||
mainAxisSpacing: 30, | ||
crossAxisSpacing: 30, | ||
), | ||
itemCount: 6, | ||
itemBuilder: (context, index) { | ||
return ElevatedButton( | ||
style: ButtonStyle( | ||
backgroundColor: MaterialStateProperty.all( | ||
ColorsApp.instance.cardwhite), | ||
shape: MaterialStateProperty.all( | ||
RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(5), | ||
), | ||
), | ||
), | ||
onPressed: () { | ||
Navigator.pushNamed(context, listaCards[index]['route']!); | ||
}, | ||
child: Container( | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(5), | ||
), | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
Image.asset( | ||
listaCards[index]['image']!, | ||
fit: BoxFit.cover, | ||
height: context.screenHeight * 0.2, | ||
), | ||
SizedBox(height: context.screenHeight * 0.05), | ||
Text( | ||
listaCards[index]['title']!, | ||
style: TextStyles.instance.texLabelH4.copyWith( | ||
color: ColorsApp.instance.background, | ||
fontWeight: TextStyles | ||
.instance.textExtraBold.fontWeight), | ||
), | ||
], | ||
), | ||
), | ||
); | ||
}, | ||
), | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.