timetable improvements

This commit is contained in:
Kima 2024-01-02 23:10:36 +01:00
parent 45bf766d1c
commit 0eabf19d23
2 changed files with 90 additions and 37 deletions

View File

@ -269,7 +269,7 @@ class LessonTile extends StatelessWidget {
// Current lesson indicator // Current lesson indicator
Transform.translate( Transform.translate(
offset: const Offset(-12.0, -2.0), offset: const Offset(-22.0, -1.0),
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: fillLeading color: fillLeading

View File

@ -1,6 +1,7 @@
import 'dart:math'; import 'dart:math';
import 'package:animations/animations.dart'; import 'package:animations/animations.dart';
import 'package:filcnaplo/api/providers/update_provider.dart'; import 'package:filcnaplo/api/providers/update_provider.dart';
import 'package:filcnaplo/models/settings.dart';
import 'package:filcnaplo/utils/format.dart'; import 'package:filcnaplo/utils/format.dart';
import 'package:filcnaplo_kreta_api/client/client.dart'; import 'package:filcnaplo_kreta_api/client/client.dart';
import 'package:filcnaplo_kreta_api/models/week.dart'; import 'package:filcnaplo_kreta_api/models/week.dart';
@ -498,14 +499,21 @@ class TimetablePageState extends State<TimetablePage>
BorderRadius.circular( BorderRadius.circular(
16.0), 16.0),
), ),
child: Row(children: [ child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Row(
children: [
Container( Container(
padding: padding:
const EdgeInsets const EdgeInsets
.symmetric( .symmetric(
horizontal: horizontal:
10.0, 8.0,
vertical: 3.0), vertical:
2.5),
decoration: decoration:
BoxDecoration( BoxDecoration(
borderRadius: borderRadius:
@ -520,13 +528,17 @@ class TimetablePageState extends State<TimetablePage>
), ),
child: Text( child: Text(
'break'.i18n, 'break'.i18n,
style: TextStyle( style:
TextStyle(
color: Theme.of( color: Theme.of(
context) context)
.scaffoldBackgroundColor, .scaffoldBackgroundColor,
fontSize: 13.0, fontSize:
12.5,
fontWeight: fontWeight:
FontWeight.w500, FontWeight
.w500,
height: 1.1,
), ),
), ),
), ),
@ -534,8 +546,34 @@ class TimetablePageState extends State<TimetablePage>
width: 10.0, width: 10.0,
), ),
Text( Text(
'${before.end.hour}:${before.end.minute} - ${lesson.start.hour}:${lesson.start.minute}'), '${before.end.hour}:${before.end.minute} - ${lesson.start.hour}:${lesson.start.minute}',
]), style:
const TextStyle(
fontSize: 12.5,
fontWeight:
FontWeight
.w500,
),
),
],
),
if (DateTime.now()
.isBefore(lesson
.start) &&
DateTime.now()
.isAfter(
before.end))
Dot(
color: Theme.of(
context)
.colorScheme
.secondary
.withOpacity(
.5),
size: 10.0,
)
],
),
), ),
), ),
Padding( Padding(
@ -552,6 +590,21 @@ class TimetablePageState extends State<TimetablePage>
.symmetric( .symmetric(
horizontal: 6.0), horizontal: 6.0),
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [
if (Provider.of<
SettingsProvider>(
context,
listen: false)
.shadowEffect)
BoxShadow(
offset: const Offset(
0, 21),
blurRadius: 23.0,
color:
Theme.of(context)
.shadowColor,
)
],
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme
.background, .background,
@ -692,7 +745,7 @@ class TimetablePageState extends State<TimetablePage>
.toString(), .toString(),
style: TextStyle( style: TextStyle(
height: 1.0, height: 1.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w500,
fontSize: 17.0, fontSize: 17.0,
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme