Skip to content

Commit de85b1c

Browse files
committed
Fix Formatting
1 parent ede237d commit de85b1c

File tree

210 files changed

+2593
-3102
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

210 files changed

+2593
-3102
lines changed

lib/base/enums/campus.dart

Lines changed: 20 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -62,35 +62,17 @@ extension CampusExtension on Campus {
6262
LatLng get location {
6363
switch (this) {
6464
case Campus.stammgelaende:
65-
return const LatLng(
66-
48.14887567648079,
67-
11.568029074814328,
68-
);
65+
return const LatLng(48.14887567648079, 11.568029074814328);
6966
case Campus.olympiapark:
70-
return const LatLng(
71-
48.17957305879896,
72-
11.546601863009668,
73-
);
67+
return const LatLng(48.17957305879896, 11.546601863009668);
7468
case Campus.klinikumRechts:
75-
return const LatLng(
76-
48.13760759635786,
77-
11.60083902677729,
78-
);
69+
return const LatLng(48.13760759635786, 11.60083902677729);
7970
case Campus.grosshadern:
80-
return const LatLng(
81-
48.1116433849602,
82-
11.47027262422505,
83-
);
71+
return const LatLng(48.1116433849602, 11.47027262422505);
8472
case Campus.garching:
85-
return const LatLng(
86-
48.26513710129958,
87-
11.671590834492283,
88-
);
73+
return const LatLng(48.26513710129958, 11.671590834492283);
8974
case Campus.freising:
90-
return const LatLng(
91-
48.39549985559942,
92-
11.727904526510946,
93-
);
75+
return const LatLng(48.39549985559942, 11.727904526510946);
9476
}
9577
}
9678

@@ -104,55 +86,37 @@ extension CampusExtension on Campus {
10486
return Station(
10587
name: "Technische Universität",
10688
apiName: "91000095",
107-
location: const LatLng(
108-
48.148145129847244,
109-
11.566048520744298,
110-
),
89+
location: const LatLng(48.148145129847244, 11.566048520744298),
11190
);
11291
case Campus.olympiapark:
11392
return Station(
11493
name: "Olympiazentrum",
11594
apiName: "91000350",
116-
location: const LatLng(
117-
48.17946648767361,
118-
11.555783595899824,
119-
),
95+
location: const LatLng(48.17946648767361, 11.555783595899824),
12096
);
12197
case Campus.klinikumRechts:
12298
return Station(
12399
name: "Max-Weber-Platz",
124100
apiName: "91000580",
125-
location: const LatLng(
126-
48.13573243097588,
127-
11.599014647301777,
128-
),
101+
location: const LatLng(48.13573243097588, 11.599014647301777),
129102
);
130103
case Campus.grosshadern:
131104
return Station(
132105
name: "Klinikum Großhadern",
133106
apiName: "91001540",
134-
location: const LatLng(
135-
48.10889880944028,
136-
11.47363212095666,
137-
),
107+
location: const LatLng(48.10889880944028, 11.47363212095666),
138108
);
139109
case Campus.garching:
140110
return Station(
141111
name: "Forschungszentrum",
142112
apiName: "1000460",
143-
location: const LatLng(
144-
48.26519145730091,
145-
11.671545161597082,
146-
),
113+
location: const LatLng(48.26519145730091, 11.671545161597082),
147114
);
148115
case Campus.freising:
149116
return Station(
150117
name: "Freising, Weihenstephan",
151118
apiName: "1002911",
152-
location: const LatLng(
153-
48.39799498961109,
154-
11.723989661968458,
155-
),
119+
location: const LatLng(48.39799498961109, 11.723989661968458),
156120
);
157121
}
158122
}
@@ -165,18 +129,12 @@ extension CampusExtension on Campus {
165129
Station(
166130
name: "Theresienstraße",
167131
apiName: "91000120",
168-
location: const LatLng(
169-
48.1512235719802,
170-
11.564211669898931,
171-
),
132+
location: const LatLng(48.1512235719802, 11.564211669898931),
172133
),
173134
Station(
174135
name: "Pinakotheken",
175136
apiName: "91000051",
176-
location: const LatLng(
177-
48.148780089472,
178-
11.571870970398924,
179-
),
137+
location: const LatLng(48.148780089472, 11.571870970398924),
180138
),
181139
];
182140
case Campus.olympiapark:
@@ -187,10 +145,7 @@ extension CampusExtension on Campus {
187145
Station(
188146
name: "Friedensengel/Villa Stuck",
189147
apiName: "91000073",
190-
location: const LatLng(
191-
48.14074544433942,
192-
11.600075277341709,
193-
),
148+
location: const LatLng(48.14074544433942, 11.600075277341709),
194149
),
195150
];
196151
case Campus.grosshadern:
@@ -199,18 +154,12 @@ extension CampusExtension on Campus {
199154
Station(
200155
name: "Klinikum Großhadern Ost",
201156
apiName: "91001472",
202-
location: const LatLng(
203-
48.11092668280441,
204-
11.473909030506093,
205-
),
157+
location: const LatLng(48.11092668280441, 11.473909030506093),
206158
),
207159
Station(
208160
name: "Klinikum Großhadern Nord",
209161
apiName: "91001474",
210-
location: const LatLng(
211-
48.11250562334001,
212-
11.467122898318992,
213-
),
162+
location: const LatLng(48.11250562334001, 11.467122898318992),
214163
),
215164
];
216165
case Campus.garching:
@@ -219,10 +168,7 @@ extension CampusExtension on Campus {
219168
Station(
220169
name: "Lichtenbergstraße",
221170
apiName: "1002070",
222-
location: const LatLng(
223-
48.26777168760462,
224-
11.665502685140389,
225-
),
171+
location: const LatLng(48.26777168760462, 11.665502685140389),
226172
),
227173
];
228174
case Campus.freising:
@@ -231,18 +177,12 @@ extension CampusExtension on Campus {
231177
Station(
232178
name: "Freising, Forstzentrum",
233179
apiName: "1009413",
234-
location: const LatLng(
235-
48.39924842116169,
236-
11.716601891310122,
237-
),
180+
location: const LatLng(48.39924842116169, 11.716601891310122),
238181
),
239182
Station(
240183
name: "Freising, Weihenstephaner Berg",
241184
apiName: "1002617",
242-
location: const LatLng(
243-
48.39581877364193,
244-
11.725859432987532,
245-
),
185+
location: const LatLng(48.39581877364193, 11.725859432987532),
246186
),
247187
];
248188
}

lib/base/enums/credentials.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
enum Credentials {
2-
none,
3-
noTumId,
4-
tumId;
5-
}
1+
enum Credentials { none, noTumId, tumId }

lib/base/enums/device.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
enum Device {
2-
phone,
3-
portraitTablet,
4-
landscapeTablet;
5-
}
1+
enum Device { phone, portraitTablet, landscapeTablet }

lib/base/enums/error_handling_view_type.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ enum ErrorHandlingViewType {
33
fullScreenNoImage,
44
textOnly,
55
descriptionOnly,
6-
redDescriptionOnly
6+
redDescriptionOnly,
77
}

lib/base/enums/home_widget.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ class HomeScreenWidget {
44
WidgetType widgetType;
55
bool enabled;
66

7-
HomeScreenWidget({
8-
required this.widgetType,
9-
this.enabled = true,
10-
});
7+
HomeScreenWidget({required this.widgetType, this.enabled = true});
118

129
String convertToString() {
1310
return "${WidgetType.values.indexOf(widgetType)};${enabled.toString()}";

lib/base/enums/search_category.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ enum SearchCategory {
2525
grade,
2626
movie,
2727
news,
28-
studentClub;
28+
studentClub,
2929
}
3030

3131
extension SearchCategoryExtension on SearchCategory {

lib/base/enums/search_type.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
enum SearchType {
2-
general,
3-
room,
4-
person;
5-
}
1+
enum SearchType { general, room, person }

lib/base/enums/shortcut_item.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ extension Routing on ShortcutItemType {
5555

5656
extension ActiveShortcuts on ShortcutItemType {
5757
static List<ShortcutItemType> get items => [
58-
ShortcutItemType.cafeterias,
59-
ShortcutItemType.roomSearch,
60-
ShortcutItemType.calendar,
61-
ShortcutItemType.studies,
62-
];
58+
ShortcutItemType.cafeterias,
59+
ShortcutItemType.roomSearch,
60+
ShortcutItemType.calendar,
61+
ShortcutItemType.studies,
62+
];
6363
}

lib/base/enums/widget_type.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
enum WidgetType {
2-
cafeterias,
3-
calendar,
4-
departures,
5-
studyRooms;
6-
}
1+
enum WidgetType { cafeterias, calendar, departures, studyRooms }

lib/base/errorHandling/error_handling_router.dart

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ class ErrorHandlingRouter extends ConsumerWidget {
5252
case TumOnlineApiException tumOnlineApiException:
5353
final isInvalidToken =
5454
tumOnlineApiException.tumOnlineApiExceptionType !=
55-
TumOnlineApiExceptionInvalidToken();
55+
TumOnlineApiExceptionInvalidToken();
5656
final isTokenNotConfirmed =
5757
tumOnlineApiException.tumOnlineApiExceptionType !=
58-
TumOnlineApiExceptionTokenNotConfirmed();
58+
TumOnlineApiExceptionTokenNotConfirmed();
5959
final isNotAuthorized =
6060
ref.read(onboardingViewModel).credentials.value !=
61-
Credentials.tumId;
61+
Credentials.tumId;
6262
if (isNotAuthorized && (isInvalidToken || isTokenNotConfirmed)) {
6363
recordFlutterError(
6464
FlutterErrorDetails(
@@ -75,11 +75,7 @@ class ErrorHandlingRouter extends ConsumerWidget {
7575
bodyColor: bodyColor,
7676
);
7777
case SearchException searchException:
78-
recordFlutterError(
79-
FlutterErrorDetails(
80-
exception: searchException,
81-
),
82-
);
78+
recordFlutterError(FlutterErrorDetails(exception: searchException));
8379
return SearchExceptionRouter(
8480
searchException: searchException,
8581
errorHandlingViewType: errorHandlingViewType,
@@ -111,11 +107,7 @@ class ErrorHandlingRouter extends ConsumerWidget {
111107
);
112108
default:
113109
if (error != null) {
114-
recordFlutterError(
115-
FlutterErrorDetails(
116-
exception: error!,
117-
),
118-
);
110+
recordFlutterError(FlutterErrorDetails(exception: error!));
119111
}
120112
return DefaultErrorRouter(
121113
exception: error,

lib/base/errorHandling/error_handling_view.dart

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,25 @@ mixin ErrorHandlingView {
4343
child: _errorMessageText(
4444
errorMessage,
4545
context,
46-
style: Theme.of(context)
47-
.textTheme
48-
.headlineMedium
49-
?.copyWith(
50-
color: titleColor ?? context.primaryColor,
51-
),
46+
style: Theme.of(
47+
context,
48+
).textTheme.headlineMedium?.copyWith(
49+
color: titleColor ?? context.primaryColor,
50+
),
5251
maxLines: 1,
5352
overflow: TextOverflow.ellipsis,
5453
),
5554
),
5655
if (fixMessage != null)
5756
Padding(
58-
padding:
59-
EdgeInsets.symmetric(horizontal: context.padding),
57+
padding: EdgeInsets.symmetric(
58+
horizontal: context.padding,
59+
),
6060
child: Text(
6161
fixMessage,
62-
style: Theme.of(context)
63-
.textTheme
64-
.bodyLarge
65-
?.copyWith(color: bodyColor),
62+
style: Theme.of(
63+
context,
64+
).textTheme.bodyLarge?.copyWith(color: bodyColor),
6665
textAlign: TextAlign.center,
6766
maxLines: 3,
6867
overflow: TextOverflow.ellipsis,
@@ -91,8 +90,8 @@ mixin ErrorHandlingView {
9190
errorMessage,
9291
context,
9392
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
94-
color: titleColor ?? context.primaryColor,
95-
),
93+
color: titleColor ?? context.primaryColor,
94+
),
9695
textAlign: TextAlign.center,
9796
),
9897
if (fixMessage != null)

lib/base/extensions/string_levenshtein.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ extension Levenshtein on String {
1111
List<String> a = split('');
1212
List<String> b = comparisonToken.split('');
1313

14-
List<List<int>> dist =
15-
List.generate(a.length + 1, (_) => List<int>.filled(b.length + 1, 0));
14+
List<List<int>> dist = List.generate(
15+
a.length + 1,
16+
(_) => List<int>.filled(b.length + 1, 0),
17+
);
1618

1719
for (int i = 1; i <= a.length; i++) {
1820
dist[i][0] = i;

lib/base/networking/apis/eatApi/eat_api_endpoint.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ class EatApiEndpointMenu extends EatApiEndpoint {
1818
final String week;
1919

2020
EatApiEndpointMenu({required this.location, int? year, String? week})
21-
: year = year ?? DateTime.now().year,
22-
week = week ?? DateTime.now().weekNumber();
21+
: year = year ?? DateTime.now().year,
22+
week = week ?? DateTime.now().weekNumber();
2323
}

lib/base/networking/apis/google/protobuf/empty.pb.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import 'package:protobuf/protobuf.dart' as $pb;
2020
/// service Foo {
2121
/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
2222
/// }
23-
///
24-
/// The JSON representation for `Empty` is empty JSON object `{}`.
2523
class Empty extends $pb.GeneratedMessage {
2624
factory Empty() => create();
2725
Empty._() : super();

0 commit comments

Comments
 (0)