Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Commit 1fee19a

Browse files
author
Martin Braun
committed
chore: format all code
1 parent 93f24a2 commit 1fee19a

File tree

4 files changed

+278
-215
lines changed

4 files changed

+278
-215
lines changed

lib/src/components/prediction_tile.dart

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,34 @@ class PredictionTile extends StatelessWidget {
3434
if (matchedSubString.offset > 0) {
3535
result.add(
3636
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),
3941
),
4042
);
4143
}
4244

4345
// Matched strings.
4446
result.add(
4547
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),
4853
),
4954
);
5055

5156
// Other strings.
52-
if (matchedSubString.offset + matchedSubString.length < (prediction.description?.length ?? 0)) {
57+
if (matchedSubString.offset + matchedSubString.length <
58+
(prediction.description?.length ?? 0)) {
5359
result.add(
5460
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),
5765
),
5866
);
5967
}
@@ -62,7 +70,8 @@ class PredictionTile extends StatelessWidget {
6270
result.add(
6371
TextSpan(
6472
text: prediction.description,
65-
style: TextStyle(color: textColor, fontSize: 16, fontWeight: FontWeight.w300),
73+
style: TextStyle(
74+
color: textColor, fontSize: 16, fontWeight: FontWeight.w300),
6675
),
6776
);
6877
}

0 commit comments

Comments
 (0)