@@ -34,26 +34,34 @@ class PredictionTile extends StatelessWidget {
34
34
if (matchedSubString.offset > 0 ) {
35
35
result.add (
36
36
TextSpan (
37
- text: prediction.description? .substring (0 , matchedSubString.offset as int ? ),
38
- style: TextStyle (color: textColor, fontSize: 16 , fontWeight: FontWeight .w300),
37
+ text: prediction.description
38
+ ? .substring (0 , matchedSubString.offset as int ? ),
39
+ style: TextStyle (
40
+ color: textColor, fontSize: 16 , fontWeight: FontWeight .w300),
39
41
),
40
42
);
41
43
}
42
44
43
45
// Matched strings.
44
46
result.add (
45
47
TextSpan (
46
- text: prediction.description? .substring (matchedSubString.offset as int , matchedSubString.offset + matchedSubString.length as int ? ),
47
- style: TextStyle (color: textColor, fontSize: 16 , fontWeight: FontWeight .w500),
48
+ text: prediction.description? .substring (
49
+ matchedSubString.offset as int ,
50
+ matchedSubString.offset + matchedSubString.length as int ? ),
51
+ style: TextStyle (
52
+ color: textColor, fontSize: 16 , fontWeight: FontWeight .w500),
48
53
),
49
54
);
50
55
51
56
// Other strings.
52
- if (matchedSubString.offset + matchedSubString.length < (prediction.description? .length ?? 0 )) {
57
+ if (matchedSubString.offset + matchedSubString.length <
58
+ (prediction.description? .length ?? 0 )) {
53
59
result.add (
54
60
TextSpan (
55
- text: prediction.description? .substring (matchedSubString.offset + matchedSubString.length as int ),
56
- style: TextStyle (color: textColor, fontSize: 16 , fontWeight: FontWeight .w300),
61
+ text: prediction.description? .substring (
62
+ matchedSubString.offset + matchedSubString.length as int ),
63
+ style: TextStyle (
64
+ color: textColor, fontSize: 16 , fontWeight: FontWeight .w300),
57
65
),
58
66
);
59
67
}
@@ -62,7 +70,8 @@ class PredictionTile extends StatelessWidget {
62
70
result.add (
63
71
TextSpan (
64
72
text: prediction.description,
65
- style: TextStyle (color: textColor, fontSize: 16 , fontWeight: FontWeight .w300),
73
+ style: TextStyle (
74
+ color: textColor, fontSize: 16 , fontWeight: FontWeight .w300),
66
75
),
67
76
);
68
77
}
0 commit comments