forked from firka/student-legacy
added option to use old popups and some fixes
This commit is contained in:
parent
cd0729fa5e
commit
45ffdff324
@ -53,6 +53,7 @@ const settingsDB = DatabaseStruct("settings", {
|
|||||||
"nav_shadow": int,
|
"nav_shadow": int,
|
||||||
"new_colors": int,
|
"new_colors": int,
|
||||||
"uwu_mode": int,
|
"uwu_mode": int,
|
||||||
|
"new_popups": int,
|
||||||
// quick settings
|
// quick settings
|
||||||
"q_timetable_lesson_num": int, "q_timetable_sub_tiles": int,
|
"q_timetable_lesson_num": int, "q_timetable_sub_tiles": int,
|
||||||
"q_subjects_sub_tiles": int,
|
"q_subjects_sub_tiles": int,
|
||||||
|
@ -106,6 +106,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
bool _navShadow;
|
bool _navShadow;
|
||||||
bool _newColors;
|
bool _newColors;
|
||||||
bool _uwuMode;
|
bool _uwuMode;
|
||||||
|
bool _newPopups;
|
||||||
// quick settings
|
// quick settings
|
||||||
bool _qTimetableLessonNum;
|
bool _qTimetableLessonNum;
|
||||||
bool _qTimetableSubTiles;
|
bool _qTimetableSubTiles;
|
||||||
@ -178,6 +179,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
required bool navShadow,
|
required bool navShadow,
|
||||||
required bool newColors,
|
required bool newColors,
|
||||||
required bool uwuMode,
|
required bool uwuMode,
|
||||||
|
required bool newPopups,
|
||||||
required bool qTimetableLessonNum,
|
required bool qTimetableLessonNum,
|
||||||
required bool qTimetableSubTiles,
|
required bool qTimetableSubTiles,
|
||||||
required bool qSubjectsSubTiles,
|
required bool qSubjectsSubTiles,
|
||||||
@ -247,6 +249,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
_navShadow = navShadow,
|
_navShadow = navShadow,
|
||||||
_newColors = newColors,
|
_newColors = newColors,
|
||||||
_uwuMode = uwuMode,
|
_uwuMode = uwuMode,
|
||||||
|
_newPopups = newPopups,
|
||||||
_qTimetableLessonNum = qTimetableLessonNum,
|
_qTimetableLessonNum = qTimetableLessonNum,
|
||||||
_qTimetableSubTiles = qTimetableSubTiles,
|
_qTimetableSubTiles = qTimetableSubTiles,
|
||||||
_qSubjectsSubTiles = qSubjectsSubTiles;
|
_qSubjectsSubTiles = qSubjectsSubTiles;
|
||||||
@ -335,6 +338,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
navShadow: map['nav_shadow'] == 1,
|
navShadow: map['nav_shadow'] == 1,
|
||||||
newColors: map['new_colors'] == 1,
|
newColors: map['new_colors'] == 1,
|
||||||
uwuMode: map['uwu_mode'] == 1,
|
uwuMode: map['uwu_mode'] == 1,
|
||||||
|
newPopups: map['new_popups'] == 1,
|
||||||
qTimetableLessonNum: map['q_timetable_lesson_num'] == 1,
|
qTimetableLessonNum: map['q_timetable_lesson_num'] == 1,
|
||||||
qTimetableSubTiles: map['q_timetable_sub_tiles'] == 1,
|
qTimetableSubTiles: map['q_timetable_sub_tiles'] == 1,
|
||||||
qSubjectsSubTiles: map['q_subjects_sub_tiles'] == 1,
|
qSubjectsSubTiles: map['q_subjects_sub_tiles'] == 1,
|
||||||
@ -411,6 +415,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
"nav_shadow": _navShadow ? 1 : 0,
|
"nav_shadow": _navShadow ? 1 : 0,
|
||||||
"new_colors": _newColors ? 1 : 0,
|
"new_colors": _newColors ? 1 : 0,
|
||||||
"uwu_mode": _uwuMode ? 1 : 0,
|
"uwu_mode": _uwuMode ? 1 : 0,
|
||||||
|
"new_popups": _newPopups ? 1 : 0,
|
||||||
"q_timetable_lesson_num": _qTimetableLessonNum ? 1 : 0,
|
"q_timetable_lesson_num": _qTimetableLessonNum ? 1 : 0,
|
||||||
"q_timetable_sub_tiles": _qTimetableSubTiles ? 1 : 0,
|
"q_timetable_sub_tiles": _qTimetableSubTiles ? 1 : 0,
|
||||||
"q_subjects_sub_tiles": _qSubjectsSubTiles ? 1 : 0,
|
"q_subjects_sub_tiles": _qSubjectsSubTiles ? 1 : 0,
|
||||||
@ -491,6 +496,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
navShadow: true,
|
navShadow: true,
|
||||||
newColors: true,
|
newColors: true,
|
||||||
uwuMode: false,
|
uwuMode: false,
|
||||||
|
newPopups: true,
|
||||||
qTimetableLessonNum: true,
|
qTimetableLessonNum: true,
|
||||||
qTimetableSubTiles: true,
|
qTimetableSubTiles: true,
|
||||||
qSubjectsSubTiles: true,
|
qSubjectsSubTiles: true,
|
||||||
@ -562,6 +568,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
bool get navShadow => _navShadow;
|
bool get navShadow => _navShadow;
|
||||||
bool get newColors => _newColors;
|
bool get newColors => _newColors;
|
||||||
bool get uwuMode => _uwuMode;
|
bool get uwuMode => _uwuMode;
|
||||||
|
bool get newPopups => _newPopups;
|
||||||
bool get qTimetableLessonNum => _qTimetableLessonNum;
|
bool get qTimetableLessonNum => _qTimetableLessonNum;
|
||||||
bool get qTimetableSubTiles => _qTimetableSubTiles;
|
bool get qTimetableSubTiles => _qTimetableSubTiles;
|
||||||
bool get qSubjectsSubTiles => _qSubjectsSubTiles;
|
bool get qSubjectsSubTiles => _qSubjectsSubTiles;
|
||||||
@ -629,6 +636,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
bool? navShadow,
|
bool? navShadow,
|
||||||
bool? newColors,
|
bool? newColors,
|
||||||
bool? uwuMode,
|
bool? uwuMode,
|
||||||
|
bool? newPopups,
|
||||||
bool? qTimetableLessonNum,
|
bool? qTimetableLessonNum,
|
||||||
bool? qTimetableSubTiles,
|
bool? qTimetableSubTiles,
|
||||||
bool? qSubjectsSubTiles,
|
bool? qSubjectsSubTiles,
|
||||||
@ -817,6 +825,9 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
if (uwuMode != null && uwuMode != _uwuMode) {
|
if (uwuMode != null && uwuMode != _uwuMode) {
|
||||||
_uwuMode = uwuMode;
|
_uwuMode = uwuMode;
|
||||||
}
|
}
|
||||||
|
if (newPopups != null && newPopups != _newPopups) {
|
||||||
|
_newPopups = newPopups;
|
||||||
|
}
|
||||||
if (qTimetableLessonNum != null &&
|
if (qTimetableLessonNum != null &&
|
||||||
qTimetableLessonNum != _qTimetableLessonNum) {
|
qTimetableLessonNum != _qTimetableLessonNum) {
|
||||||
_qTimetableLessonNum = qTimetableLessonNum;
|
_qTimetableLessonNum = qTimetableLessonNum;
|
||||||
|
@ -49,6 +49,8 @@ extension Localization on String {
|
|||||||
"d_npc":
|
"d_npc":
|
||||||
"You're such a non-player character, we couldn't give you a personality.",
|
"You're such a non-player character, we couldn't give you a personality.",
|
||||||
"s_npc": "In-game playtime (hours)",
|
"s_npc": "In-game playtime (hours)",
|
||||||
|
// other
|
||||||
|
"year_index": "Lesson Number",
|
||||||
},
|
},
|
||||||
"hu_hu": {
|
"hu_hu": {
|
||||||
// main
|
// main
|
||||||
@ -96,6 +98,8 @@ extension Localization on String {
|
|||||||
"d_npc":
|
"d_npc":
|
||||||
"Egy akkora nagy non-player character vagy, hogy neked semmilyen személyiség nem jutott ezen kívül.",
|
"Egy akkora nagy non-player character vagy, hogy neked semmilyen személyiség nem jutott ezen kívül.",
|
||||||
"s_npc": "In-game playtime (óra)",
|
"s_npc": "In-game playtime (óra)",
|
||||||
|
// other
|
||||||
|
"year_index": "Éves óraszám",
|
||||||
},
|
},
|
||||||
"de_de": {
|
"de_de": {
|
||||||
// main
|
// main
|
||||||
@ -144,6 +148,8 @@ extension Localization on String {
|
|||||||
"d_npc":
|
"d_npc":
|
||||||
"Du bist einfach so sehr wie ein Computer, dass wir dir nicht einmal eine Persönlichkeit geben konnten.",
|
"Du bist einfach so sehr wie ein Computer, dass wir dir nicht einmal eine Persönlichkeit geben konnten.",
|
||||||
"s_npc": "Spielzeit (Stunden)",
|
"s_npc": "Spielzeit (Stunden)",
|
||||||
|
// other
|
||||||
|
"year_index": "Ordinalzahl",
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,8 +14,11 @@ import 'package:refilc_kreta_api/models/exam.dart';
|
|||||||
import 'package:refilc_kreta_api/models/lesson.dart';
|
import 'package:refilc_kreta_api/models/lesson.dart';
|
||||||
import 'package:refilc_mobile_ui/common/bottom_sheet_menu/rounded_bottom_sheet.dart';
|
import 'package:refilc_mobile_ui/common/bottom_sheet_menu/rounded_bottom_sheet.dart';
|
||||||
import 'package:refilc_mobile_ui/common/round_border_icon.dart';
|
import 'package:refilc_mobile_ui/common/round_border_icon.dart';
|
||||||
|
import 'package:refilc_mobile_ui/common/viewable.dart';
|
||||||
|
import 'package:refilc_mobile_ui/common/widgets/card_handle.dart';
|
||||||
import 'package:refilc_mobile_ui/common/widgets/exam/exam_tile.dart';
|
import 'package:refilc_mobile_ui/common/widgets/exam/exam_tile.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:refilc_mobile_ui/common/widgets/exam/exam_view.dart';
|
||||||
|
|
||||||
class ExamViewable extends StatelessWidget {
|
class ExamViewable extends StatelessWidget {
|
||||||
const ExamViewable(this.exam,
|
const ExamViewable(this.exam,
|
||||||
@ -27,6 +30,7 @@ class ExamViewable extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
if (Provider.of<SettingsProvider>(context).newPopups) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => ExamPopup.show(context: context, exam: exam),
|
onTap: () => ExamPopup.show(context: context, exam: exam),
|
||||||
child: ExamTile(
|
child: ExamTile(
|
||||||
@ -35,14 +39,16 @@ class ExamViewable extends StatelessWidget {
|
|||||||
padding: tilePadding,
|
padding: tilePadding,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
// return Viewable(
|
}
|
||||||
// tile: ExamTile(
|
|
||||||
// exam,
|
return Viewable(
|
||||||
// showSubject: showSubject,
|
tile: ExamTile(
|
||||||
// padding: tilePadding,
|
exam,
|
||||||
// ),
|
showSubject: showSubject,
|
||||||
// view: CardHandle(child: ExamView(exam)),
|
padding: tilePadding,
|
||||||
// );
|
),
|
||||||
|
view: CardHandle(child: ExamView(exam)),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,7 +303,7 @@ class ExamPopup extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'${DateFormat('EEEE, MMM d, H:mm', I18n.locale.countryCode).format(lesson!.start).capital()} - ${DateFormat('H:mm').format(lesson!.end)}',
|
'${DateFormat('MMM d, H:mm', I18n.locale.countryCode).format(lesson!.start).capital()} - ${DateFormat('H:mm').format(lesson!.end)}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color:
|
||||||
AppColors.of(context).text.withOpacity(0.85),
|
AppColors.of(context).text.withOpacity(0.85),
|
||||||
|
@ -13,9 +13,17 @@ import 'package:refilc_kreta_api/models/exam.dart';
|
|||||||
import 'package:refilc_kreta_api/models/lesson.dart';
|
import 'package:refilc_kreta_api/models/lesson.dart';
|
||||||
import 'package:refilc_kreta_api/providers/exam_provider.dart';
|
import 'package:refilc_kreta_api/providers/exam_provider.dart';
|
||||||
import 'package:refilc_mobile_ui/common/bottom_sheet_menu/rounded_bottom_sheet.dart';
|
import 'package:refilc_mobile_ui/common/bottom_sheet_menu/rounded_bottom_sheet.dart';
|
||||||
|
import 'package:refilc_mobile_ui/common/panel/panel_button.dart';
|
||||||
|
import 'package:refilc_mobile_ui/common/personality_card/personality_card.i18n.dart';
|
||||||
import 'package:refilc_mobile_ui/common/round_border_icon.dart';
|
import 'package:refilc_mobile_ui/common/round_border_icon.dart';
|
||||||
import 'package:refilc/ui/widgets/lesson/lesson_tile.dart';
|
import 'package:refilc/ui/widgets/lesson/lesson_tile.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:refilc_mobile_ui/common/viewable.dart';
|
||||||
|
import 'package:refilc_mobile_ui/common/widgets/card_handle.dart';
|
||||||
|
import 'package:refilc_mobile_ui/common/widgets/lesson/lesson_view.dart';
|
||||||
|
import 'package:refilc_plus/models/premium_scopes.dart';
|
||||||
|
import 'package:refilc_plus/providers/plus_provider.dart';
|
||||||
|
import 'package:refilc_plus/ui/mobile/plus/upsell.dart';
|
||||||
|
|
||||||
class LessonViewable extends StatefulWidget {
|
class LessonViewable extends StatefulWidget {
|
||||||
const LessonViewable(
|
const LessonViewable(
|
||||||
@ -62,58 +70,109 @@ class LessonViewableState extends State<LessonViewable> {
|
|||||||
|
|
||||||
if (lsn.subject.id == '' || tile.lesson.isEmpty) return tile;
|
if (lsn.subject.id == '' || tile.lesson.isEmpty) return tile;
|
||||||
|
|
||||||
|
// check if new popup needed
|
||||||
|
if (Provider.of<SettingsProvider>(context).newPopups) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => TimetableLessonPopup.show(
|
onTap: () => TimetableLessonPopup.show(
|
||||||
context: context,
|
context: context,
|
||||||
lesson: lsn,
|
lesson: lsn,
|
||||||
),
|
),
|
||||||
child: LessonTile(
|
child: tile,
|
||||||
lsn,
|
|
||||||
swapDesc: widget.swapDesc,
|
|
||||||
showSubTiles: widget.showSubTiles,
|
|
||||||
// onTap: () => TimetableLessonPopup.show(
|
|
||||||
// context: context,
|
|
||||||
// lesson: lsn,
|
|
||||||
// ),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// return Viewable(
|
return Viewable(
|
||||||
// tile: tile,
|
tile: tile,
|
||||||
// view: CardHandle(child: LessonView(lsn)),
|
view: CardHandle(child: LessonView(lsn)),
|
||||||
// actions: [
|
actions: [
|
||||||
// PanelButton(
|
PanelButton(
|
||||||
// background: true,
|
background: true,
|
||||||
// title: Text(
|
title: Text(
|
||||||
// "edit_lesson".i18n,
|
"edit_lesson".i18n,
|
||||||
// textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
// maxLines: 2,
|
maxLines: 2,
|
||||||
// overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context, rootNavigator: true).pop();
|
||||||
|
|
||||||
|
if (!Provider.of<PlusProvider>(context, listen: false)
|
||||||
|
.hasScope(PremiumScopes.timetableNotes)) {
|
||||||
|
PlusLockedFeaturePopup.show(
|
||||||
|
context: context, feature: PremiumFeature.timetableNotes);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => StatefulBuilder(builder: (context, setS) {
|
||||||
|
return AlertDialog(
|
||||||
|
shape: const RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(14.0))),
|
||||||
|
title: Text("edit_lesson".i18n),
|
||||||
|
content: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
// description
|
||||||
|
TextField(
|
||||||
|
controller: _descTxt,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: Colors.grey, width: 1.5),
|
||||||
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: Colors.grey, width: 1.5),
|
||||||
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
|
),
|
||||||
|
contentPadding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 12.0),
|
||||||
|
hintText: 'l_desc'.i18n,
|
||||||
|
suffixIcon: IconButton(
|
||||||
|
icon: const Icon(
|
||||||
|
FeatherIcons.x,
|
||||||
|
color: Colors.grey,
|
||||||
|
size: 18.0,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_descTxt.text = '';
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// const SizedBox(
|
||||||
|
// height: 14.0,
|
||||||
// ),
|
// ),
|
||||||
// onPressed: () {
|
// // class
|
||||||
// Navigator.of(context, rootNavigator: true).pop();
|
|
||||||
|
|
||||||
// if (!Provider.of<PlusProvider>(context, listen: false)
|
|
||||||
// .hasScope(PremiumScopes.timetableNotes)) {
|
|
||||||
// PlusLockedFeaturePopup.show(
|
|
||||||
// context: context, feature: PremiumFeature.timetableNotes);
|
|
||||||
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// showDialog(
|
|
||||||
// context: context,
|
|
||||||
// builder: (context) => StatefulBuilder(builder: (context, setS) {
|
|
||||||
// return AlertDialog(
|
|
||||||
// shape: const RoundedRectangleBorder(
|
|
||||||
// borderRadius: BorderRadius.all(Radius.circular(14.0))),
|
|
||||||
// title: Text("edit_lesson".i18n),
|
|
||||||
// content: Column(
|
|
||||||
// mainAxisSize: MainAxisSize.min,
|
|
||||||
// children: [
|
|
||||||
// // description
|
|
||||||
// TextField(
|
// TextField(
|
||||||
// controller: _descTxt,
|
// controller: _descTxt,
|
||||||
|
// onEditingComplete: () async {
|
||||||
|
// // SharedTheme? theme = await shareProvider.getThemeById(
|
||||||
|
// // context,
|
||||||
|
// // id: _paintId.text.replaceAll(' ', ''),
|
||||||
|
// // );
|
||||||
|
|
||||||
|
// // if (theme != null) {
|
||||||
|
// // // set theme variable
|
||||||
|
// // newThemeByID = theme;
|
||||||
|
|
||||||
|
// // _paintId.clear();
|
||||||
|
// // } else {
|
||||||
|
// // ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
// // CustomSnackBar(
|
||||||
|
// // content: Text("theme_not_found".i18n,
|
||||||
|
// // style: const TextStyle(color: Colors.white)),
|
||||||
|
// // backgroundColor: AppColors.of(context).red,
|
||||||
|
// // context: context,
|
||||||
|
// // ),
|
||||||
|
// // );
|
||||||
|
// // }
|
||||||
|
// },
|
||||||
// decoration: InputDecoration(
|
// decoration: InputDecoration(
|
||||||
// border: OutlineInputBorder(
|
// border: OutlineInputBorder(
|
||||||
// borderSide: const BorderSide(
|
// borderSide: const BorderSide(
|
||||||
@ -142,94 +201,38 @@ class LessonViewableState extends State<LessonViewable> {
|
|||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// // const SizedBox(
|
],
|
||||||
// // height: 14.0,
|
),
|
||||||
// // ),
|
actions: [
|
||||||
// // // class
|
TextButton(
|
||||||
// // TextField(
|
child: Text(
|
||||||
// // controller: _descTxt,
|
"cancel".i18n,
|
||||||
// // onEditingComplete: () async {
|
style: const TextStyle(fontWeight: FontWeight.w500),
|
||||||
// // // SharedTheme? theme = await shareProvider.getThemeById(
|
),
|
||||||
// // // context,
|
onPressed: () {
|
||||||
// // // id: _paintId.text.replaceAll(' ', ''),
|
Navigator.of(context).maybePop();
|
||||||
// // // );
|
},
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
child: Text(
|
||||||
|
"done".i18n,
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
saveLesson();
|
||||||
|
|
||||||
// // // if (theme != null) {
|
Navigator.of(context).pop();
|
||||||
// // // // set theme variable
|
setState(() {});
|
||||||
// // // newThemeByID = theme;
|
},
|
||||||
|
),
|
||||||
// // // _paintId.clear();
|
],
|
||||||
// // // } else {
|
);
|
||||||
// // // ScaffoldMessenger.of(context).showSnackBar(
|
}),
|
||||||
// // // CustomSnackBar(
|
);
|
||||||
// // // content: Text("theme_not_found".i18n,
|
},
|
||||||
// // // style: const TextStyle(color: Colors.white)),
|
),
|
||||||
// // // backgroundColor: AppColors.of(context).red,
|
],
|
||||||
// // // context: context,
|
);
|
||||||
// // // ),
|
|
||||||
// // // );
|
|
||||||
// // // }
|
|
||||||
// // },
|
|
||||||
// // decoration: InputDecoration(
|
|
||||||
// // border: OutlineInputBorder(
|
|
||||||
// // borderSide: const BorderSide(
|
|
||||||
// // color: Colors.grey, width: 1.5),
|
|
||||||
// // borderRadius: BorderRadius.circular(12.0),
|
|
||||||
// // ),
|
|
||||||
// // focusedBorder: OutlineInputBorder(
|
|
||||||
// // borderSide: const BorderSide(
|
|
||||||
// // color: Colors.grey, width: 1.5),
|
|
||||||
// // borderRadius: BorderRadius.circular(12.0),
|
|
||||||
// // ),
|
|
||||||
// // contentPadding:
|
|
||||||
// // const EdgeInsets.symmetric(horizontal: 12.0),
|
|
||||||
// // hintText: 'l_desc'.i18n,
|
|
||||||
// // suffixIcon: IconButton(
|
|
||||||
// // icon: const Icon(
|
|
||||||
// // FeatherIcons.x,
|
|
||||||
// // color: Colors.grey,
|
|
||||||
// // size: 18.0,
|
|
||||||
// // ),
|
|
||||||
// // onPressed: () {
|
|
||||||
// // setState(() {
|
|
||||||
// // _descTxt.text = '';
|
|
||||||
// // });
|
|
||||||
// // },
|
|
||||||
// // ),
|
|
||||||
// // ),
|
|
||||||
// // ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// actions: [
|
|
||||||
// TextButton(
|
|
||||||
// child: Text(
|
|
||||||
// "cancel".i18n,
|
|
||||||
// style: const TextStyle(fontWeight: FontWeight.w500),
|
|
||||||
// ),
|
|
||||||
// onPressed: () {
|
|
||||||
// Navigator.of(context).maybePop();
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// TextButton(
|
|
||||||
// child: Text(
|
|
||||||
// "done".i18n,
|
|
||||||
// style: const TextStyle(fontWeight: FontWeight.w500),
|
|
||||||
// ),
|
|
||||||
// onPressed: () async {
|
|
||||||
// saveLesson();
|
|
||||||
|
|
||||||
// Navigator.of(context).pop();
|
|
||||||
// setState(() {});
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// );
|
|
||||||
// }),
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void saveLesson() async {
|
void saveLesson() async {
|
||||||
@ -415,11 +418,9 @@ class TimetableLessonPopup extends StatelessWidget {
|
|||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.background,
|
color: Theme.of(context).colorScheme.background,
|
||||||
borderRadius: BorderRadius.vertical(
|
borderRadius: const BorderRadius.vertical(
|
||||||
top: const Radius.circular(12.0),
|
top: Radius.circular(12.0),
|
||||||
bottom: (lesson.description.replaceAll(' ', '') != '')
|
bottom: Radius.circular(6.0),
|
||||||
? const Radius.circular(6.0)
|
|
||||||
: const Radius.circular(12.0),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
padding: const EdgeInsets.all(14.0),
|
padding: const EdgeInsets.all(14.0),
|
||||||
@ -517,6 +518,34 @@ class TimetableLessonPopup extends StatelessWidget {
|
|||||||
height: 6.0,
|
height: 6.0,
|
||||||
),
|
),
|
||||||
if (lesson.description.replaceAll(' ', '') != '')
|
if (lesson.description.replaceAll(' ', '') != '')
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Theme.of(context).colorScheme.background,
|
||||||
|
borderRadius: const BorderRadius.vertical(
|
||||||
|
top: Radius.circular(6.0),
|
||||||
|
bottom: Radius.circular(6.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: const EdgeInsets.all(14.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
lesson.description,
|
||||||
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
AppColors.of(context).text.withOpacity(0.9),
|
||||||
|
fontSize: 14.0,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 6.0,
|
||||||
|
),
|
||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@ -533,10 +562,9 @@ class TimetableLessonPopup extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
lesson.description,
|
'${'year_index'.i18n}: ${lesson.lessonYearIndex}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color: AppColors.of(context).text.withOpacity(0.9),
|
||||||
AppColors.of(context).text.withOpacity(0.9),
|
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
@ -570,8 +598,12 @@ class TimetableLessonPopup extends StatelessWidget {
|
|||||||
const SizedBox(
|
const SizedBox(
|
||||||
width: 10.0,
|
width: 10.0,
|
||||||
),
|
),
|
||||||
Text(
|
SizedBox(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.5,
|
||||||
|
child: Text(
|
||||||
lessonExam.description.capital(),
|
lessonExam.description.capital(),
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: AppColors.of(context)
|
color: AppColors.of(context)
|
||||||
.text
|
.text
|
||||||
@ -580,17 +612,22 @@ class TimetableLessonPopup extends StatelessWidget {
|
|||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Flexible(
|
||||||
|
child: Text(
|
||||||
lessonExam.mode?.description ?? 'Dolgozat',
|
lessonExam.mode?.description ?? 'Dolgozat',
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color: AppColors.of(context)
|
||||||
AppColors.of(context).text.withOpacity(0.85),
|
.text
|
||||||
|
.withOpacity(0.85),
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user