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:flutter_feather_icons/flutter_feather_icons.dart';
|
||||||
import 'package:i18n_extension/i18n_widget.dart';
|
import 'package:i18n_extension/i18n_widget.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:maps_launcher/maps_launcher.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'live_card.i18n.dart';
|
import 'live_card.i18n.dart';
|
||||||
|
|
||||||
@ -52,6 +53,8 @@ class LiveCardStateA extends State<LiveCard> {
|
|||||||
Widget child;
|
Widget child;
|
||||||
Duration bellDelay = liveCard.delay;
|
Duration bellDelay = liveCard.delay;
|
||||||
|
|
||||||
|
liveCard.currentState = LiveCardState.morning;
|
||||||
|
|
||||||
switch (liveCard.currentState) {
|
switch (liveCard.currentState) {
|
||||||
case LiveCardState.summary:
|
case LiveCardState.summary:
|
||||||
child = LiveCardWidget(
|
child = LiveCardWidget(
|
||||||
@ -102,6 +105,8 @@ class LiveCardStateA extends State<LiveCard> {
|
|||||||
.format(DateTime.now())
|
.format(DateTime.now())
|
||||||
.capital(),
|
.capital(),
|
||||||
icon: FeatherIcons.sun,
|
icon: FeatherIcons.sun,
|
||||||
|
onTap: () => MapsLauncher.launchQuery(
|
||||||
|
'${_userProvider.student?.school.city ?? ''} ${_userProvider.student?.school.name ?? ''}'),
|
||||||
description: liveCard.nextLesson != null
|
description: liveCard.nextLesson != null
|
||||||
? Text.rich(
|
? Text.rich(
|
||||||
TextSpan(
|
TextSpan(
|
||||||
|
@ -62,6 +62,7 @@ dependencies:
|
|||||||
git:
|
git:
|
||||||
url: https://github.com/kimaah/image_crop.git
|
url: https://github.com/kimaah/image_crop.git
|
||||||
uuid: ^4.2.2
|
uuid: ^4.2.2
|
||||||
|
maps_launcher: ^2.2.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_lints: ^3.0.1
|
flutter_lints: ^3.0.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user