forked from firka/student-legacy
added trip plan to school when clicking livecard in the morning
This commit is contained in:
parent
35dc47fd62
commit
d647776d6c
@ -12,6 +12,7 @@ import 'package:filcnaplo_mobile_ui/pages/home/live_card/live_card_widget.dart';
|
||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
import 'package:i18n_extension/i18n_widget.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:maps_launcher/maps_launcher.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'live_card.i18n.dart';
|
||||
|
||||
@ -52,6 +53,8 @@ class LiveCardStateA extends State<LiveCard> {
|
||||
Widget child;
|
||||
Duration bellDelay = liveCard.delay;
|
||||
|
||||
liveCard.currentState = LiveCardState.morning;
|
||||
|
||||
switch (liveCard.currentState) {
|
||||
case LiveCardState.summary:
|
||||
child = LiveCardWidget(
|
||||
@ -102,6 +105,8 @@ class LiveCardStateA extends State<LiveCard> {
|
||||
.format(DateTime.now())
|
||||
.capital(),
|
||||
icon: FeatherIcons.sun,
|
||||
onTap: () => MapsLauncher.launchQuery(
|
||||
'${_userProvider.student?.school.city ?? ''} ${_userProvider.student?.school.name ?? ''}'),
|
||||
description: liveCard.nextLesson != null
|
||||
? Text.rich(
|
||||
TextSpan(
|
||||
|
@ -62,6 +62,7 @@ dependencies:
|
||||
git:
|
||||
url: https://github.com/kimaah/image_crop.git
|
||||
uuid: ^4.2.2
|
||||
maps_launcher: ^2.2.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_lints: ^3.0.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user