|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import 'package:flutter/cupertino.dart'; |
|
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
|
import 'package:info_tren/components/cupertino_divider.dart'; |
|
|
|
|
import 'package:info_tren/components/select_train_suggestions/select_train_suggestions.dart'; |
|
|
|
|
import 'package:info_tren/models/train_operator_lines.dart'; |
|
|
|
|
|
|
|
|
@ -9,21 +9,19 @@ class SelectTrainSuggestionsStateCupertino extends SelectTrainSuggestionsState {
|
|
|
|
|
return Column( |
|
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
|
children: <Widget>[ |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
onTrainSelected(currentInput); |
|
|
|
|
}, |
|
|
|
|
child: Padding( |
|
|
|
|
padding: const EdgeInsets.all(8), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
|
children: <Widget>[ |
|
|
|
|
Text(getUseCurrentInputWidgetText(currentInput)), |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
), |
|
|
|
|
Padding( |
|
|
|
|
padding: const EdgeInsets.all(0), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
|
children: <Widget>[ |
|
|
|
|
CupertinoButton( |
|
|
|
|
child: Text(getUseCurrentInputWidgetText(currentInput)), |
|
|
|
|
onPressed: () => onTrainSelected(currentInput), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
), |
|
|
|
|
Divider(), |
|
|
|
|
CupertinoDivider(), |
|
|
|
|
], |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
@ -44,31 +42,37 @@ class OperatorAutocompleteTileCupertino extends OperatorAutocompleteTile {
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Widget build(BuildContext context) { |
|
|
|
|
return GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
onTrainSelected(train.internalNumber); |
|
|
|
|
}, |
|
|
|
|
child: Padding( |
|
|
|
|
padding: const EdgeInsets.fromLTRB(16, 2, 16, 2), |
|
|
|
|
child: SizedBox( |
|
|
|
|
width: double.infinity, |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.stretch, |
|
|
|
|
children: <Widget>[ |
|
|
|
|
Text( |
|
|
|
|
operatorName, |
|
|
|
|
style: CupertinoTheme.of(context).textTheme.textStyle.copyWith(fontSize: 10, fontWeight: FontWeight.w200), |
|
|
|
|
textAlign: TextAlign.left, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
"${train.rang} ${train.number}", |
|
|
|
|
textAlign: TextAlign.left, |
|
|
|
|
return Column( |
|
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
|
children: [ |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
onTrainSelected(train.internalNumber); |
|
|
|
|
}, |
|
|
|
|
child: Padding( |
|
|
|
|
padding: const EdgeInsets.fromLTRB(16, 4, 16, 4), |
|
|
|
|
child: SizedBox( |
|
|
|
|
width: double.infinity, |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.stretch, |
|
|
|
|
children: <Widget>[ |
|
|
|
|
Text( |
|
|
|
|
operatorName, |
|
|
|
|
style: CupertinoTheme.of(context).textTheme.textStyle.copyWith(fontSize: 10, fontWeight: FontWeight.w200), |
|
|
|
|
textAlign: TextAlign.left, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
"${train.rang} ${train.number}", |
|
|
|
|
textAlign: TextAlign.left, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
CupertinoDivider(), |
|
|
|
|
], |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|