chore: apply linter to the various example and test directories (#550)
* chore: remove examples and tests from analysis exclusion * chore: apply linter fixes to stream_chat_flutter_core/example/main.dart * chore: apply linter fixes to stream_chat_flutter/example/main.dart * chore: apply linter fixes to stream_chat_persistence/example/main.dart * chore: apply linter fixes to stream_chat/example/main.dart * chore: apply linter fixes to stream_chat_flutter/example/split_view.dart * chore: renamte tutorial files per linter * chore: apply linter fixes to tutorial_part_1.dart * chore: apply linter fixes to tutorial_part_2.dart * chore: apply linter fixes to tutorial_part_3.dart * chore: apply linter fixes to tutorial_part_4.dart * chore: apply linter fixes to tutorial_part_5.dart * chore: make a widget const in tutorial_part_5.dart * chore: apply linter fixes to tutorial_part_6.dart * chore: sort and update dependencies in stream_chat_persistence/example/pubspec.yaml * chore: sort and update dependencies in stream_chat_flutter_core/example/pubspec.yaml * chore: sort and update dependencies in stream_chat_flutter/example/pubspec.yaml * chore: sort dependencies in stream_chat_flutter/example/pubspec.yaml * chore: apply linter fixes to channel_test.dart * chore: apply linter fixes to client_test.dart * chore: apply linter fixes to client_test.dart, stream_http_client_test.dart, and token_manager_test.dart * chore: apply linter fixes to filter_test.dart * chore: apply linter fixes to reaction_test.dart * chore: apply linter fixes to chat_persistence_client_test.dart * chore: apply linter fixes to channel_image_test.dart * chore: apply linter fixes to deleted_message_test.dart * chore: apply linter fixes to full_screen_media_test.dart * chore: apply linter fixes to gallery_footer_theme_test.dart * chore: apply linter fixes to gallery_header_theme_test.dart * chore: apply linter fixes to message_text_test.dart * chore: apply linter fixes to reaction_bubble_test.dart * chore: apply linter fixes to system_message_test.dart * chore: apply linter fixes to typing_indicator_test.dart * chore: apply linter fixes to channel_list_core_test.dart * chore: apply linter fixes to channels_bloc_test.dart * chore: apply linter fixes to lazy_load_scroll_view_test.dart * chore: apply linter fixes to channel_matcher.dart * chore: apply linter fixes to message_matcher.dart * chore: apply linter fixes to users_matcher.dart * chore: apply linter fixes to message_list_core_test.dart * chore: apply linter fixes to message_search_bloc_test.dart * chore: apply linter fixes to message_search_list_core_test.dart * chore: apply linter fixes to stream_channel_test.dart * chore: apply linter fixes to stream_chat_core_test.dart * chore: apply linter fixes to user_list_core_test.dart * chore: apply linter fixes to channel_query_dao_test.dart, message_mapper_test.dart, user_mapper_test.dart, and users_bloc_test.dart * chore: apply some missed dartfmt * test: regenerate failinggolden test
This commit is contained in:
@@ -74,7 +74,7 @@ void main() {
|
||||
userId: 'user-id2',
|
||||
user: User(
|
||||
id: 'user-id2',
|
||||
extraData: {
|
||||
extraData: const {
|
||||
'image': 'testimage',
|
||||
},
|
||||
),
|
||||
@@ -85,7 +85,7 @@ void main() {
|
||||
userId: 'user-id2',
|
||||
user: User(
|
||||
id: 'user-id2',
|
||||
extraData: {
|
||||
extraData: const {
|
||||
'image': 'testimage',
|
||||
},
|
||||
),
|
||||
@@ -98,7 +98,7 @@ void main() {
|
||||
when(() => clientState.usersStream).thenAnswer((i) => Stream.value({
|
||||
'user-id2': User(
|
||||
id: 'user-id2',
|
||||
extraData: {
|
||||
extraData: const {
|
||||
'image': 'testimage',
|
||||
},
|
||||
),
|
||||
@@ -148,7 +148,7 @@ void main() {
|
||||
userId: 'user-id',
|
||||
user: User(
|
||||
id: 'user-id',
|
||||
extraData: {
|
||||
extraData: const {
|
||||
'image': 'testimage1',
|
||||
},
|
||||
),
|
||||
@@ -157,7 +157,7 @@ void main() {
|
||||
userId: 'user-id2',
|
||||
user: User(
|
||||
id: 'user-id2',
|
||||
extraData: {
|
||||
extraData: const {
|
||||
'image': 'testimage2',
|
||||
},
|
||||
),
|
||||
@@ -166,7 +166,7 @@ void main() {
|
||||
userId: 'user-id3',
|
||||
user: User(
|
||||
id: 'user-id3',
|
||||
extraData: {
|
||||
extraData: const {
|
||||
'image': 'testimage3',
|
||||
},
|
||||
),
|
||||
@@ -177,7 +177,7 @@ void main() {
|
||||
userId: 'user-id',
|
||||
user: User(
|
||||
id: 'user-id',
|
||||
extraData: {
|
||||
extraData: const {
|
||||
'image': 'testimage1',
|
||||
},
|
||||
),
|
||||
@@ -186,7 +186,7 @@ void main() {
|
||||
userId: 'user-id2',
|
||||
user: User(
|
||||
id: 'user-id2',
|
||||
extraData: {
|
||||
extraData: const {
|
||||
'image': 'testimage2',
|
||||
},
|
||||
),
|
||||
@@ -195,7 +195,7 @@ void main() {
|
||||
userId: 'user-id3',
|
||||
user: User(
|
||||
id: 'user-id3',
|
||||
extraData: {
|
||||
extraData: const {
|
||||
'image': 'testimage3',
|
||||
},
|
||||
),
|
||||
|
||||
@@ -70,6 +70,7 @@ void main() {
|
||||
StreamChat(
|
||||
streamChatThemeData: theme,
|
||||
client: client,
|
||||
connectivityStream: Stream.value(ConnectivityResult.mobile),
|
||||
child: StreamChannel(
|
||||
showLoading: false,
|
||||
channel: channel,
|
||||
@@ -79,7 +80,6 @@ void main() {
|
||||
),
|
||||
),
|
||||
),
|
||||
connectivityStream: Stream.value(ConnectivityResult.mobile),
|
||||
),
|
||||
),
|
||||
surfaceSize: const Size.square(200),
|
||||
@@ -123,6 +123,7 @@ void main() {
|
||||
StreamChat(
|
||||
streamChatThemeData: theme,
|
||||
client: client,
|
||||
connectivityStream: Stream.value(ConnectivityResult.mobile),
|
||||
child: StreamChannel(
|
||||
showLoading: false,
|
||||
channel: channel,
|
||||
@@ -132,7 +133,6 @@ void main() {
|
||||
),
|
||||
),
|
||||
),
|
||||
connectivityStream: Stream.value(ConnectivityResult.mobile),
|
||||
),
|
||||
),
|
||||
surfaceSize: const Size.square(200),
|
||||
@@ -176,6 +176,7 @@ void main() {
|
||||
StreamChat(
|
||||
streamChatThemeData: theme,
|
||||
client: client,
|
||||
connectivityStream: Stream.value(ConnectivityResult.mobile),
|
||||
child: StreamChannel(
|
||||
showLoading: false,
|
||||
channel: channel,
|
||||
@@ -189,7 +190,6 @@ void main() {
|
||||
),
|
||||
),
|
||||
),
|
||||
connectivityStream: Stream.value(ConnectivityResult.mobile),
|
||||
),
|
||||
),
|
||||
surfaceSize: const Size.square(200),
|
||||
|
||||
@@ -54,12 +54,12 @@ void main() {
|
||||
)
|
||||
]));
|
||||
when(() => channelState.typingEvents).thenAnswer((i) => {
|
||||
User(id: 'other-user', extraData: {'name': 'demo'}):
|
||||
User(id: 'other-user', extraData: const {'name': 'demo'}):
|
||||
Event(type: EventType.typingStart),
|
||||
});
|
||||
when(() => channelState.typingEventsStream)
|
||||
.thenAnswer((i) => Stream.value({
|
||||
User(id: 'other-user', extraData: {'name': 'demo'}):
|
||||
User(id: 'other-user', extraData: const {'name': 'demo'}):
|
||||
Event(type: EventType.typingStart),
|
||||
}));
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
'Light GalleryFooterThemeData lerps completely to dark GalleryFooterThemeData',
|
||||
'''Light GalleryFooterThemeData lerps completely to dark GalleryFooterThemeData''',
|
||||
() {
|
||||
expect(
|
||||
const GalleryFooterThemeData().lerp(_galleryFooterThemeDataControl,
|
||||
@@ -23,7 +23,7 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
'Light GalleryFooterThemeData lerps halfway to dark GalleryFooterThemeData',
|
||||
'''Light GalleryFooterThemeData lerps halfway to dark GalleryFooterThemeData''',
|
||||
() {
|
||||
expect(
|
||||
const GalleryFooterThemeData().lerp(_galleryFooterThemeDataControl,
|
||||
@@ -32,7 +32,7 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
'Dark GalleryFooterThemeData lerps completely to light GalleryFooterThemeData',
|
||||
'''Dark GalleryFooterThemeData lerps completely to light GalleryFooterThemeData''',
|
||||
() {
|
||||
expect(
|
||||
const GalleryFooterThemeData().lerp(_galleryFooterThemeDataControlDark,
|
||||
|
||||
@@ -14,7 +14,7 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
'Light GalleryHeaderThemeData lerps completely to dark GalleryHeaderThemeData',
|
||||
'''Light GalleryHeaderThemeData lerps completely to dark GalleryHeaderThemeData''',
|
||||
() {
|
||||
expect(
|
||||
const GalleryHeaderThemeData().lerp(_galleryHeaderThemeDataControl,
|
||||
@@ -23,7 +23,7 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
'Light GalleryHeaderThemeData lerps halfway to dark GalleryHeaderThemeData',
|
||||
'''Light GalleryHeaderThemeData lerps halfway to dark GalleryHeaderThemeData''',
|
||||
() {
|
||||
expect(
|
||||
const GalleryHeaderThemeData().lerp(_galleryHeaderThemeDataControl,
|
||||
@@ -32,7 +32,7 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
'Dark GalleryHeaderThemeData lerps completely to light GalleryHeaderThemeData',
|
||||
'''Dark GalleryHeaderThemeData lerps completely to light GalleryHeaderThemeData''',
|
||||
() {
|
||||
expect(
|
||||
const GalleryHeaderThemeData().lerp(_galleryHeaderThemeDataDarkControl,
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 8.5 KiB |
@@ -79,7 +79,8 @@ void main() {
|
||||
'name': 'test',
|
||||
});
|
||||
|
||||
final messageText = '''a message.
|
||||
const messageText = '''
|
||||
a message.
|
||||
with multiple lines
|
||||
and a list:
|
||||
- a. okasd
|
||||
|
||||
@@ -47,6 +47,7 @@ void main() {
|
||||
StreamChat(
|
||||
client: client,
|
||||
streamChatThemeData: theme,
|
||||
connectivityStream: Stream.value(ConnectivityResult.mobile),
|
||||
child: SizedBox(
|
||||
child: ReactionBubble(
|
||||
reactions: [
|
||||
@@ -60,7 +61,6 @@ void main() {
|
||||
maskColor: theme.ownMessageTheme.reactionsMaskColor!,
|
||||
),
|
||||
),
|
||||
connectivityStream: Stream.value(ConnectivityResult.mobile),
|
||||
),
|
||||
surfaceSize: const Size(100, 100),
|
||||
);
|
||||
@@ -83,6 +83,7 @@ void main() {
|
||||
StreamChat(
|
||||
client: client,
|
||||
streamChatThemeData: StreamChatThemeData.fromTheme(themeData),
|
||||
connectivityStream: Stream.value(ConnectivityResult.mobile),
|
||||
child: Container(
|
||||
color: Colors.black,
|
||||
child: ReactionBubble(
|
||||
@@ -97,7 +98,6 @@ void main() {
|
||||
maskColor: theme.ownMessageTheme.reactionsMaskColor!,
|
||||
),
|
||||
),
|
||||
connectivityStream: Stream.value(ConnectivityResult.mobile),
|
||||
),
|
||||
surfaceSize: const Size(100, 100),
|
||||
);
|
||||
|
||||
@@ -89,6 +89,7 @@ void main() {
|
||||
)(
|
||||
StreamChat(
|
||||
client: client,
|
||||
connectivityStream: Stream.value(ConnectivityResult.mobile),
|
||||
child: StreamChannel(
|
||||
showLoading: false,
|
||||
channel: channel,
|
||||
@@ -100,7 +101,6 @@ void main() {
|
||||
),
|
||||
),
|
||||
),
|
||||
connectivityStream: Stream.value(ConnectivityResult.mobile),
|
||||
),
|
||||
),
|
||||
surfaceSize: const Size.square(200),
|
||||
@@ -141,6 +141,7 @@ void main() {
|
||||
)(
|
||||
StreamChat(
|
||||
client: client,
|
||||
connectivityStream: Stream.value(ConnectivityResult.mobile),
|
||||
child: StreamChannel(
|
||||
showLoading: false,
|
||||
channel: channel,
|
||||
@@ -152,7 +153,6 @@ void main() {
|
||||
),
|
||||
),
|
||||
),
|
||||
connectivityStream: Stream.value(ConnectivityResult.mobile),
|
||||
),
|
||||
),
|
||||
surfaceSize: const Size.square(200),
|
||||
|
||||
@@ -54,12 +54,12 @@ void main() {
|
||||
]));
|
||||
|
||||
when(() => channelState.typingEvents).thenAnswer((i) => {
|
||||
User(id: 'other-user', extraData: {'name': 'demo'}):
|
||||
User(id: 'other-user', extraData: const {'name': 'demo'}):
|
||||
Event(type: EventType.typingStart),
|
||||
});
|
||||
when(() => channelState.typingEventsStream)
|
||||
.thenAnswer((i) => Stream.value({
|
||||
User(id: 'other-user', extraData: {'name': 'demo'}):
|
||||
User(id: 'other-user', extraData: const {'name': 'demo'}):
|
||||
Event(type: EventType.typingStart),
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user