@@ -15,6 +15,7 @@ class DeparturesDetailsRowView extends ConsumerWidget {
15
15
return Row (
16
16
children: [
17
17
_lineNumberRectangle (context, ref),
18
+ if (departure.lineInfos != null ) _warningButton (context, ref),
18
19
Expanded (
19
20
child: Text (
20
21
departure.servingLine.direction,
@@ -30,7 +31,30 @@ class DeparturesDetailsRowView extends ConsumerWidget {
30
31
}
31
32
32
33
Widget _lineNumberRectangle (BuildContext context, WidgetRef ref) {
33
- return GestureDetector (
34
+ return Padding (
35
+ padding: const EdgeInsets .only (right: 15 ),
36
+ child: Container (
37
+ decoration: BoxDecoration (
38
+ borderRadius: BorderRadius .circular (5 ),
39
+ color: departure.servingLine.color,
40
+ ),
41
+ width: 55 ,
42
+ height: 35 ,
43
+ child: Center (
44
+ child: Text (
45
+ departure.servingLine.number,
46
+ style: Theme .of (context).textTheme.bodyLarge? .copyWith (
47
+ color: Colors .white,
48
+ fontWeight: FontWeight .bold,
49
+ ),
50
+ ),
51
+ ),
52
+ ),
53
+ );
54
+ }
55
+
56
+ Widget _warningButton (BuildContext context, WidgetRef ref) {
57
+ return InkWell (
34
58
onTap: () async {
35
59
if (departure.lineInfos != null ) {
36
60
if (departure.lineInfos? .element != null ) {
@@ -46,43 +70,21 @@ class DeparturesDetailsRowView extends ConsumerWidget {
46
70
}
47
71
}
48
72
},
49
- child: Stack (
50
- clipBehavior: Clip .none,
73
+ child: Row (
51
74
children: [
75
+ const Icon (
76
+ Icons .warning_outlined,
77
+ color: Color (0xffFFCC01 ),
78
+ size: 20 ,
79
+ ),
52
80
Padding (
53
- padding: const EdgeInsets .only (right: 15 ),
54
- child: Container (
55
- decoration: BoxDecoration (
56
- borderRadius: BorderRadius .circular (5 ),
57
- color: departure.servingLine.color,
58
- ),
59
- width: 55 ,
60
- height: 35 ,
61
- child: Center (
62
- child: Text (
63
- departure.servingLine.number,
64
- style: Theme .of (context).textTheme.bodyLarge? .copyWith (
65
- color: Colors .white,
66
- fontWeight: FontWeight .bold,
67
- ),
68
- ),
69
- ),
70
- ),
81
+ padding: EdgeInsets .symmetric (horizontal: context.halfPadding),
71
82
),
72
- if (departure.lineInfos != null ) _warningOverlay,
73
83
],
74
84
),
75
85
);
76
86
}
77
87
78
- Widget get _warningOverlay {
79
- return const Positioned (
80
- width: 53 * 2 ,
81
- bottom: 22 ,
82
- child: Icon (Icons .warning_outlined, color: Color (0xffFFCC01 ), size: 20 ),
83
- );
84
- }
85
-
86
88
Widget get _delayText {
87
89
if (departure.servingLine.delay != null ) {
88
90
final delay = departure.servingLine.delay! ;
0 commit comments