refactor(ui, core): Deprecate v3

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2022-03-10 14:12:01 +05:30
committed by xsahil03x
parent 55b87295ab
commit a7e3839256
128 changed files with 3891 additions and 1362 deletions
@@ -4,22 +4,23 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
void main() {
test('AvatarThemeData copyWith, ==, hashCode basics', () {
expect(const AvatarThemeData(), const AvatarThemeData().copyWith());
expect(const AvatarThemeData().hashCode,
const AvatarThemeData().copyWith().hashCode);
expect(const StreamAvatarThemeData(),
const StreamAvatarThemeData().copyWith());
expect(const StreamAvatarThemeData().hashCode,
const StreamAvatarThemeData().copyWith().hashCode);
});
group('AvatarThemeData lerps correctly', () {
test('Lerp completely', () {
expect(
const AvatarThemeData()
const StreamAvatarThemeData()
.lerp(_avatarThemeDataControl1, _avatarThemeDataControl2, 1),
_avatarThemeDataControl2);
});
test('Lerp halfway', () {
expect(
const AvatarThemeData()
const StreamAvatarThemeData()
.lerp(_avatarThemeDataControl1, _avatarThemeDataControl2, 0.5),
_avatarThemeDataControlMidLerp);
});
@@ -31,9 +32,9 @@ void main() {
});
}
const _avatarThemeDataControl1 = AvatarThemeData();
const _avatarThemeDataControl1 = StreamAvatarThemeData();
final _avatarThemeDataControlMidLerp = AvatarThemeData(
final _avatarThemeDataControlMidLerp = StreamAvatarThemeData(
borderRadius: BorderRadius.circular(16),
constraints: const BoxConstraints.tightFor(
height: 33,
@@ -41,7 +42,7 @@ final _avatarThemeDataControlMidLerp = AvatarThemeData(
),
);
final _avatarThemeDataControl2 = AvatarThemeData(
final _avatarThemeDataControl2 = StreamAvatarThemeData(
borderRadius: BorderRadius.circular(12),
constraints: const BoxConstraints.tightFor(
height: 34,
@@ -4,10 +4,10 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
void main() {
test('ChannelHeaderThemeData copyWith, ==, hashCode basics', () {
expect(const ChannelHeaderThemeData(),
const ChannelHeaderThemeData().copyWith());
expect(const ChannelHeaderThemeData().hashCode,
const ChannelHeaderThemeData().copyWith().hashCode);
expect(const StreamChannelHeaderThemeData(),
const StreamChannelHeaderThemeData().copyWith());
expect(const StreamChannelHeaderThemeData().hashCode,
const StreamChannelHeaderThemeData().copyWith().hashCode);
});
group('ChannelHeaderThemeData lerps', () {
@@ -15,7 +15,7 @@ void main() {
'''Light ChannelHeaderThemeData lerps completely to dark ChannelHeaderThemeData''',
() {
expect(
const ChannelHeaderThemeData()
const StreamChannelHeaderThemeData()
.lerp(_channelThemeControl, _channelThemeControlDark, 1),
_channelThemeControlDark);
});
@@ -24,7 +24,7 @@ void main() {
'''Light ChannelHeaderThemeData lerps halfway to dark ChannelHeaderThemeData''',
() {
expect(
const ChannelHeaderThemeData()
const StreamChannelHeaderThemeData()
.lerp(_channelThemeControl, _channelThemeControlDark, 0.5),
_channelThemeControlMidLerp);
});
@@ -33,7 +33,7 @@ void main() {
'''Dark ChannelHeaderThemeData lerps completely to light ChannelHeaderThemeData''',
() {
expect(
const ChannelHeaderThemeData()
const StreamChannelHeaderThemeData()
.lerp(_channelThemeControlDark, _channelThemeControl, 1),
_channelThemeControl);
});
@@ -45,8 +45,8 @@ void main() {
});
}
final _channelThemeControl = ChannelHeaderThemeData(
avatarTheme: AvatarThemeData(
final _channelThemeControl = StreamChannelHeaderThemeData(
avatarTheme: StreamAvatarThemeData(
borderRadius: BorderRadius.circular(20),
constraints: const BoxConstraints.tightFor(
height: 40,
@@ -54,16 +54,16 @@ final _channelThemeControl = ChannelHeaderThemeData(
),
),
color: const Color(0xff101418),
titleStyle: TextTheme.light().headlineBold.copyWith(
titleStyle: StreamTextTheme.light().headlineBold.copyWith(
color: const Color(0xffffffff),
),
subtitleStyle: TextTheme.light().footnote.copyWith(
subtitleStyle: StreamTextTheme.light().footnote.copyWith(
color: const Color(0xff7a7a7a),
),
);
final _channelThemeControlMidLerp = ChannelHeaderThemeData(
avatarTheme: AvatarThemeData(
final _channelThemeControlMidLerp = StreamChannelHeaderThemeData(
avatarTheme: StreamAvatarThemeData(
borderRadius: BorderRadius.circular(20),
constraints: const BoxConstraints.tightFor(
height: 40,
@@ -76,22 +76,22 @@ final _channelThemeControlMidLerp = ChannelHeaderThemeData(
fontWeight: FontWeight.bold,
fontSize: 16,
),
subtitleStyle: TextTheme.light().footnote.copyWith(
subtitleStyle: StreamTextTheme.light().footnote.copyWith(
color: const Color(0xff7a7a7a),
),
);
final _channelThemeControlDark = ChannelHeaderThemeData(
avatarTheme: AvatarThemeData(
final _channelThemeControlDark = StreamChannelHeaderThemeData(
avatarTheme: StreamAvatarThemeData(
borderRadius: BorderRadius.circular(20),
constraints: const BoxConstraints.tightFor(
height: 40,
width: 40,
),
),
color: ColorTheme.dark().barsBg,
titleStyle: TextTheme.dark().headlineBold,
subtitleStyle: TextTheme.dark().footnote.copyWith(
color: StreamColorTheme.dark().barsBg,
titleStyle: StreamTextTheme.dark().headlineBold,
subtitleStyle: StreamTextTheme.dark().footnote.copyWith(
color: const Color(0xff7A7A7A),
),
);
@@ -4,10 +4,10 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
void main() {
test('ChannelListHeaderThemeData copyWith, ==, hashCode basics', () {
expect(const ChannelListHeaderThemeData(),
const ChannelListHeaderThemeData().copyWith());
expect(const ChannelListHeaderThemeData().hashCode,
const ChannelListHeaderThemeData().copyWith().hashCode);
expect(const StreamChannelListHeaderThemeData(),
const StreamChannelListHeaderThemeData().copyWith());
expect(const StreamChannelListHeaderThemeData().hashCode,
const StreamChannelListHeaderThemeData().copyWith().hashCode);
});
group('ChannelListHeaderThemeData lerps', () {
@@ -15,7 +15,7 @@ void main() {
'''Light ChannelListHeaderThemeData lerps completely to dark ChannelListHeaderThemeData''',
() {
expect(
const ChannelListHeaderThemeData().lerp(
const StreamChannelListHeaderThemeData().lerp(
_channelListHeaderThemeControl,
_channelListHeaderThemeControlDark,
1),
@@ -26,7 +26,7 @@ void main() {
'''Light ChannelListHeaderThemeData lerps halfway to dark ChannelListHeaderThemeData''',
() {
expect(
const ChannelListHeaderThemeData().lerp(
const StreamChannelListHeaderThemeData().lerp(
_channelListHeaderThemeControl,
_channelListHeaderThemeControlDark,
0.5),
@@ -37,7 +37,7 @@ void main() {
'''Dark ChannelListHeaderThemeData lerps completely to light ChannelListHeaderThemeData''',
() {
expect(
const ChannelListHeaderThemeData().lerp(
const StreamChannelListHeaderThemeData().lerp(
_channelListHeaderThemeControlDark,
_channelListHeaderThemeControl,
1),
@@ -53,20 +53,20 @@ void main() {
});
}
final _channelListHeaderThemeControl = ChannelListHeaderThemeData(
avatarTheme: AvatarThemeData(
final _channelListHeaderThemeControl = StreamChannelListHeaderThemeData(
avatarTheme: StreamAvatarThemeData(
borderRadius: BorderRadius.circular(20),
constraints: const BoxConstraints.tightFor(
height: 40,
width: 40,
),
),
color: ColorTheme.light().barsBg,
titleStyle: TextTheme.light().headlineBold,
color: StreamColorTheme.light().barsBg,
titleStyle: StreamTextTheme.light().headlineBold,
);
final _channelListHeaderThemeControlMidLerp = ChannelListHeaderThemeData(
avatarTheme: AvatarThemeData(
final _channelListHeaderThemeControlMidLerp = StreamChannelListHeaderThemeData(
avatarTheme: StreamAvatarThemeData(
borderRadius: BorderRadius.circular(20),
constraints: const BoxConstraints.tightFor(
height: 40,
@@ -81,14 +81,14 @@ final _channelListHeaderThemeControlMidLerp = ChannelListHeaderThemeData(
),
);
final _channelListHeaderThemeControlDark = ChannelListHeaderThemeData(
avatarTheme: AvatarThemeData(
final _channelListHeaderThemeControlDark = StreamChannelListHeaderThemeData(
avatarTheme: StreamAvatarThemeData(
borderRadius: BorderRadius.circular(20),
constraints: const BoxConstraints.tightFor(
height: 40,
width: 40,
),
),
color: ColorTheme.dark().barsBg,
titleStyle: TextTheme.dark().headlineBold,
color: StreamColorTheme.dark().barsBg,
titleStyle: StreamTextTheme.dark().headlineBold,
);
@@ -6,16 +6,18 @@ import '../mocks.dart';
void main() {
test('ChannelListViewThemeData copyWith, ==, hashCode basics', () {
expect(const ChannelListViewThemeData(),
const ChannelListViewThemeData().copyWith());
expect(const StreamChannelListViewThemeData(),
const StreamChannelListViewThemeData().copyWith());
});
test(
'''Light ChannelListViewThemeData lerps completely to dark ChannelListViewThemeData''',
() {
expect(
const ChannelListViewThemeData().lerp(_channelListViewThemeDataControl,
_channelListViewThemeDataControlDark, 1),
const StreamChannelListViewThemeData().lerp(
_channelListViewThemeDataControl,
_channelListViewThemeDataControlDark,
1),
_channelListViewThemeDataControlDark);
});
@@ -23,8 +25,10 @@ void main() {
'''Light ChannelListViewThemeData lerps halfway to dark ChannelListViewThemeData''',
() {
expect(
const ChannelListViewThemeData().lerp(_channelListViewThemeDataControl,
_channelListViewThemeDataControlDark, 0.5),
const StreamChannelListViewThemeData().lerp(
_channelListViewThemeDataControl,
_channelListViewThemeDataControlDark,
0.5),
_channelListViewThemeDataControlHalfLerp);
});
@@ -32,7 +36,7 @@ void main() {
'''Dark ChannelListViewThemeData lerps completely to light ChannelListViewThemeData''',
() {
expect(
const ChannelListViewThemeData().lerp(
const StreamChannelListViewThemeData().lerp(
_channelListViewThemeDataControlDark,
_channelListViewThemeDataControl,
1),
@@ -70,7 +74,7 @@ void main() {
),
);
final channelListViewTheme = ChannelListViewTheme.of(_context);
final channelListViewTheme = StreamChannelListViewTheme.of(_context);
expect(channelListViewTheme.backgroundColor,
_channelListViewThemeDataControl.backgroundColor);
});
@@ -92,7 +96,7 @@ void main() {
return Scaffold(
body: StreamChannel(
channel: MockChannel(),
child: const MessageListView(),
child: const StreamMessageListView(),
),
);
},
@@ -100,20 +104,20 @@ void main() {
),
);
final channelListViewTheme = ChannelListViewTheme.of(_context);
final channelListViewTheme = StreamChannelListViewTheme.of(_context);
expect(channelListViewTheme.backgroundColor,
_channelListViewThemeDataControlDark.backgroundColor);
});
}
final _channelListViewThemeDataControl = ChannelListViewThemeData(
backgroundColor: ColorTheme.light().appBg,
final _channelListViewThemeDataControl = StreamChannelListViewThemeData(
backgroundColor: StreamColorTheme.light().appBg,
);
const _channelListViewThemeDataControlHalfLerp = ChannelListViewThemeData(
const _channelListViewThemeDataControlHalfLerp = StreamChannelListViewThemeData(
backgroundColor: Color(0xff818384),
);
final _channelListViewThemeDataControlDark = ChannelListViewThemeData(
backgroundColor: ColorTheme.dark().appBg,
final _channelListViewThemeDataControlDark = StreamChannelListViewThemeData(
backgroundColor: StreamColorTheme.dark().appBg,
);
@@ -4,10 +4,10 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
void main() {
test('ChannelPreviewThemeData copyWith, ==, hashCode basics', () {
expect(const ChannelPreviewThemeData(),
const ChannelPreviewThemeData().copyWith());
expect(const ChannelPreviewThemeData().hashCode,
const ChannelPreviewThemeData().copyWith().hashCode);
expect(const StreamChannelPreviewThemeData(),
const StreamChannelPreviewThemeData().copyWith());
expect(const StreamChannelPreviewThemeData().hashCode,
const StreamChannelPreviewThemeData().copyWith().hashCode);
});
group('ChannelPreviewThemeData lerps', () {
@@ -15,7 +15,7 @@ void main() {
'''Light ChannelPreviewThemeData lerps completely to dark ChannelPreviewThemeData''',
() {
expect(
const ChannelPreviewThemeData().lerp(
const StreamChannelPreviewThemeData().lerp(
_channelPreviewThemeControl, _channelPreviewThemeControlDark, 1),
_channelPreviewThemeControlDark);
});
@@ -24,8 +24,10 @@ void main() {
'''Light ChannelPreviewThemeData lerps halfway to dark ChannelPreviewThemeData''',
() {
expect(
const ChannelPreviewThemeData().lerp(_channelPreviewThemeControl,
_channelPreviewThemeControlDark, 0.5),
const StreamChannelPreviewThemeData().lerp(
_channelPreviewThemeControl,
_channelPreviewThemeControlDark,
0.5),
_channelPreviewThemeControlMidLerp);
});
@@ -33,7 +35,7 @@ void main() {
'''Dark ChannelPreviewThemeData lerps completely to light ChannelPreviewThemeData''',
() {
expect(
const ChannelPreviewThemeData().lerp(
const StreamChannelPreviewThemeData().lerp(
_channelPreviewThemeControlDark, _channelPreviewThemeControl, 1),
_channelPreviewThemeControl);
});
@@ -45,28 +47,28 @@ void main() {
});
}
final _channelPreviewThemeControl = ChannelPreviewThemeData(
unreadCounterColor: ColorTheme.light().accentError,
avatarTheme: AvatarThemeData(
final _channelPreviewThemeControl = StreamChannelPreviewThemeData(
unreadCounterColor: StreamColorTheme.light().accentError,
avatarTheme: StreamAvatarThemeData(
borderRadius: BorderRadius.circular(20),
constraints: const BoxConstraints.tightFor(
height: 40,
width: 40,
),
),
titleStyle: TextTheme.light().bodyBold,
subtitleStyle: TextTheme.light().footnote.copyWith(
titleStyle: StreamTextTheme.light().bodyBold,
subtitleStyle: StreamTextTheme.light().footnote.copyWith(
color: const Color(0xff7A7A7A),
),
lastMessageAtStyle: TextTheme.light().footnote.copyWith(
color: ColorTheme.light().textHighEmphasis.withOpacity(0.5),
lastMessageAtStyle: StreamTextTheme.light().footnote.copyWith(
color: StreamColorTheme.light().textHighEmphasis.withOpacity(0.5),
),
indicatorIconSize: 16,
);
final _channelPreviewThemeControlMidLerp = ChannelPreviewThemeData(
final _channelPreviewThemeControlMidLerp = StreamChannelPreviewThemeData(
unreadCounterColor: const Color(0xffff3742),
avatarTheme: AvatarThemeData(
avatarTheme: StreamAvatarThemeData(
borderRadius: BorderRadius.circular(20),
constraints: const BoxConstraints.tightFor(
height: 40,
@@ -82,27 +84,27 @@ final _channelPreviewThemeControlMidLerp = ChannelPreviewThemeData(
color: Color(0xff7a7a7a),
fontSize: 12,
),
lastMessageAtStyle: TextTheme.light().footnote.copyWith(
lastMessageAtStyle: StreamTextTheme.light().footnote.copyWith(
color: const Color(0x807f7f7f).withOpacity(0.5),
),
indicatorIconSize: 16,
);
final _channelPreviewThemeControlDark = ChannelPreviewThemeData(
unreadCounterColor: ColorTheme.dark().accentError,
avatarTheme: AvatarThemeData(
final _channelPreviewThemeControlDark = StreamChannelPreviewThemeData(
unreadCounterColor: StreamColorTheme.dark().accentError,
avatarTheme: StreamAvatarThemeData(
borderRadius: BorderRadius.circular(20),
constraints: const BoxConstraints.tightFor(
height: 40,
width: 40,
),
),
titleStyle: TextTheme.dark().bodyBold,
subtitleStyle: TextTheme.dark().footnote.copyWith(
titleStyle: StreamTextTheme.dark().bodyBold,
subtitleStyle: StreamTextTheme.dark().footnote.copyWith(
color: const Color(0xff7A7A7A),
),
lastMessageAtStyle: TextTheme.dark().footnote.copyWith(
color: ColorTheme.dark().textHighEmphasis.withOpacity(0.5),
lastMessageAtStyle: StreamTextTheme.dark().footnote.copyWith(
color: StreamColorTheme.dark().textHighEmphasis.withOpacity(0.5),
),
indicatorIconSize: 16,
);
@@ -7,18 +7,20 @@ class MockStreamChatClient extends Mock implements StreamChatClient {}
void main() {
test('GalleryFooterThemeData copyWith, ==, hashCode basics', () {
expect(const GalleryFooterThemeData(),
const GalleryFooterThemeData().copyWith());
expect(const GalleryFooterThemeData().hashCode,
const GalleryFooterThemeData().copyWith().hashCode);
expect(const StreamGalleryFooterThemeData(),
const StreamGalleryFooterThemeData().copyWith());
expect(const StreamGalleryFooterThemeData().hashCode,
const StreamGalleryFooterThemeData().copyWith().hashCode);
});
test(
'''Light GalleryFooterThemeData lerps completely to dark GalleryFooterThemeData''',
() {
expect(
const GalleryFooterThemeData().lerp(_galleryFooterThemeDataControl,
_galleryFooterThemeDataControlDark, 1),
const StreamGalleryFooterThemeData().lerp(
_galleryFooterThemeDataControl,
_galleryFooterThemeDataControlDark,
1),
_galleryFooterThemeDataControlDark);
});
@@ -26,8 +28,10 @@ void main() {
'''Light GalleryFooterThemeData lerps halfway to dark GalleryFooterThemeData''',
() {
expect(
const GalleryFooterThemeData().lerp(_galleryFooterThemeDataControl,
_galleryFooterThemeDataControlDark, 0.5),
const StreamGalleryFooterThemeData().lerp(
_galleryFooterThemeDataControl,
_galleryFooterThemeDataControlDark,
0.5),
_galleryFooterThemeDataControlMidLerp);
});
@@ -35,8 +39,10 @@ void main() {
'''Dark GalleryFooterThemeData lerps completely to light GalleryFooterThemeData''',
() {
expect(
const GalleryFooterThemeData().lerp(_galleryFooterThemeDataControlDark,
_galleryFooterThemeDataControl, 1),
const StreamGalleryFooterThemeData().lerp(
_galleryFooterThemeDataControlDark,
_galleryFooterThemeDataControl,
1),
_galleryFooterThemeDataControl);
});
@@ -68,7 +74,7 @@ void main() {
builder: (context) {
_context = context;
return Scaffold(
appBar: GalleryFooter(
appBar: StreamGalleryFooter(
message: Message(),
),
);
@@ -77,7 +83,7 @@ void main() {
),
);
final imageFooterTheme = GalleryFooterTheme.of(_context);
final imageFooterTheme = StreamGalleryFooterTheme.of(_context);
expect(imageFooterTheme.backgroundColor,
_galleryFooterThemeDataControl.backgroundColor);
expect(imageFooterTheme.shareIconColor,
@@ -111,7 +117,7 @@ void main() {
builder: (context) {
_context = context;
return Scaffold(
appBar: GalleryFooter(
appBar: StreamGalleryFooter(
message: Message(),
),
);
@@ -120,7 +126,7 @@ void main() {
),
);
final imageFooterTheme = GalleryFooterTheme.of(_context);
final imageFooterTheme = StreamGalleryFooterTheme.of(_context);
expect(imageFooterTheme.backgroundColor,
_galleryFooterThemeDataControlDark.backgroundColor);
expect(imageFooterTheme.shareIconColor,
@@ -141,19 +147,19 @@ void main() {
}
// Light theme control
final _galleryFooterThemeDataControl = GalleryFooterThemeData(
backgroundColor: ColorTheme.light().barsBg,
shareIconColor: ColorTheme.light().textHighEmphasis,
titleTextStyle: TextTheme.light().headlineBold,
gridIconButtonColor: ColorTheme.light().textHighEmphasis,
bottomSheetBackgroundColor: ColorTheme.light().barsBg,
bottomSheetBarrierColor: ColorTheme.light().overlay,
bottomSheetCloseIconColor: ColorTheme.light().textHighEmphasis,
bottomSheetPhotosTextStyle: TextTheme.light().headlineBold,
final _galleryFooterThemeDataControl = StreamGalleryFooterThemeData(
backgroundColor: StreamColorTheme.light().barsBg,
shareIconColor: StreamColorTheme.light().textHighEmphasis,
titleTextStyle: StreamTextTheme.light().headlineBold,
gridIconButtonColor: StreamColorTheme.light().textHighEmphasis,
bottomSheetBackgroundColor: StreamColorTheme.light().barsBg,
bottomSheetBarrierColor: StreamColorTheme.light().overlay,
bottomSheetCloseIconColor: StreamColorTheme.light().textHighEmphasis,
bottomSheetPhotosTextStyle: StreamTextTheme.light().headlineBold,
);
// Mid-lerp theme control
const _galleryFooterThemeDataControlMidLerp = GalleryFooterThemeData(
const _galleryFooterThemeDataControlMidLerp = StreamGalleryFooterThemeData(
backgroundColor: Color(0xff87898b),
shareIconColor: Color(0xff7f7f7f),
titleTextStyle: TextStyle(
@@ -173,13 +179,13 @@ const _galleryFooterThemeDataControlMidLerp = GalleryFooterThemeData(
);
// Dark theme control
final _galleryFooterThemeDataControlDark = GalleryFooterThemeData(
backgroundColor: ColorTheme.dark().barsBg,
shareIconColor: ColorTheme.dark().textHighEmphasis,
titleTextStyle: TextTheme.dark().headlineBold,
gridIconButtonColor: ColorTheme.dark().textHighEmphasis,
bottomSheetBackgroundColor: ColorTheme.dark().barsBg,
bottomSheetBarrierColor: ColorTheme.dark().overlay,
bottomSheetCloseIconColor: ColorTheme.dark().textHighEmphasis,
bottomSheetPhotosTextStyle: TextTheme.dark().headlineBold,
final _galleryFooterThemeDataControlDark = StreamGalleryFooterThemeData(
backgroundColor: StreamColorTheme.dark().barsBg,
shareIconColor: StreamColorTheme.dark().textHighEmphasis,
titleTextStyle: StreamTextTheme.dark().headlineBold,
gridIconButtonColor: StreamColorTheme.dark().textHighEmphasis,
bottomSheetBackgroundColor: StreamColorTheme.dark().barsBg,
bottomSheetBarrierColor: StreamColorTheme.dark().overlay,
bottomSheetCloseIconColor: StreamColorTheme.dark().textHighEmphasis,
bottomSheetPhotosTextStyle: StreamTextTheme.dark().headlineBold,
);
@@ -7,18 +7,20 @@ class MockStreamChatClient extends Mock implements StreamChatClient {}
void main() {
test('GalleryHeaderThemeData copyWith, ==, hashCode basics', () {
expect(const GalleryHeaderThemeData(),
const GalleryHeaderThemeData().copyWith());
expect(const GalleryHeaderThemeData().hashCode,
const GalleryHeaderThemeData().copyWith().hashCode);
expect(const StreamGalleryHeaderThemeData(),
const StreamGalleryHeaderThemeData().copyWith());
expect(const StreamGalleryHeaderThemeData().hashCode,
const StreamGalleryHeaderThemeData().copyWith().hashCode);
});
test(
'''Light GalleryHeaderThemeData lerps completely to dark GalleryHeaderThemeData''',
() {
expect(
const GalleryHeaderThemeData().lerp(_galleryHeaderThemeDataControl,
_galleryHeaderThemeDataDarkControl, 1),
const StreamGalleryHeaderThemeData().lerp(
_galleryHeaderThemeDataControl,
_galleryHeaderThemeDataDarkControl,
1),
_galleryHeaderThemeDataDarkControl);
});
@@ -26,8 +28,10 @@ void main() {
'''Light GalleryHeaderThemeData lerps halfway to dark GalleryHeaderThemeData''',
() {
expect(
const GalleryHeaderThemeData().lerp(_galleryHeaderThemeDataControl,
_galleryHeaderThemeDataDarkControl, 0.5),
const StreamGalleryHeaderThemeData().lerp(
_galleryHeaderThemeDataControl,
_galleryHeaderThemeDataDarkControl,
0.5),
_galleryHeaderThemeDataHalfLerpControl);
});
@@ -35,8 +39,10 @@ void main() {
'''Dark GalleryHeaderThemeData lerps completely to light GalleryHeaderThemeData''',
() {
expect(
const GalleryHeaderThemeData().lerp(_galleryHeaderThemeDataDarkControl,
_galleryHeaderThemeDataControl, 1),
const StreamGalleryHeaderThemeData().lerp(
_galleryHeaderThemeDataDarkControl,
_galleryHeaderThemeDataControl,
1),
_galleryHeaderThemeDataControl);
});
@@ -61,7 +67,7 @@ void main() {
builder: (context) {
_context = context;
return Scaffold(
appBar: GalleryHeader(
appBar: StreamGalleryHeader(
message: Message(),
),
);
@@ -70,7 +76,7 @@ void main() {
),
);
final imageHeaderTheme = GalleryHeaderTheme.of(_context);
final imageHeaderTheme = StreamGalleryHeaderTheme.of(_context);
expect(imageHeaderTheme.closeButtonColor,
_galleryHeaderThemeDataControl.closeButtonColor);
expect(imageHeaderTheme.backgroundColor,
@@ -100,7 +106,7 @@ void main() {
builder: (context) {
_context = context;
return Scaffold(
appBar: GalleryHeader(
appBar: StreamGalleryHeader(
message: Message(),
),
);
@@ -109,7 +115,7 @@ void main() {
),
);
final imageHeaderTheme = GalleryHeaderTheme.of(_context);
final imageHeaderTheme = StreamGalleryHeaderTheme.of(_context);
expect(imageHeaderTheme.closeButtonColor,
_galleryHeaderThemeDataDarkControl.closeButtonColor);
expect(imageHeaderTheme.backgroundColor,
@@ -126,7 +132,7 @@ void main() {
}
// Light theme test control.
final _galleryHeaderThemeDataControl = GalleryHeaderThemeData(
final _galleryHeaderThemeDataControl = StreamGalleryHeaderThemeData(
closeButtonColor: const Color(0xff000000),
backgroundColor: const Color(0xffffffff),
iconMenuPointColor: const Color(0xff000000),
@@ -145,7 +151,7 @@ final _galleryHeaderThemeDataControl = GalleryHeaderThemeData(
);
// Light theme test control.
final _galleryHeaderThemeDataHalfLerpControl = GalleryHeaderThemeData(
final _galleryHeaderThemeDataHalfLerpControl = StreamGalleryHeaderThemeData(
closeButtonColor: const Color(0xff7f7f7f),
backgroundColor: const Color(0xff87898b),
iconMenuPointColor: const Color(0xff7f7f7f),
@@ -164,7 +170,7 @@ final _galleryHeaderThemeDataHalfLerpControl = GalleryHeaderThemeData(
);
// Dark theme test control.
final _galleryHeaderThemeDataDarkControl = GalleryHeaderThemeData(
final _galleryHeaderThemeDataDarkControl = StreamGalleryHeaderThemeData(
closeButtonColor: const Color(0xffffffff),
backgroundColor: const Color(0xff101418),
iconMenuPointColor: const Color(0xffffffff),
@@ -4,30 +4,30 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
void main() {
test('MessageInputThemeData copyWith, ==, hashCode basics', () {
expect(const MessageInputThemeData(),
const MessageInputThemeData().copyWith());
expect(const MessageInputThemeData().hashCode,
const MessageInputThemeData().copyWith().hashCode);
expect(const StreamMessageInputThemeData(),
const StreamMessageInputThemeData().copyWith());
expect(const StreamMessageInputThemeData().hashCode,
const StreamMessageInputThemeData().copyWith().hashCode);
});
group('MessageInputThemeData lerps correctly', () {
test('Lerp completely from light to dark', () {
expect(
const MessageInputThemeData().lerp(
const StreamMessageInputThemeData().lerp(
_messageInputThemeControl, _messageInputThemeControlDark, 1),
_messageInputThemeControlDark);
});
test('Lerp halfway from light to dark', () {
expect(
const MessageInputThemeData().lerp(
const StreamMessageInputThemeData().lerp(
_messageInputThemeControl, _messageInputThemeControlDark, 0.5),
_messageInputThemeControlMidLerp);
});
test('Lerp completely from dark to light', () {
expect(
const MessageInputThemeData().lerp(
const StreamMessageInputThemeData().lerp(
_messageInputThemeControlDark, _messageInputThemeControl, 1),
_messageInputThemeControl);
});
@@ -39,33 +39,33 @@ void main() {
});
}
final _messageInputThemeControl = MessageInputThemeData(
final _messageInputThemeControl = StreamMessageInputThemeData(
borderRadius: BorderRadius.circular(20),
sendAnimationDuration: const Duration(milliseconds: 300),
actionButtonColor: ColorTheme.light().accentPrimary,
actionButtonIdleColor: ColorTheme.light().textLowEmphasis,
expandButtonColor: ColorTheme.light().accentPrimary,
sendButtonColor: ColorTheme.light().accentPrimary,
sendButtonIdleColor: ColorTheme.light().disabled,
inputBackgroundColor: ColorTheme.light().barsBg,
inputTextStyle: TextTheme.light().body,
actionButtonColor: StreamColorTheme.light().accentPrimary,
actionButtonIdleColor: StreamColorTheme.light().textLowEmphasis,
expandButtonColor: StreamColorTheme.light().accentPrimary,
sendButtonColor: StreamColorTheme.light().accentPrimary,
sendButtonIdleColor: StreamColorTheme.light().disabled,
inputBackgroundColor: StreamColorTheme.light().barsBg,
inputTextStyle: StreamTextTheme.light().body,
idleBorderGradient: LinearGradient(
stops: const [0.0, 1.0],
colors: [
ColorTheme.light().disabled,
ColorTheme.light().disabled,
StreamColorTheme.light().disabled,
StreamColorTheme.light().disabled,
],
),
activeBorderGradient: LinearGradient(
stops: const [0.0, 1.0],
colors: [
ColorTheme.light().disabled,
ColorTheme.light().disabled,
StreamColorTheme.light().disabled,
StreamColorTheme.light().disabled,
],
),
);
final _messageInputThemeControlMidLerp = MessageInputThemeData(
final _messageInputThemeControlMidLerp = StreamMessageInputThemeData(
borderRadius: BorderRadius.circular(20),
sendAnimationDuration: const Duration(milliseconds: 300),
inputBackgroundColor: const Color(0xff87898b),
@@ -95,28 +95,28 @@ final _messageInputThemeControlMidLerp = MessageInputThemeData(
),
);
final _messageInputThemeControlDark = MessageInputThemeData(
final _messageInputThemeControlDark = StreamMessageInputThemeData(
borderRadius: BorderRadius.circular(20),
sendAnimationDuration: const Duration(milliseconds: 300),
actionButtonColor: ColorTheme.dark().accentPrimary,
actionButtonIdleColor: ColorTheme.dark().textLowEmphasis,
expandButtonColor: ColorTheme.dark().accentPrimary,
sendButtonColor: ColorTheme.dark().accentPrimary,
sendButtonIdleColor: ColorTheme.dark().disabled,
inputBackgroundColor: ColorTheme.dark().barsBg,
inputTextStyle: TextTheme.dark().body,
actionButtonColor: StreamColorTheme.dark().accentPrimary,
actionButtonIdleColor: StreamColorTheme.dark().textLowEmphasis,
expandButtonColor: StreamColorTheme.dark().accentPrimary,
sendButtonColor: StreamColorTheme.dark().accentPrimary,
sendButtonIdleColor: StreamColorTheme.dark().disabled,
inputBackgroundColor: StreamColorTheme.dark().barsBg,
inputTextStyle: StreamTextTheme.dark().body,
idleBorderGradient: LinearGradient(
stops: const [0.0, 1.0],
colors: [
ColorTheme.dark().disabled,
ColorTheme.dark().disabled,
StreamColorTheme.dark().disabled,
StreamColorTheme.dark().disabled,
],
),
activeBorderGradient: LinearGradient(
stops: const [0.0, 1.0],
colors: [
ColorTheme.dark().disabled,
ColorTheme.dark().disabled,
StreamColorTheme.dark().disabled,
StreamColorTheme.dark().disabled,
],
),
);
@@ -9,18 +9,20 @@ class MockStreamChatClient extends Mock implements StreamChatClient {}
void main() {
test('MessageListViewThemeData copyWith, ==, hashCode basics', () {
expect(const MessageListViewThemeData(),
const MessageListViewThemeData().copyWith());
expect(const MessageListViewThemeData().hashCode,
const MessageListViewThemeData().copyWith().hashCode);
expect(const StreamMessageListViewThemeData(),
const StreamMessageListViewThemeData().copyWith());
expect(const StreamMessageListViewThemeData().hashCode,
const StreamMessageListViewThemeData().copyWith().hashCode);
});
test(
'''Light MessageListViewThemeData lerps completely to dark MessageListViewThemeData''',
() {
expect(
const MessageListViewThemeData().lerp(_messageListViewThemeDataControl,
_messageListViewThemeDataControlDark, 1),
const StreamMessageListViewThemeData().lerp(
_messageListViewThemeDataControl,
_messageListViewThemeDataControlDark,
1),
_messageListViewThemeDataControlDark);
});
@@ -28,8 +30,10 @@ void main() {
'''Light MessageListViewThemeData lerps halfway to dark MessageListViewThemeData''',
() {
expect(
const MessageListViewThemeData().lerp(_messageListViewThemeDataControl,
_messageListViewThemeDataControlDark, 0.5),
const StreamMessageListViewThemeData().lerp(
_messageListViewThemeDataControl,
_messageListViewThemeDataControlDark,
0.5),
_messageListViewThemeDataControlHalfLerp);
});
@@ -37,7 +41,7 @@ void main() {
'''Dark MessageListViewThemeData lerps completely to light MessageListViewThemeData''',
() {
expect(
const MessageListViewThemeData().lerp(
const StreamMessageListViewThemeData().lerp(
_messageListViewThemeDataControlDark,
_messageListViewThemeDataControl,
1),
@@ -67,7 +71,7 @@ void main() {
return Scaffold(
body: StreamChannel(
channel: MockChannel(),
child: const MessageListView(),
child: const StreamMessageListView(),
),
);
},
@@ -75,7 +79,7 @@ void main() {
),
);
final messageListViewTheme = MessageListViewTheme.of(_context);
final messageListViewTheme = StreamMessageListViewTheme.of(_context);
expect(messageListViewTheme.backgroundColor,
_messageListViewThemeDataControl.backgroundColor);
});
@@ -97,7 +101,7 @@ void main() {
return Scaffold(
body: StreamChannel(
channel: MockChannel(),
child: const MessageListView(),
child: const StreamMessageListView(),
),
);
},
@@ -105,7 +109,7 @@ void main() {
),
);
final messageListViewTheme = MessageListViewTheme.of(_context);
final messageListViewTheme = StreamMessageListViewTheme.of(_context);
expect(messageListViewTheme.backgroundColor,
_messageListViewThemeDataControlDark.backgroundColor);
});
@@ -128,7 +132,7 @@ void main() {
return Scaffold(
body: StreamChannel(
channel: MockChannel(),
child: const MessageListView(),
child: const StreamMessageListView(),
),
);
},
@@ -136,25 +140,25 @@ void main() {
),
);
final messageListViewTheme = MessageListViewTheme.of(_context);
final messageListViewTheme = StreamMessageListViewTheme.of(_context);
expect(messageListViewTheme.backgroundImage,
_messageListViewThemeDataImage.backgroundImage);
});
}
final _messageListViewThemeDataControl = MessageListViewThemeData(
backgroundColor: ColorTheme.light().barsBg,
final _messageListViewThemeDataControl = StreamMessageListViewThemeData(
backgroundColor: StreamColorTheme.light().barsBg,
);
const _messageListViewThemeDataControlHalfLerp = MessageListViewThemeData(
const _messageListViewThemeDataControlHalfLerp = StreamMessageListViewThemeData(
backgroundColor: Color(0xff87898b),
);
final _messageListViewThemeDataControlDark = MessageListViewThemeData(
backgroundColor: ColorTheme.dark().barsBg,
final _messageListViewThemeDataControlDark = StreamMessageListViewThemeData(
backgroundColor: StreamColorTheme.dark().barsBg,
);
const _messageListViewThemeDataImage = MessageListViewThemeData(
const _messageListViewThemeDataImage = StreamMessageListViewThemeData(
backgroundImage: DecorationImage(
image: AssetImage('example/assets/background_doodle.png'),
fit: BoxFit.cover,
@@ -6,17 +6,17 @@ import '../mocks.dart';
void main() {
test('MessageSearchListViewThemeData copyWith, ==, hashCode basics', () {
expect(const MessageSearchListViewThemeData(),
const MessageSearchListViewThemeData().copyWith());
expect(const MessageSearchListViewThemeData().hashCode,
const MessageSearchListViewThemeData().copyWith().hashCode);
expect(const StreamMessageSearchListViewThemeData(),
const StreamMessageSearchListViewThemeData().copyWith());
expect(const StreamMessageSearchListViewThemeData().hashCode,
const StreamMessageSearchListViewThemeData().copyWith().hashCode);
});
test(
'''Light MessageSearchListViewThemeData lerps completely to dark MessageSearchListViewThemeData''',
() {
expect(
const MessageSearchListViewThemeData().lerp(
const StreamMessageSearchListViewThemeData().lerp(
_messageSearchListViewThemeDataControl,
_messageSearchListViewThemeDataControlDark,
1),
@@ -27,7 +27,7 @@ void main() {
'''Light MessageSearchListViewThemeData lerps halfway to dark MessageSearchListViewThemeData''',
() {
expect(
const MessageSearchListViewThemeData().lerp(
const StreamMessageSearchListViewThemeData().lerp(
_messageSearchListViewThemeDataControl,
_messageSearchListViewThemeDataControlDark,
0.5),
@@ -38,7 +38,7 @@ void main() {
'''Dark MessageSearchListViewThemeData lerps completely to light MessageSearchListViewThemeData''',
() {
expect(
const MessageSearchListViewThemeData().lerp(
const StreamMessageSearchListViewThemeData().lerp(
_messageSearchListViewThemeDataControlDark,
_messageSearchListViewThemeDataControl,
1),
@@ -67,7 +67,7 @@ void main() {
_context = context;
return Scaffold(
body: MessageSearchBloc(
child: MessageSearchListView(
child: StreamMessageSearchListView(
filters: Filter.in_('members', const ['test_id']),
messageQuery: 'test query',
),
@@ -78,7 +78,8 @@ void main() {
),
);
final messageSearchListViewTheme = MessageSearchListViewTheme.of(_context);
final messageSearchListViewTheme =
StreamMessageSearchListViewTheme.of(_context);
expect(messageSearchListViewTheme.backgroundColor,
_messageSearchListViewThemeDataControl.backgroundColor);
});
@@ -99,7 +100,7 @@ void main() {
_context = context;
return Scaffold(
body: MessageSearchBloc(
child: MessageSearchListView(
child: StreamMessageSearchListView(
filters: Filter.in_('members', const ['test_id']),
messageQuery: 'test query',
),
@@ -110,22 +111,24 @@ void main() {
),
);
final messageSearchListViewTheme = MessageSearchListViewTheme.of(_context);
final messageSearchListViewTheme =
StreamMessageSearchListViewTheme.of(_context);
expect(messageSearchListViewTheme.backgroundColor,
_messageSearchListViewThemeDataControlDark.backgroundColor);
});
}
final _messageSearchListViewThemeDataControl = MessageSearchListViewThemeData(
backgroundColor: ColorTheme.light().appBg,
final _messageSearchListViewThemeDataControl =
StreamMessageSearchListViewThemeData(
backgroundColor: StreamColorTheme.light().appBg,
);
const _messageSearchListViewThemeDataControlHalfLerp =
MessageSearchListViewThemeData(
StreamMessageSearchListViewThemeData(
backgroundColor: Color(0xff818384),
);
final _messageSearchListViewThemeDataControlDark =
MessageSearchListViewThemeData(
backgroundColor: ColorTheme.dark().appBg,
StreamMessageSearchListViewThemeData(
backgroundColor: StreamColorTheme.dark().appBg,
);
@@ -4,16 +4,17 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
void main() {
test('MessageThemeData copyWith, ==, hashCode basics', () {
expect(const MessageThemeData(), const MessageThemeData().copyWith());
expect(const MessageThemeData().hashCode,
const MessageThemeData().copyWith().hashCode);
expect(const StreamMessageThemeData(),
const StreamMessageThemeData().copyWith());
expect(const StreamMessageThemeData().hashCode,
const StreamMessageThemeData().copyWith().hashCode);
});
group('MessageThemeData lerps', () {
test('''Light MessageThemeData lerps completely to dark MessageThemeData''',
() {
expect(
const MessageThemeData()
const StreamMessageThemeData()
.lerp(_messageThemeControl, _messageThemeControlDark, 1),
_messageThemeControlDark);
});
@@ -21,7 +22,7 @@ void main() {
test('''Dark MessageThemeData lerps completely to light MessageThemeData''',
() {
expect(
const MessageThemeData()
const StreamMessageThemeData()
.lerp(_messageThemeControlDark, _messageThemeControl, 1),
_messageThemeControl);
});
@@ -33,23 +34,23 @@ void main() {
});
}
final _messageThemeControl = MessageThemeData(
messageAuthorStyle: TextTheme.light().footnote.copyWith(
color: ColorTheme.light().textLowEmphasis,
final _messageThemeControl = StreamMessageThemeData(
messageAuthorStyle: StreamTextTheme.light().footnote.copyWith(
color: StreamColorTheme.light().textLowEmphasis,
),
messageTextStyle: TextTheme.light().body,
createdAtStyle: TextTheme.light().footnote.copyWith(
color: ColorTheme.light().textLowEmphasis,
messageTextStyle: StreamTextTheme.light().body,
createdAtStyle: StreamTextTheme.light().footnote.copyWith(
color: StreamColorTheme.light().textLowEmphasis,
),
repliesStyle: TextTheme.light().footnoteBold.copyWith(
color: ColorTheme.light().accentPrimary,
repliesStyle: StreamTextTheme.light().footnoteBold.copyWith(
color: StreamColorTheme.light().accentPrimary,
),
messageBackgroundColor: ColorTheme.light().disabled,
reactionsBackgroundColor: ColorTheme.light().barsBg,
reactionsBorderColor: ColorTheme.light().borders,
reactionsMaskColor: ColorTheme.light().appBg,
messageBorderColor: ColorTheme.light().disabled,
avatarTheme: AvatarThemeData(
messageBackgroundColor: StreamColorTheme.light().disabled,
reactionsBackgroundColor: StreamColorTheme.light().barsBg,
reactionsBorderColor: StreamColorTheme.light().borders,
reactionsMaskColor: StreamColorTheme.light().appBg,
messageBorderColor: StreamColorTheme.light().disabled,
avatarTheme: StreamAvatarThemeData(
borderRadius: BorderRadius.circular(20),
constraints: const BoxConstraints.tightFor(
height: 32,
@@ -57,28 +58,28 @@ final _messageThemeControl = MessageThemeData(
),
),
messageLinksStyle: TextStyle(
color: ColorTheme.light().accentPrimary,
color: StreamColorTheme.light().accentPrimary,
),
linkBackgroundColor: ColorTheme.light().linkBg,
linkBackgroundColor: StreamColorTheme.light().linkBg,
);
final _messageThemeControlDark = MessageThemeData(
messageAuthorStyle: TextTheme.dark().footnote.copyWith(
color: ColorTheme.dark().textLowEmphasis,
final _messageThemeControlDark = StreamMessageThemeData(
messageAuthorStyle: StreamTextTheme.dark().footnote.copyWith(
color: StreamColorTheme.dark().textLowEmphasis,
),
messageTextStyle: TextTheme.dark().body,
createdAtStyle: TextTheme.dark().footnote.copyWith(
color: ColorTheme.dark().textLowEmphasis,
messageTextStyle: StreamTextTheme.dark().body,
createdAtStyle: StreamTextTheme.dark().footnote.copyWith(
color: StreamColorTheme.dark().textLowEmphasis,
),
repliesStyle: TextTheme.dark().footnoteBold.copyWith(
color: ColorTheme.dark().accentPrimary,
repliesStyle: StreamTextTheme.dark().footnoteBold.copyWith(
color: StreamColorTheme.dark().accentPrimary,
),
messageBackgroundColor: ColorTheme.dark().disabled,
reactionsBackgroundColor: ColorTheme.dark().barsBg,
reactionsBorderColor: ColorTheme.dark().borders,
reactionsMaskColor: ColorTheme.dark().appBg,
messageBorderColor: ColorTheme.dark().disabled,
avatarTheme: AvatarThemeData(
messageBackgroundColor: StreamColorTheme.dark().disabled,
reactionsBackgroundColor: StreamColorTheme.dark().barsBg,
reactionsBorderColor: StreamColorTheme.dark().borders,
reactionsMaskColor: StreamColorTheme.dark().appBg,
messageBorderColor: StreamColorTheme.dark().disabled,
avatarTheme: StreamAvatarThemeData(
borderRadius: BorderRadius.circular(20),
constraints: const BoxConstraints.tightFor(
height: 32,
@@ -86,7 +87,7 @@ final _messageThemeControlDark = MessageThemeData(
),
),
messageLinksStyle: TextStyle(
color: ColorTheme.dark().accentPrimary,
color: StreamColorTheme.dark().accentPrimary,
),
linkBackgroundColor: ColorTheme.dark().linkBg,
linkBackgroundColor: StreamColorTheme.dark().linkBg,
);
@@ -6,15 +6,15 @@ import '../mocks.dart';
void main() {
test('UserListViewThemeData copyWith, ==, hashCode basics', () {
expect(const UserListViewThemeData(),
const UserListViewThemeData().copyWith());
expect(const StreamUserListViewThemeData(),
const StreamUserListViewThemeData().copyWith());
});
test(
'''Light UserListViewThemeData lerps completely to dark UserListViewThemeData''',
() {
expect(
const UserListViewThemeData().lerp(_userListViewThemeDataControl,
const StreamUserListViewThemeData().lerp(_userListViewThemeDataControl,
_userListViewThemeDataControlDark, 1),
_userListViewThemeDataControlDark);
});
@@ -23,7 +23,7 @@ void main() {
'''Light UserListViewThemeData lerps halfway to dark UserListViewThemeData''',
() {
expect(
const UserListViewThemeData().lerp(_userListViewThemeDataControl,
const StreamUserListViewThemeData().lerp(_userListViewThemeDataControl,
_userListViewThemeDataControlDark, 0.5),
_userListViewThemeDataControlHalfLerp);
});
@@ -32,8 +32,10 @@ void main() {
'''Dark UserListViewThemeData lerps completely to light UserListViewThemeData''',
() {
expect(
const UserListViewThemeData().lerp(_userListViewThemeDataControlDark,
_userListViewThemeDataControl, 1),
const StreamUserListViewThemeData().lerp(
_userListViewThemeDataControlDark,
_userListViewThemeDataControl,
1),
_userListViewThemeDataControl);
});
@@ -58,7 +60,7 @@ void main() {
_context = context;
return Scaffold(
body: UsersBloc(
child: UserListView(),
child: StreamUserListView(),
),
);
},
@@ -66,7 +68,7 @@ void main() {
),
);
final userListViewTheme = UserListViewTheme.of(_context);
final userListViewTheme = StreamUserListViewTheme.of(_context);
expect(userListViewTheme.backgroundColor,
_userListViewThemeDataControl.backgroundColor);
});
@@ -87,7 +89,7 @@ void main() {
_context = context;
return Scaffold(
body: UsersBloc(
child: UserListView(),
child: StreamUserListView(),
),
);
},
@@ -95,20 +97,20 @@ void main() {
),
);
final userListViewTheme = UserListViewTheme.of(_context);
final userListViewTheme = StreamUserListViewTheme.of(_context);
expect(userListViewTheme.backgroundColor,
_userListViewThemeDataControlDark.backgroundColor);
});
}
final _userListViewThemeDataControl = UserListViewThemeData(
backgroundColor: ColorTheme.light().appBg,
final _userListViewThemeDataControl = StreamUserListViewThemeData(
backgroundColor: StreamColorTheme.light().appBg,
);
const _userListViewThemeDataControlHalfLerp = UserListViewThemeData(
const _userListViewThemeDataControlHalfLerp = StreamUserListViewThemeData(
backgroundColor: Color(0xff818384),
);
final _userListViewThemeDataControlDark = UserListViewThemeData(
backgroundColor: ColorTheme.dark().appBg,
final _userListViewThemeDataControlDark = StreamUserListViewThemeData(
backgroundColor: StreamColorTheme.dark().appBg,
);