|
|
@ -11,11 +11,8 @@ import 'package:info_tren/pages/train_info_page/view_train/train_info_cupertino_ |
|
|
|
import 'package:info_tren/utils/state_to_string.dart'; |
|
|
|
import 'package:info_tren/utils/state_to_string.dart'; |
|
|
|
|
|
|
|
|
|
|
|
class TrainInfoLoadingCupertino extends TrainInfoLoading { |
|
|
|
class TrainInfoLoadingCupertino extends TrainInfoLoading { |
|
|
|
TrainInfoLoadingCupertino({required String title, String? loadingText}) |
|
|
|
TrainInfoLoadingCupertino({required super.title, super.loadingText, super.key,}) |
|
|
|
: super( |
|
|
|
: super(uiDesign: UiDesign.CUPERTINO); |
|
|
|
title: title, |
|
|
|
|
|
|
|
loadingText: loadingText, |
|
|
|
|
|
|
|
uiDesign: UiDesign.CUPERTINO); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
@ -35,6 +32,7 @@ class TrainInfoErrorCupertino extends TrainInfoError { |
|
|
|
required Object error, |
|
|
|
required Object error, |
|
|
|
required String title, |
|
|
|
required String title, |
|
|
|
Future Function()? refresh, |
|
|
|
Future Function()? refresh, |
|
|
|
|
|
|
|
super.key, |
|
|
|
}) : super( |
|
|
|
}) : super( |
|
|
|
error: error, |
|
|
|
error: error, |
|
|
|
title: title, |
|
|
|
title: title, |
|
|
@ -78,6 +76,7 @@ class TrainInfoCupertino extends StatelessWidget { |
|
|
|
this.refresh, |
|
|
|
this.refresh, |
|
|
|
this.isRefreshing, |
|
|
|
this.isRefreshing, |
|
|
|
this.onViewYesterdayTrain, |
|
|
|
this.onViewYesterdayTrain, |
|
|
|
|
|
|
|
super.key, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
@ -197,7 +196,7 @@ class TrainInfoCupertino extends StatelessWidget { |
|
|
|
), |
|
|
|
), |
|
|
|
const SliverToBoxAdapter( |
|
|
|
const SliverToBoxAdapter( |
|
|
|
child: CupertinoDivider( |
|
|
|
child: CupertinoDivider( |
|
|
|
color: FOREGROUND_WHITE, |
|
|
|
color: foregroundWhite, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
DisplayTrainLastInfo( |
|
|
|
DisplayTrainLastInfo( |
|
|
@ -258,7 +257,7 @@ class TrainInfoCupertino extends StatelessWidget { |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
const SliverToBoxAdapter( |
|
|
|
const SliverToBoxAdapter( |
|
|
|
child: CupertinoDivider( |
|
|
|
child: CupertinoDivider( |
|
|
|
color: FOREGROUND_WHITE, |
|
|
|
color: foregroundWhite, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
if (onViewYesterdayTrain != null && trainData.stations.first.departure!.scheduleTime.compareTo(DateTime.now()) > 0) ...[ |
|
|
|
if (onViewYesterdayTrain != null && trainData.stations.first.departure!.scheduleTime.compareTo(DateTime.now()) > 0) ...[ |
|
|
@ -267,7 +266,7 @@ class TrainInfoCupertino extends StatelessWidget { |
|
|
|
), |
|
|
|
), |
|
|
|
const SliverToBoxAdapter( |
|
|
|
const SliverToBoxAdapter( |
|
|
|
child: CupertinoDivider( |
|
|
|
child: CupertinoDivider( |
|
|
|
color: FOREGROUND_WHITE, |
|
|
|
color: foregroundWhite, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
@ -394,7 +393,7 @@ class TrainInfoCupertino extends StatelessWidget { |
|
|
|
|
|
|
|
|
|
|
|
class DisplayTrainID extends StatelessWidget { |
|
|
|
class DisplayTrainID extends StatelessWidget { |
|
|
|
final TrainData trainData; |
|
|
|
final TrainData trainData; |
|
|
|
const DisplayTrainID({required this.trainData}); |
|
|
|
const DisplayTrainID({required this.trainData, super.key,}); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
@ -426,7 +425,7 @@ class DisplayTrainID extends StatelessWidget { |
|
|
|
class DisplayTrainRoute extends StatelessWidget { |
|
|
|
class DisplayTrainRoute extends StatelessWidget { |
|
|
|
final TrainData trainData; |
|
|
|
final TrainData trainData; |
|
|
|
|
|
|
|
|
|
|
|
const DisplayTrainRoute({required this.trainData}); |
|
|
|
const DisplayTrainRoute({required this.trainData, super.key,}); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
@ -472,7 +471,7 @@ class DisplayTrainRoute extends StatelessWidget { |
|
|
|
class DisplayTrainOperator extends StatelessWidget { |
|
|
|
class DisplayTrainOperator extends StatelessWidget { |
|
|
|
final TrainData trainData; |
|
|
|
final TrainData trainData; |
|
|
|
|
|
|
|
|
|
|
|
const DisplayTrainOperator({required this.trainData}); |
|
|
|
const DisplayTrainOperator({required this.trainData, super.key,}); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
@ -493,7 +492,7 @@ class DisplayTrainOperator extends StatelessWidget { |
|
|
|
class DisplayTrainDeparture extends StatelessWidget { |
|
|
|
class DisplayTrainDeparture extends StatelessWidget { |
|
|
|
final TrainData trainData; |
|
|
|
final TrainData trainData; |
|
|
|
|
|
|
|
|
|
|
|
const DisplayTrainDeparture({required this.trainData}); |
|
|
|
const DisplayTrainDeparture({required this.trainData, super.key,}); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
@ -517,7 +516,7 @@ class DisplayTrainDeparture extends StatelessWidget { |
|
|
|
class DisplayTrainLastInfo extends StatelessWidget { |
|
|
|
class DisplayTrainLastInfo extends StatelessWidget { |
|
|
|
final TrainData trainData; |
|
|
|
final TrainData trainData; |
|
|
|
|
|
|
|
|
|
|
|
const DisplayTrainLastInfo({required this.trainData}); |
|
|
|
const DisplayTrainLastInfo({required this.trainData, super.key,}); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
@ -691,7 +690,7 @@ class DisplayTrainLastInfo extends StatelessWidget { |
|
|
|
class DisplayTrainDestination extends StatelessWidget { |
|
|
|
class DisplayTrainDestination extends StatelessWidget { |
|
|
|
final TrainData trainData; |
|
|
|
final TrainData trainData; |
|
|
|
|
|
|
|
|
|
|
|
const DisplayTrainDestination({required this.trainData}); |
|
|
|
const DisplayTrainDestination({required this.trainData, super.key,}); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
@ -791,7 +790,7 @@ class DisplayTrainDestination extends StatelessWidget { |
|
|
|
class DisplayTrainRouteDistance extends StatelessWidget { |
|
|
|
class DisplayTrainRouteDistance extends StatelessWidget { |
|
|
|
final TrainData trainData; |
|
|
|
final TrainData trainData; |
|
|
|
|
|
|
|
|
|
|
|
const DisplayTrainRouteDistance({required this.trainData}); |
|
|
|
const DisplayTrainRouteDistance({required this.trainData, super.key,}); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
@ -821,7 +820,7 @@ class DisplayTrainRouteDistance extends StatelessWidget { |
|
|
|
class DisplayTrainRouteDuration extends StatelessWidget { |
|
|
|
class DisplayTrainRouteDuration extends StatelessWidget { |
|
|
|
final TrainData trainData; |
|
|
|
final TrainData trainData; |
|
|
|
|
|
|
|
|
|
|
|
const DisplayTrainRouteDuration({required this.trainData}); |
|
|
|
const DisplayTrainRouteDuration({required this.trainData, super.key,}); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
@ -897,7 +896,7 @@ class DisplayTrainRouteDuration extends StatelessWidget { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class DisplayTrainYesterdayWarningCupertino extends DisplayTrainYesterdayWarningCommon { |
|
|
|
class DisplayTrainYesterdayWarningCupertino extends DisplayTrainYesterdayWarningCommon { |
|
|
|
const DisplayTrainYesterdayWarningCupertino(void Function() onViewYesterdayTrain) : super(onViewYesterdayTrain); |
|
|
|
const DisplayTrainYesterdayWarningCupertino(super.onViewYesterdayTrain, {super.key,}); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
@ -934,6 +933,7 @@ class DisplayTrainStations extends StatelessWidget { |
|
|
|
|
|
|
|
|
|
|
|
const DisplayTrainStations({ |
|
|
|
const DisplayTrainStations({ |
|
|
|
required this.trainData, |
|
|
|
required this.trainData, |
|
|
|
|
|
|
|
super.key, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|