Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
e6d4b8cf
Unverified
Commit
e6d4b8cf
authored
Apr 23, 2021
by
Jonah Williams
Committed by
GitHub
Apr 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Migrate channels to null safety (#80641)" (#81050)
This reverts commit
f55b2665
.
parent
f55b2665
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
15 deletions
+16
-15
main.dart
dev/integration_tests/channels/lib/main.dart
+2
-2
basic_messaging.dart
dev/integration_tests/channels/lib/src/basic_messaging.dart
+8
-8
test_step.dart
dev/integration_tests/channels/lib/src/test_step.dart
+3
-2
pubspec.yaml
dev/integration_tests/channels/pubspec.yaml
+1
-1
main_test.dart
dev/integration_tests/channels/test_driver/main_test.dart
+2
-2
No files found.
dev/integration_tests/channels/lib/main.dart
View file @
e6d4b8cf
...
...
@@ -19,7 +19,7 @@ void main() {
}
class
TestApp
extends
StatefulWidget
{
const
TestApp
({
Key
?
key
})
:
super
(
key:
key
);
const
TestApp
({
Key
key
})
:
super
(
key:
key
);
@override
_TestAppState
createState
()
=>
_TestAppState
();
...
...
@@ -155,7 +155,7 @@ class _TestAppState extends State<TestApp> {
()
=>
basicJsonMessageToUnknownChannel
(),
()
=>
basicStandardMessageToUnknownChannel
(),
];
Future
<
TestStepResult
>
?
_result
;
Future
<
TestStepResult
>
_result
;
int
_step
=
0
;
void
_executeNextStep
()
{
...
...
dev/integration_tests/channels/lib/src/basic_messaging.dart
View file @
e6d4b8cf
...
...
@@ -42,25 +42,25 @@ class ExtendedStandardMessageCodec extends StandardMessageCodec {
}
}
Future
<
TestStepResult
>
basicBinaryHandshake
(
ByteData
?
message
)
async
{
Future
<
TestStepResult
>
basicBinaryHandshake
(
ByteData
message
)
async
{
const
BasicMessageChannel
<
ByteData
>
channel
=
BasicMessageChannel
<
ByteData
>(
'binary-msg'
,
BinaryCodec
(),
);
return
_basicMessageHandshake
<
ByteData
?
>(
return
_basicMessageHandshake
<
ByteData
>(
'Binary >
${toString(message)}
<'
,
channel
,
message
);
}
Future
<
TestStepResult
>
basicStringHandshake
(
String
?
message
)
async
{
Future
<
TestStepResult
>
basicStringHandshake
(
String
message
)
async
{
const
BasicMessageChannel
<
String
>
channel
=
BasicMessageChannel
<
String
>(
'string-msg'
,
StringCodec
(),
);
return
_basicMessageHandshake
<
String
?
>(
'String >
$message
<'
,
channel
,
message
);
return
_basicMessageHandshake
<
String
>(
'String >
$message
<'
,
channel
,
message
);
}
Future
<
TestStepResult
>
basicJsonHandshake
(
Object
?
message
)
async
{
Future
<
TestStepResult
>
basicJsonHandshake
(
dynamic
message
)
async
{
const
BasicMessageChannel
<
dynamic
>
channel
=
BasicMessageChannel
<
dynamic
>(
'json-msg'
,
...
...
@@ -126,9 +126,9 @@ Future<TestStepResult> _basicMessageHandshake<T>(
T
message
,
)
async
{
final
List
<
dynamic
>
received
=
<
dynamic
>[];
channel
.
setMessageHandler
((
T
?
message
)
async
{
channel
.
setMessageHandler
((
T
message
)
async
{
received
.
add
(
message
);
return
message
!
;
return
message
;
});
dynamic
messageEcho
=
nothing
;
dynamic
error
=
nothing
;
...
...
@@ -150,7 +150,7 @@ Future<TestStepResult> _basicMessageHandshake<T>(
/// Sends a message on a channel that no one listens on.
Future
<
TestStepResult
>
_basicMessageToUnknownChannel
<
T
>(
String
description
,
BasicMessageChannel
<
T
?
>
channel
,
BasicMessageChannel
<
T
>
channel
,
)
async
{
dynamic
messageEcho
=
nothing
;
dynamic
error
=
nothing
;
...
...
dev/integration_tests/channels/lib/src/test_step.dart
View file @
e6d4b8cf
...
...
@@ -44,11 +44,12 @@ class TestStepResult {
return
const
TestStepResult
(
'Executing'
,
nothing
,
TestStatus
.
pending
);
case
ConnectionState
.
done
:
if
(
snapshot
.
hasData
)
{
return
snapshot
.
data
!
;
return
snapshot
.
data
;
}
else
{
final
TestStepResult
result
=
snapshot
.
error
!
as
TestStepResult
;
final
TestStepResult
result
=
snapshot
.
error
as
TestStepResult
;
return
result
;
}
break
;
default
:
throw
'Unsupported state
${snapshot.connectionState}
'
;
}
...
...
dev/integration_tests/channels/pubspec.yaml
View file @
e6d4b8cf
...
...
@@ -2,7 +2,7 @@ name: channels
description
:
Integration test for platform channels.
environment
:
sdk
:
"
>=2.
12
.0
<3.0.0"
sdk
:
"
>=2.
0.0-dev.68
.0
<3.0.0"
dependencies
:
flutter
:
...
...
dev/integration_tests/channels/test_driver/main_test.dart
View file @
e6d4b8cf
...
...
@@ -7,7 +7,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
void
main
(
)
{
group
(
'channel suite'
,
()
{
late
FlutterDriver
driver
;
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
...
...
@@ -28,7 +28,7 @@ void main() {
},
timeout:
const
Timeout
(
Duration
(
minutes:
1
)));
tearDownAll
(()
async
{
driver
.
close
();
driver
?
.
close
();
});
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment