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
@@ -58,7 +58,7 @@ void main() {
child: StreamChannel(
channel: channel,
child: const Scaffold(
body: ChannelHeader(),
body: StreamChannelHeader(),
),
),
),
@@ -67,7 +67,7 @@ void main() {
expect(find.text('test'), findsOneWidget);
expect(find.byType(ChannelAvatar), findsOneWidget);
expect(find.byType(StreamBackButton), findsOneWidget);
expect(find.byType(ChannelInfo), findsOneWidget);
expect(find.byType(StreamChannelInfo), findsOneWidget);
},
);
@@ -124,7 +124,7 @@ void main() {
child: StreamChannel(
channel: channel,
child: const Scaffold(
body: ChannelHeader(
body: StreamChannelHeader(
showConnectionStateTile: true,
),
),
@@ -132,8 +132,12 @@ void main() {
),
));
expect(tester.widget<InfoTile>(find.byType(InfoTile)).showMessage, true);
expect(tester.widget<InfoTile>(find.byType(InfoTile)).message,
expect(
tester
.widget<StreamInfoTile>(find.byType(StreamInfoTile))
.showMessage,
true);
expect(tester.widget<StreamInfoTile>(find.byType(StreamInfoTile)).message,
'Disconnected');
},
);
@@ -190,7 +194,7 @@ void main() {
channel: channel,
showLoading: false,
child: const Scaffold(
body: ChannelHeader(
body: StreamChannelHeader(
showConnectionStateTile: true,
),
),
@@ -200,8 +204,12 @@ void main() {
await tester.pump();
expect(tester.widget<InfoTile>(find.byType(InfoTile)).showMessage, true);
expect(tester.widget<InfoTile>(find.byType(InfoTile)).message,
expect(
tester
.widget<StreamInfoTile>(find.byType(StreamInfoTile))
.showMessage,
true);
expect(tester.widget<StreamInfoTile>(find.byType(StreamInfoTile)).message,
'Reconnecting...');
},
);
@@ -257,7 +265,7 @@ void main() {
child: StreamChannel(
channel: channel,
child: const Scaffold(
body: ChannelHeader(
body: StreamChannelHeader(
leading: Text('leading'),
subtitle: Text('subtitle'),
actions: [
@@ -273,7 +281,7 @@ void main() {
expect(find.text('test'), findsNothing);
expect(find.byType(StreamBackButton), findsNothing);
expect(find.byType(ChannelAvatar), findsNothing);
expect(find.byType(ChannelInfo), findsNothing);
expect(find.byType(StreamChannelInfo), findsNothing);
expect(find.text('leading'), findsOneWidget);
expect(find.text('title'), findsOneWidget);
expect(find.text('subtitle'), findsOneWidget);
@@ -331,7 +339,7 @@ void main() {
child: StreamChannel(
channel: channel,
child: const Scaffold(
body: ChannelHeader(
body: StreamChannelHeader(
showTypingIndicator: false,
showBackButton: false,
),
@@ -343,10 +351,14 @@ void main() {
expect(find.byType(StreamBackButton), findsNothing);
expect(
tester
.widget<ChannelInfo>(find.byType(ChannelInfo))
.widget<StreamChannelInfo>(find.byType(StreamChannelInfo))
.showTypingIndicator,
false);
expect(tester.widget<InfoTile>(find.byType(InfoTile)).showMessage, false);
expect(
tester
.widget<StreamInfoTile>(find.byType(StreamInfoTile))
.showMessage,
false);
},
);
@@ -405,7 +417,7 @@ void main() {
child: StreamChannel(
channel: channel,
child: Scaffold(
body: ChannelHeader(
body: StreamChannelHeader(
onBackPressed: () => backPressed = true,
onImageTap: () => imageTapped = true,
onTitleTap: () => titleTapped = true,