-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/json-serialization
- Loading branch information
Showing
18 changed files
with
196 additions
and
167 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
version: 2 | ||
|
||
enable-beta-ecosystems: true | ||
updates: | ||
- package-ecosystem: "pub" | ||
directory: "/uni" | ||
schedule: | ||
interval: "weekly" | ||
interval: "daily" | ||
ignore: | ||
- dependency-name: "*" | ||
update-types: ["version-update:semver-patch"] | ||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
1.7.36+226 | ||
1.7.42+232 |
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
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,48 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:provider/provider.dart'; | ||
import 'package:uni/model/entities/app_locale.dart'; | ||
import 'package:uni/model/entities/exam.dart'; | ||
import 'package:uni/view/common_widgets/date_rectangle.dart'; | ||
import 'package:uni/view/common_widgets/row_container.dart'; | ||
import 'package:uni/view/exams/widgets/exam_row.dart'; | ||
import 'package:uni/view/locale_notifier.dart'; | ||
|
||
class NextExamsWidget extends StatelessWidget { | ||
const NextExamsWidget({required this.exams, super.key}); | ||
|
||
final List<Exam> exams; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column( | ||
crossAxisAlignment: CrossAxisAlignment.stretch, | ||
children: [ | ||
DateRectangle( | ||
date: exams.isNotEmpty ? getFormattedDate(exams.first, context) : '', | ||
), | ||
Column( | ||
children: exams.map((exam) { | ||
return Padding( | ||
padding: const EdgeInsets.only(bottom: 8), | ||
child: RowContainer( | ||
child: ExamRow( | ||
exam: exam, | ||
teacher: '', | ||
mainPage: true, | ||
onChangeVisibility: () {}, | ||
), | ||
), | ||
); | ||
}).toList(), | ||
), | ||
], | ||
); | ||
} | ||
|
||
String getFormattedDate(Exam exam, BuildContext context) { | ||
final locale = Provider.of<LocaleNotifier>(context).getLocale(); | ||
return locale == AppLocale.pt | ||
? '${exam.weekDay(locale)}, ${exam.begin.day} de ${exam.month(locale)}' | ||
: '${exam.weekDay(locale)}, ${exam.begin.day} ${exam.month(locale)}'; | ||
} | ||
} |
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,44 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:provider/provider.dart'; | ||
import 'package:uni/model/entities/exam.dart'; | ||
import 'package:uni/view/common_widgets/row_container.dart'; | ||
import 'package:uni/view/exams/widgets/exam_title.dart'; | ||
import 'package:uni/view/locale_notifier.dart'; | ||
|
||
class RemainingExamsWidget extends StatelessWidget { | ||
const RemainingExamsWidget({required this.exams, super.key}); | ||
|
||
final List<Exam> exams; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column( | ||
children: exams.map((exam) { | ||
final locale = Provider.of<LocaleNotifier>(context).getLocale(); | ||
return Container( | ||
margin: const EdgeInsets.only(top: 8), | ||
child: RowContainer( | ||
color: Theme.of(context).colorScheme.background, | ||
child: Container( | ||
padding: const EdgeInsets.all(11), | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
children: <Widget>[ | ||
Text( | ||
'${exam.begin.day} ${exam.month(locale)}', | ||
style: Theme.of(context).textTheme.bodyLarge, | ||
), | ||
ExamTitle( | ||
subject: exam.subject, | ||
type: exam.examType, | ||
reverseOrder: true, | ||
), | ||
], | ||
), | ||
), | ||
), | ||
); | ||
}).toList(), | ||
); | ||
} | ||
} |
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
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
Oops, something went wrong.