Skip to content

Commit 9a9c7e3

Browse files
committed
fix intendation
1 parent 173588e commit 9a9c7e3

File tree

3 files changed

+36
-43
lines changed

3 files changed

+36
-43
lines changed

test/example_data.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,8 +781,8 @@ DmMessage dmMessage({
781781
..._messagePropertiesFromSender(from),
782782
..._messagePropertiesFromContent(content, contentMarkdown),
783783
'display_recipient': [from, ...to]
784-
.map((u) => {'id': u.userId, 'email': u.email, 'full_name': u.fullName})
785-
.toList(growable: false),
784+
.map((u) => {'id': u.userId, 'email': u.email, 'full_name': u.fullName})
785+
.toList(growable: false),
786786
'reactions': <Reaction>[],
787787
'flags': flags ?? [],
788788
'id': id ?? _nextMessageId(),

test/model/binding.dart

Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ class TestZulipBinding extends ZulipBinding {
352352
_pickFilesCalls = null;
353353
return result ?? [];
354354
}
355-
356355
List<({
357356
bool? allowMultiple,
358357
bool? withReadStream,
@@ -394,7 +393,6 @@ class TestZulipBinding extends ZulipBinding {
394393
_pickImageCalls = null;
395394
return result ?? [];
396395
}
397-
398396
List<({
399397
ImageSource source,
400398
bool requestFullMetadata,
@@ -673,7 +671,6 @@ class FakeAndroidNotificationHostApi implements AndroidNotificationHostApi {
673671
_notifyCalls = [];
674672
return result;
675673
}
676-
677674
List<AndroidNotificationHostApiNotifyCall> _notifyCalls = [];
678675

679676
Iterable<StatusBarNotification> get activeNotifications => _activeNotifications.values;
@@ -730,43 +727,38 @@ class FakeAndroidNotificationHostApi implements AndroidNotificationHostApi {
730727
tag: tag);
731728

732729
_activeNotificationsMessagingStyle[tag] = messagingStyle == null
733-
? null
734-
: MessagingStyle(
735-
user: messagingStyle.user,
736-
conversationTitle: messagingStyle.conversationTitle,
737-
isGroupConversation: messagingStyle.isGroupConversation,
738-
messages: messagingStyle.messages.map((message) =>
739-
MessagingStyleMessage(
740-
text: message.text,
741-
timestampMs: message.timestampMs,
742-
person: Person(
743-
key: message.person.key,
744-
name: message.person.name,
745-
iconBitmap: null)),
746-
).toList(growable: false));
730+
? null
731+
: MessagingStyle(
732+
user: messagingStyle.user,
733+
conversationTitle: messagingStyle.conversationTitle,
734+
isGroupConversation: messagingStyle.isGroupConversation,
735+
messages: messagingStyle.messages.map((message) =>
736+
MessagingStyleMessage(
737+
text: message.text,
738+
timestampMs: message.timestampMs,
739+
person: Person(
740+
key: message.person.key,
741+
name: message.person.name,
742+
iconBitmap: null)),
743+
).toList(growable: false));
747744
}
748745
}
749746

750747
@override
751-
Future<MessagingStyle?> getActiveNotificationMessagingStyleByTag(
752-
String tag,
753-
) async => _activeNotificationsMessagingStyle[tag];
748+
Future<MessagingStyle?> getActiveNotificationMessagingStyleByTag(String tag) async =>
749+
_activeNotificationsMessagingStyle[tag];
754750

755751
@override
756-
Future<List<StatusBarNotification>> getActiveNotifications({
757-
required List<String> desiredExtras,
758-
}) async {
759-
return _activeNotifications.values
760-
.map((statusNotif) {
761-
final notificationExtras = statusNotif.notification.extras;
762-
statusNotif.notification.extras = {
763-
for (final key in desiredExtras)
764-
if (notificationExtras[key] != null)
765-
key: notificationExtras[key]!,
766-
};
767-
return statusNotif;
768-
})
769-
.toList(growable: false);
752+
Future<List<StatusBarNotification>> getActiveNotifications({required List<String> desiredExtras}) async {
753+
return _activeNotifications.values.map((statusNotif) {
754+
final notificationExtras = statusNotif.notification.extras;
755+
statusNotif.notification.extras = {
756+
for (final key in desiredExtras)
757+
if (notificationExtras[key] != null)
758+
key: notificationExtras[key]!,
759+
};
760+
return statusNotif;
761+
}).toList(growable: false);
770762
}
771763

772764
@override

test/widgets/dialog_test.dart

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ void main() {
6060

6161
await tester.tap(find.text('Learn more'));
6262
final expectedMode = switch (defaultTargetPlatform) {
63-
TargetPlatform.android => LaunchMode.inAppBrowserView,
64-
TargetPlatform.iOS => LaunchMode.externalApplication,
65-
_ => throw StateError('attempted to test with $defaultTargetPlatform'),
63+
TargetPlatform.android => LaunchMode.inAppBrowserView,
64+
TargetPlatform.iOS => LaunchMode.externalApplication,
65+
_ => throw StateError('attempted to test with $defaultTargetPlatform'),
6666
};
6767
check(testBinding.takeLaunchUrlCalls()).single
6868
.equals((url: learnMoreButtonUrl, mode: expectedMode));
@@ -94,7 +94,7 @@ void main() {
9494
await tester.pump();
9595
await tester.tap(find.text('Sure'));
9696
await check(dialog.result).completes((it) => it.equals(true));
97-
},variant: TargetPlatformVariant({TargetPlatform.android, TargetPlatform.iOS}));
97+
},variant: const TargetPlatformVariant({TargetPlatform.android, TargetPlatform.iOS}));
9898

9999
testWidgets('tap cancel', (tester) async {
100100
addTearDown(testBinding.reset);
@@ -109,7 +109,7 @@ void main() {
109109
await tester.pump();
110110
await tester.tap(find.text('Cancel'));
111111
await check(dialog.result).completes((it) => it.equals(null));
112-
},variant: TargetPlatformVariant({TargetPlatform.android, TargetPlatform.iOS}));
112+
},variant: const TargetPlatformVariant({TargetPlatform.android, TargetPlatform.iOS}));
113113

114114
testWidgets('tap outside dialog area', (tester) async {
115115
addTearDown(testBinding.reset);
@@ -124,7 +124,7 @@ void main() {
124124
await tester.pump();
125125
await tester.tapAt(tester.getTopLeft(find.byType(TestZulipApp)));
126126
await check(dialog.result).completes((it) => it.equals(null));
127-
},variant: TargetPlatformVariant({TargetPlatform.android, TargetPlatform.iOS}));
127+
},variant: const TargetPlatformVariant({TargetPlatform.android, TargetPlatform.iOS}));
128128
});
129129

130130
testWidgets('only one SingleChildScrollView created', (tester) async {
@@ -155,7 +155,8 @@ void main() {
155155
await tester.pumpWidget(ZulipApp(navigatorObservers: [transitionDurationObserver]));
156156
await tester.pump();
157157

158-
await testBinding.globalStore.settings.debugSetLegacyUpgradeState(LegacyUpgradeState.found);
158+
await testBinding.globalStore.settings
159+
.debugSetLegacyUpgradeState(LegacyUpgradeState.found);
159160

160161
UpgradeWelcomeDialog.maybeShow();
161162
await transitionDurationObserver.pumpPastTransition(tester);

0 commit comments

Comments
 (0)