added option to use old popups and some fixes
This commit is contained in:
@@ -14,8 +14,11 @@ import 'package:refilc_kreta_api/models/exam.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/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:flutter/material.dart';
|
||||
import 'package:refilc_mobile_ui/common/widgets/exam/exam_view.dart';
|
||||
|
||||
class ExamViewable extends StatelessWidget {
|
||||
const ExamViewable(this.exam,
|
||||
@@ -27,22 +30,25 @@ class ExamViewable extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () => ExamPopup.show(context: context, exam: exam),
|
||||
child: ExamTile(
|
||||
if (Provider.of<SettingsProvider>(context).newPopups) {
|
||||
return GestureDetector(
|
||||
onTap: () => ExamPopup.show(context: context, exam: exam),
|
||||
child: ExamTile(
|
||||
exam,
|
||||
showSubject: showSubject,
|
||||
padding: tilePadding,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return Viewable(
|
||||
tile: ExamTile(
|
||||
exam,
|
||||
showSubject: showSubject,
|
||||
padding: tilePadding,
|
||||
),
|
||||
view: CardHandle(child: ExamView(exam)),
|
||||
);
|
||||
// return Viewable(
|
||||
// tile: ExamTile(
|
||||
// exam,
|
||||
// showSubject: showSubject,
|
||||
// padding: tilePadding,
|
||||
// ),
|
||||
// view: CardHandle(child: ExamView(exam)),
|
||||
// );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,7 +303,7 @@ class ExamPopup extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
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(
|
||||
color:
|
||||
AppColors.of(context).text.withOpacity(0.85),
|
||||
|
||||
Reference in New Issue
Block a user