Skip to content
Snippets Groups Projects
Commit 43308f67 authored by Theo Wiese's avatar Theo Wiese
Browse files

Fix styling regressions from sdk upgrade

parent 685bc8a8
No related branches found
No related tags found
No related merge requests found
import 'package:flutter/material.dart';
const appName = 'onTime';
// final scheme = ColorScheme.fromSwatch(primarySwatch: Colors.blue);
final scheme = ColorScheme.fromSeed(seedColor: Colors.pink);
const passedTimeOverlayColor = Colors.black26;
......
import 'package:flutter/material.dart';
import '../context.dart';
import '../util/simultaneous.dart';
import '../untis/lesson.dart';
import '../util/simultaneous.dart';
import 'lesson_dialog.dart';
import 'lesson_label.dart';
......@@ -60,6 +60,7 @@ class LessonWidget extends StatelessWidget {
horizontal: 4,
vertical: 8,
),
alignment: Alignment.center,
child: LessonLabel(lesson: lesson),
),
),
......
......@@ -19,13 +19,8 @@ class LessonLabel extends StatelessWidget {
text: room,
style: const TextStyle(fontWeight: FontWeight.bold),
),
const TextSpan(text: '\n\n'),
WidgetSpan(
child: Text(
lecture.substring(0, lecture.length - 5),
style: const TextStyle(overflow: TextOverflow.ellipsis),
)),
TextSpan(text: lecture.substring(lecture.length - 5)),
const TextSpan(text: '\n'),
TextSpan(text: lecture),
],
style: Theme.of(context).primaryTextTheme.bodySmall!,
),
......
......@@ -98,30 +98,27 @@ class _TimetableState extends State<Timetable> {
: ScrollDecelerationRate.fast,
),
children: [
Padding(
padding: const EdgeInsets.symmetric(vertical: 16),
child: Stack(
children: [
...Period.defaultPeriods.map(
(period) => PeriodBackground(period),
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(Timetable.weekdayCount, (index) {
final lessons = getMergedLessonsOfDay(index);
final date = getDateAtWeekdayIndex(index);
return Expanded(
child: WeekdayContent(
date: date,
lessons: lessons,
appContext: widget.appContext,
),
);
}),
),
],
),
Stack(
children: [
...Period.defaultPeriods.map(
(period) => PeriodBackground(period),
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(Timetable.weekdayCount, (index) {
final lessons = getMergedLessonsOfDay(index);
final date = getDateAtWeekdayIndex(index);
return Expanded(
child: WeekdayContent(
date: date,
lessons: lessons,
appContext: widget.appContext,
),
);
}),
),
],
),
],
),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment