diff --git a/das_client/lib/app/pages/journey/train_journey/widgets/train_journey.dart b/das_client/lib/app/pages/journey/train_journey/widgets/train_journey.dart index d5126d8a..37daff19 100644 --- a/das_client/lib/app/pages/journey/train_journey/widgets/train_journey.dart +++ b/das_client/lib/app/pages/journey/train_journey/widgets/train_journey.dart @@ -1,6 +1,5 @@ import 'package:das_client/app/bloc/train_journey_cubit.dart'; import 'package:das_client/sfera/sfera_component.dart'; -import 'package:das_client/sfera/src/model/journey_profile.dart'; import 'package:design_system_flutter/design_system_flutter.dart'; import 'package:flutter/material.dart'; import 'package:rxdart/rxdart.dart'; @@ -13,8 +12,7 @@ class TrainJourney extends StatelessWidget { final bloc = context.trainJourneyCubit; return StreamBuilder>( - stream: - CombineLatestStream.list([bloc.journeyStream, bloc.segmentStream]), + stream: CombineLatestStream.list([bloc.journeyStream, bloc.segmentStream]), builder: (context, snapshot) { JourneyProfile? journeyProfile = snapshot.data?[0]; List segmentProfiles = snapshot.data?[1] ?? []; @@ -31,23 +29,17 @@ class TrainJourney extends StatelessWidget { List segmentProfiles, ) { final timingPoints = journeyProfile.segmentProfilesLists - .expand((it) => it.timingPoints - .toList() - .sublist(it == journeyProfile.segmentProfilesLists.first ? 0 : 1)) + .expand((it) => it.timingPoints.toList().sublist(it == journeyProfile.segmentProfilesLists.first ? 0 : 1)) .toList(); - final points = segmentProfiles - .expand((it) => it.points?.timingPoints.toList() ?? []); + final points = segmentProfiles.expand((it) => it.points?.timingPoints.toList() ?? []); return SingleChildScrollView( child: Column( children: [ ...List.generate(timingPoints.length, (index) { var timingPoint = timingPoints[index]; - var tpId = timingPoint.timingPointReference.children - .whereType() - .firstOrNull - ?.tpId; + var tpId = timingPoint.timingPointReference.children.whereType().firstOrNull?.tpId; var tp = points.where((point) => point.id == tpId).firstOrNull; return Padding( padding: const EdgeInsets.all(sbbDefaultSpacing * 0.5), @@ -65,8 +57,7 @@ class TrainJourney extends StatelessWidget { ); } - Widget _servicePointName(TimingPoint? tp) => - Text(tp?.names.first.name ?? 'Unknown'); + Widget _servicePointName(TimingPoint? tp) => Text(tp?.names.first.name ?? 'Unknown'); Widget _arrivalTime(TimingPointConstraints timingPoint) { return Text(timingPoint.attributes['TP_PlannedLatestArrivalTime'] ?? ''); diff --git a/das_client/lib/app/pages/login/splash_page.dart b/das_client/lib/app/pages/login/splash_page.dart index 4edcd241..7065cf29 100644 --- a/das_client/lib/app/pages/login/splash_page.dart +++ b/das_client/lib/app/pages/login/splash_page.dart @@ -1,8 +1,7 @@ import 'package:auto_route/auto_route.dart'; +import 'package:das_client/app/nav/app_router.dart'; import 'package:das_client/auth/authentication_component.dart'; -import 'package:das_client/auth/src/authenticator.dart'; import 'package:das_client/di.dart'; -import 'package:das_client/app/nav/app_router.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/das_client/lib/mqtt/src/mqtt_service_impl.dart b/das_client/lib/mqtt/src/mqtt_service_impl.dart index 86aa6a5a..79fa3578 100644 --- a/das_client/lib/mqtt/src/mqtt_service_impl.dart +++ b/das_client/lib/mqtt/src/mqtt_service_impl.dart @@ -22,6 +22,7 @@ class MqttServiceImpl implements MqttService { final _messageSubject = BehaviorSubject(); + @override Stream get messageStream => _messageSubject.stream; MqttServiceImpl({required String mqttUrl, required MqttClientConnector mqttClientConnector, required this.prefix})