forked from firka/student-legacy
Merge pull request #65 from sleddev/dev
timetable italics + instituteCode search + theme preview background color
This commit is contained in:
commit
dca01d0ed0
@ -17,6 +17,8 @@ List<School> searchSchools(List<School> all, String pattern) {
|
||||
});
|
||||
|
||||
if (contains == pattern.split(" ").length) results.add(item);
|
||||
|
||||
if (item.instituteCode.toLowerCase().specialChars().contains(pattern)) results.add(item);
|
||||
}
|
||||
|
||||
results.sort((a, b) => a.name.compareTo(b.name));
|
||||
|
@ -337,7 +337,8 @@ class _PremiumCustomAccentColorSettingState
|
||||
0.75
|
||||
],
|
||||
colors: [
|
||||
Theme.of(context).colorScheme.background,
|
||||
settings.customBackgroundColor
|
||||
?? Theme.of(context).colorScheme.background,
|
||||
isBackgroundDifferent
|
||||
? HSVColor.fromColor(Theme.of(context)
|
||||
.colorScheme
|
||||
|
@ -1,4 +1,5 @@
|
||||
import 'package:filcnaplo/helpers/subject.dart';
|
||||
import 'package:filcnaplo/models/settings.dart';
|
||||
import 'package:filcnaplo/theme/colors/colors.dart';
|
||||
import 'package:filcnaplo_kreta_api/controllers/timetable_controller.dart';
|
||||
import 'package:filcnaplo_mobile_ui/common/empty.dart';
|
||||
@ -9,6 +10,7 @@ import 'package:filcnaplo/utils/format.dart';
|
||||
import 'dart:math' as math;
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:i18n_extension/i18n_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class PremiumFSTimetable extends StatefulWidget {
|
||||
const PremiumFSTimetable({Key? key, required this.controller})
|
||||
@ -21,6 +23,8 @@ class PremiumFSTimetable extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _PremiumFSTimetableState extends State<PremiumFSTimetable> {
|
||||
late SettingsProvider settings;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@ -37,6 +41,8 @@ class _PremiumFSTimetableState extends State<PremiumFSTimetable> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
settings = Provider.of<SettingsProvider>(context);
|
||||
|
||||
if (widget.controller.days == null || widget.controller.days!.isEmpty) {
|
||||
return const Center(child: Empty());
|
||||
}
|
||||
@ -174,7 +180,7 @@ class _PremiumFSTimetableState extends State<PremiumFSTimetable> {
|
||||
style: TextStyle(
|
||||
fontStyle: lessons[lessonIndex]
|
||||
.subject
|
||||
.isRenamed
|
||||
.isRenamed && settings.renamedSubjectsItalics
|
||||
? FontStyle.italic
|
||||
: null,
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user