Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
57720b2f
E
engine
项目概览
weixin_43355755
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
57720b2f
编写于
7月 13, 2021
作者:
Z
Zachary Anderson
提交者:
GitHub
7月 13, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "NNBD migration for scenario_app (#27362)" (#27364)
This reverts commit
462d2452
.
上级
462d2452
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
69 addition
and
53 deletion
+69
-53
build/dart/rules.gni
build/dart/rules.gni
+0
-1
testing/scenario_app/lib/main.dart
testing/scenario_app/lib/main.dart
+6
-6
testing/scenario_app/lib/src/animated_color_square.dart
testing/scenario_app/lib/src/animated_color_square.dart
+2
-1
testing/scenario_app/lib/src/bogus_font_text.dart
testing/scenario_app/lib/src/bogus_font_text.dart
+1
-0
testing/scenario_app/lib/src/channel_util.dart
testing/scenario_app/lib/src/channel_util.dart
+10
-8
testing/scenario_app/lib/src/initial_route_reply.dart
testing/scenario_app/lib/src/initial_route_reply.dart
+1
-0
testing/scenario_app/lib/src/locale_initialization.dart
testing/scenario_app/lib/src/locale_initialization.dart
+2
-0
testing/scenario_app/lib/src/platform_echo_mixin.dart
testing/scenario_app/lib/src/platform_echo_mixin.dart
+3
-2
testing/scenario_app/lib/src/platform_view.dart
testing/scenario_app/lib/src/platform_view.dart
+28
-26
testing/scenario_app/lib/src/poppable_screen.dart
testing/scenario_app/lib/src/poppable_screen.dart
+3
-2
testing/scenario_app/lib/src/scenario.dart
testing/scenario_app/lib/src/scenario.dart
+3
-2
testing/scenario_app/lib/src/scenarios.dart
testing/scenario_app/lib/src/scenarios.dart
+5
-4
testing/scenario_app/lib/src/send_text_focus_semantics.dart
testing/scenario_app/lib/src/send_text_focus_semantics.dart
+2
-0
testing/scenario_app/lib/src/touches_scenario.dart
testing/scenario_app/lib/src/touches_scenario.dart
+2
-0
testing/scenario_app/pubspec.yaml
testing/scenario_app/pubspec.yaml
+1
-1
未找到文件。
build/dart/rules.gni
浏览文件 @
57720b2f
...
...
@@ -50,7 +50,6 @@ template("dart_snapshot") {
"--depfile=$abs_depfile",
"--depfile_output_filename=$rebased_output",
"--disable-dart-dev",
"--sound-null-safety",
]
args = [
...
...
testing/scenario_app/lib/main.dart
浏览文件 @
57720b2f
...
...
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.6
import
'dart:convert'
;
import
'dart:developer'
as
developer
;
import
'dart:io'
;
...
...
@@ -27,7 +27,7 @@ void main() {
}
void
_handleDriverMessage
(
Map
<
String
,
dynamic
>
call
)
{
final
String
?
methodName
=
call
[
'method'
]
as
String
?
;
final
String
methodName
=
call
[
'method'
]
as
String
;
switch
(
methodName
)
{
case
'set_scenario'
:
assert
(
call
[
'args'
]
!=
null
);
...
...
@@ -39,7 +39,7 @@ void _handleDriverMessage(Map<String, dynamic> call) {
}
Future
<
void
>
_handlePlatformMessage
(
String
name
,
ByteData
?
data
,
PlatformMessageResponseCallback
?
callback
)
async
{
String
name
,
ByteData
data
,
PlatformMessageResponseCallback
callback
)
async
{
if
(
data
!=
null
)
{
print
(
'
$name
=
${utf8.decode(data.buffer.asUint8List())}
'
);
}
else
{
...
...
@@ -48,11 +48,11 @@ Future<void> _handlePlatformMessage(
switch
(
name
)
{
case
'driver'
:
_handleDriverMessage
(
json
.
decode
(
utf8
.
decode
(
data
!
.
buffer
.
asUint8List
()))
as
Map
<
String
,
dynamic
>);
_handleDriverMessage
(
json
.
decode
(
utf8
.
decode
(
data
.
buffer
.
asUint8List
()))
as
Map
<
String
,
dynamic
>);
break
;
case
'write_timeline'
:
final
String
timelineData
=
await
_getTimelineData
();
callback
!
(
Uint8List
.
fromList
(
utf8
.
encode
(
timelineData
)).
buffer
.
asByteData
());
callback
(
Uint8List
.
fromList
(
utf8
.
encode
(
timelineData
)).
buffer
.
asByteData
());
break
;
default
:
currentScenario
?.
onPlatformMessage
(
name
,
data
,
callback
);
...
...
@@ -61,7 +61,7 @@ Future<void> _handlePlatformMessage(
Future
<
String
>
_getTimelineData
()
async
{
final
developer
.
ServiceProtocolInfo
info
=
await
developer
.
Service
.
getInfo
();
final
Uri
vmServiceTimelineUri
=
info
.
serverUri
!
.
resolve
(
'getVMTimeline'
);
final
Uri
vmServiceTimelineUri
=
info
.
serverUri
.
resolve
(
'getVMTimeline'
);
final
Map
<
String
,
dynamic
>
vmServiceTimelineJson
=
await
_getJson
(
vmServiceTimelineUri
);
final
Map
<
String
,
dynamic
>
vmServiceResult
=
vmServiceTimelineJson
[
'result'
]
as
Map
<
String
,
dynamic
>;
return
json
.
encode
(<
String
,
dynamic
>{
...
...
testing/scenario_app/lib/src/animated_color_square.dart
浏览文件 @
57720b2f
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.6
import
'dart:math'
as
math
;
import
'dart:ui'
;
...
...
@@ -88,7 +89,7 @@ class _NumberSwinger<T extends num> {
/// The current value of the swinger.
T
get
current
=>
_current
;
late
T
_current
;
T
_current
;
bool
_up
;
...
...
testing/scenario_app/lib/src/bogus_font_text.dart
浏览文件 @
57720b2f
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.6
import
'dart:ui'
;
import
'channel_util.dart'
;
...
...
testing/scenario_app/lib/src/channel_util.dart
浏览文件 @
57720b2f
...
...
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.6
import
'dart:convert'
;
import
'dart:ui'
;
...
...
@@ -10,11 +12,11 @@ import 'package:meta/meta.dart';
/// Util method to replicate the behavior of a `MethodChannel` in the Flutter
/// framework.
void
sendJsonMethodCall
(
{
required
PlatformDispatcher
dispatcher
,
required
String
channel
,
required
String
method
,
@
required
PlatformDispatcher
dispatcher
,
@
required
String
channel
,
@
required
String
method
,
dynamic
arguments
,
PlatformMessageResponseCallback
?
callback
,
PlatformMessageResponseCallback
callback
,
})
{
sendJsonMessage
(
dispatcher:
dispatcher
,
...
...
@@ -28,10 +30,10 @@ void sendJsonMethodCall({
/// Send a JSON message over a channel.
void
sendJsonMessage
(
{
required
PlatformDispatcher
dispatcher
,
required
String
channel
,
required
Map
<
String
,
dynamic
>
json
,
PlatformMessageResponseCallback
?
callback
,
@
required
PlatformDispatcher
dispatcher
,
@
required
String
channel
,
@
required
Map
<
String
,
dynamic
>
json
,
PlatformMessageResponseCallback
callback
,
})
{
dispatcher
.
sendPlatformMessage
(
channel
,
...
...
testing/scenario_app/lib/src/initial_route_reply.dart
浏览文件 @
57720b2f
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.6
import
'dart:ui'
;
import
'channel_util.dart'
;
...
...
testing/scenario_app/lib/src/locale_initialization.dart
浏览文件 @
57720b2f
...
...
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.6
import
'dart:typed_data'
;
import
'dart:ui'
;
...
...
testing/scenario_app/lib/src/platform_echo_mixin.dart
浏览文件 @
57720b2f
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.6
import
'dart:typed_data'
;
import
'dart:ui'
;
...
...
@@ -12,8 +13,8 @@ mixin PlatformEchoMixin on Scenario {
@override
void
onPlatformMessage
(
String
name
,
ByteData
?
data
,
PlatformMessageResponseCallback
?
callback
,
ByteData
data
,
PlatformMessageResponseCallback
callback
,
)
{
window
.
sendPlatformMessage
(
name
,
data
,
null
);
}
...
...
testing/scenario_app/lib/src/platform_view.dart
浏览文件 @
57720b2f
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.6
import
'dart:convert'
;
import
'dart:io'
;
import
'dart:typed_data'
;
...
...
@@ -32,7 +33,7 @@ class PlatformViewScenario extends Scenario with _BasePlatformViewScenarioMixin
/// Creates the PlatformView scenario.
///
/// The [dispatcher] parameter must not be null.
PlatformViewScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
required
this
.
id
})
PlatformViewScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
this
.
id
})
:
assert
(
dispatcher
!=
null
),
super
(
dispatcher
)
{
createPlatformView
(
dispatcher
,
text
,
id
);
...
...
@@ -57,7 +58,7 @@ class NonFullScreenFlutterViewPlatformViewScenario extends Scenario
/// The [dispatcher] parameter must not be null.
NonFullScreenFlutterViewPlatformViewScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
required
this
.
id
})
{
this
.
id
})
:
assert
(
dispatcher
!=
null
),
super
(
dispatcher
)
{
createPlatformView
(
dispatcher
,
text
,
id
);
...
...
@@ -79,7 +80,7 @@ class PlatformViewNoOverlayIntersectionScenario extends Scenario with _BasePlatf
/// Creates the PlatformView scenario.
///
/// The [dispatcher] parameter must not be null.
PlatformViewNoOverlayIntersectionScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
required
this
.
id
})
PlatformViewNoOverlayIntersectionScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
this
.
id
})
:
assert
(
dispatcher
!=
null
),
super
(
dispatcher
)
{
createPlatformView
(
dispatcher
,
text
,
id
);
...
...
@@ -105,7 +106,7 @@ class PlatformViewPartialIntersectionScenario extends Scenario with _BasePlatfor
/// Creates the PlatformView scenario.
///
/// The [dispatcher] parameter must not be null.
PlatformViewPartialIntersectionScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
required
this
.
id
})
PlatformViewPartialIntersectionScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
this
.
id
})
:
assert
(
dispatcher
!=
null
),
super
(
dispatcher
)
{
createPlatformView
(
dispatcher
,
text
,
id
);
...
...
@@ -131,7 +132,7 @@ class PlatformViewTwoIntersectingOverlaysScenario extends Scenario with _BasePla
/// Creates the PlatformView scenario.
///
/// The [dispatcher] parameter must not be null.
PlatformViewTwoIntersectingOverlaysScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
required
this
.
id
})
PlatformViewTwoIntersectingOverlaysScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
this
.
id
})
:
assert
(
dispatcher
!=
null
),
super
(
dispatcher
)
{
createPlatformView
(
dispatcher
,
text
,
id
);
...
...
@@ -170,7 +171,7 @@ class PlatformViewOneOverlayTwoIntersectingOverlaysScenario extends Scenario wit
/// Creates the PlatformView scenario.
///
/// The [dispatcher] parameter must not be null.
PlatformViewOneOverlayTwoIntersectingOverlaysScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
required
this
.
id
})
PlatformViewOneOverlayTwoIntersectingOverlaysScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
this
.
id
})
:
assert
(
dispatcher
!=
null
),
super
(
dispatcher
)
{
createPlatformView
(
dispatcher
,
text
,
id
);
...
...
@@ -214,7 +215,7 @@ class MultiPlatformViewWithoutOverlaysScenario extends Scenario with _BasePlatfo
/// Creates the PlatformView scenario.
///
/// The [dispatcher] parameter must not be null.
MultiPlatformViewWithoutOverlaysScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
required
this
.
firstId
,
required
this
.
secondId
})
MultiPlatformViewWithoutOverlaysScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
this
.
firstId
,
this
.
secondId
})
:
assert
(
dispatcher
!=
null
),
super
(
dispatcher
)
{
createPlatformView
(
dispatcher
,
text
,
firstId
);
...
...
@@ -258,7 +259,7 @@ class PlatformViewMaxOverlaysScenario extends Scenario with _BasePlatformViewSce
/// Creates the PlatformView scenario.
///
/// The [dispatcher] parameter must not be null.
PlatformViewMaxOverlaysScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
required
this
.
id
})
PlatformViewMaxOverlaysScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
this
.
id
})
:
assert
(
dispatcher
!=
null
),
super
(
dispatcher
)
{
createPlatformView
(
dispatcher
,
text
,
id
);
...
...
@@ -307,7 +308,7 @@ class MultiPlatformViewScenario extends Scenario with _BasePlatformViewScenarioM
/// Creates the PlatformView scenario.
///
/// The [dispatcher] parameter must not be null.
MultiPlatformViewScenario
(
PlatformDispatcher
dispatcher
,
{
required
this
.
firstId
,
required
this
.
secondId
})
MultiPlatformViewScenario
(
PlatformDispatcher
dispatcher
,
{
this
.
firstId
,
this
.
secondId
})
:
assert
(
dispatcher
!=
null
),
super
(
dispatcher
)
{
createPlatformView
(
dispatcher
,
'platform view 1'
,
firstId
);
...
...
@@ -341,7 +342,7 @@ class MultiPlatformViewBackgroundForegroundScenario extends Scenario with _BaseP
/// Creates the PlatformView scenario.
///
/// The [dispatcher] parameter must not be null.
MultiPlatformViewBackgroundForegroundScenario
(
PlatformDispatcher
dispatcher
,
{
required
this
.
firstId
,
required
this
.
secondId
})
MultiPlatformViewBackgroundForegroundScenario
(
PlatformDispatcher
dispatcher
,
{
this
.
firstId
,
this
.
secondId
})
:
assert
(
dispatcher
!=
null
),
super
(
dispatcher
)
{
_nextFrame
=
_firstFrame
;
...
...
@@ -360,7 +361,7 @@ class MultiPlatformViewBackgroundForegroundScenario extends Scenario with _BaseP
_nextFrame
();
}
late
VoidCallback
_nextFrame
;
VoidCallback
_nextFrame
;
void
_firstFrame
()
{
final
SceneBuilder
builder
=
SceneBuilder
();
...
...
@@ -406,13 +407,13 @@ class MultiPlatformViewBackgroundForegroundScenario extends Scenario with _BaseP
@override
void
onPlatformMessage
(
String
name
,
ByteData
?
data
,
PlatformMessageResponseCallback
?
callback
,
ByteData
data
,
PlatformMessageResponseCallback
callback
,
)
{
if
(
name
!=
'flutter/lifecycle'
)
{
return
;
}
final
String
message
=
utf8
.
decode
(
data
!
.
buffer
.
asUint8List
());
final
String
message
=
utf8
.
decode
(
data
.
buffer
.
asUint8List
());
if
(
_lastLifecycleState
==
'AppLifecycleState.inactive'
&&
message
==
'AppLifecycleState.resumed'
)
{
_nextFrame
=
_secondFrame
;
window
.
scheduleFrame
();
...
...
@@ -425,7 +426,7 @@ class MultiPlatformViewBackgroundForegroundScenario extends Scenario with _BaseP
/// Platform view with clip rect.
class
PlatformViewClipRectScenario
extends
Scenario
with
_BasePlatformViewScenarioMixin
{
/// Constructs a platform view with clip rect scenario.
PlatformViewClipRectScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
required
this
.
id
})
PlatformViewClipRectScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
this
.
id
})
:
assert
(
dispatcher
!=
null
),
super
(
dispatcher
)
{
createPlatformView
(
dispatcher
,
text
,
id
);
...
...
@@ -523,10 +524,15 @@ class PlatformViewOpacityScenario extends PlatformViewScenario {
/// A simple platform view for testing touch events from iOS.
class
PlatformViewForTouchIOSScenario
extends
Scenario
with
_BasePlatformViewScenarioMixin
{
int
_viewId
;
bool
_accept
;
VoidCallback
_nextFrame
;
/// Creates the PlatformView scenario.
///
/// The [dispatcher] parameter must not be null.
PlatformViewForTouchIOSScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
int
id
=
0
,
required
bool
accept
,
bool
rejectUntilTouchesEnded
=
false
})
PlatformViewForTouchIOSScenario
(
PlatformDispatcher
dispatcher
,
String
text
,
{
int
id
=
0
,
bool
accept
,
bool
rejectUntilTouchesEnded
=
false
})
:
assert
(
dispatcher
!=
null
),
_accept
=
accept
,
_viewId
=
id
,
...
...
@@ -539,10 +545,6 @@ class PlatformViewForTouchIOSScenario extends Scenario
_nextFrame
=
_firstFrame
;
}
int
_viewId
;
bool
_accept
;
late
VoidCallback
_nextFrame
;
@override
void
onBeginFrame
(
Duration
duration
)
{
_nextFrame
();
...
...
@@ -585,7 +587,7 @@ class PlatformViewForTouchIOSScenario extends Scenario
window
.
sendPlatformMessage
(
'flutter/platform_views'
,
message
.
buffer
.
asByteData
(),
(
ByteData
?
response
)
{},
(
ByteData
response
)
{},
);
}
...
...
@@ -620,10 +622,10 @@ class PlatformViewWithContinuousTexture extends PlatformViewScenario {
}
mixin
_BasePlatformViewScenarioMixin
on
Scenario
{
int
?
_textureId
;
int
_textureId
;
bool
get
usesAndroidHybridComposition
{
return
(
scenarioParams
[
'use_android_view'
]
as
bool
?
)
==
true
;
return
(
scenarioParams
[
'use_android_view'
]
as
bool
)
==
true
;
}
/// Construct the platform view related scenario
...
...
@@ -700,7 +702,7 @@ mixin _BasePlatformViewScenarioMixin on Scenario {
dispatcher
.
sendPlatformMessage
(
'flutter/platform_views'
,
message
.
buffer
.
asByteData
(),
(
ByteData
?
response
)
{
(
ByteData
response
)
{
if
(
response
!=
null
&&
Platform
.
isAndroid
&&
!
usesAndroidHybridComposition
)
{
// Envelope.
_textureId
=
response
.
getUint8
(
0
);
...
...
@@ -721,7 +723,7 @@ mixin _BasePlatformViewScenarioMixin on Scenario {
if
(
usesAndroidHybridComposition
)
{
sceneBuilder
.
addPlatformView
(
viewId
,
width:
width
,
height:
height
);
}
else
if
(
_textureId
!=
null
)
{
sceneBuilder
.
addTexture
(
_textureId
!
,
width:
width
,
height:
height
);
sceneBuilder
.
addTexture
(
_textureId
,
width:
width
,
height:
height
);
}
}
else
{
throw
UnsupportedError
(
'Platform
${Platform.operatingSystem}
is not supported'
);
...
...
@@ -732,7 +734,7 @@ mixin _BasePlatformViewScenarioMixin on Scenario {
void
finishBuilderByAddingPlatformViewAndPicture
(
SceneBuilder
sceneBuilder
,
int
viewId
,
{
Offset
?
overlayOffset
,
Offset
overlayOffset
,
})
{
overlayOffset
??=
const
Offset
(
50
,
50
);
_addPlatformViewToScene
(
...
...
testing/scenario_app/lib/src/poppable_screen.dart
浏览文件 @
57720b2f
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.6
import
'dart:ui'
;
import
'package:scenario_app/src/channel_util.dart'
;
...
...
@@ -19,7 +20,7 @@ class PoppableScreenScenario extends Scenario with PlatformEchoMixin {
super
(
dispatcher
);
// Rect for the pop button. Only defined once onMetricsChanged is called.
Rect
?
_buttonRect
;
Rect
_buttonRect
;
@override
void
onBeginFrame
(
Duration
duration
)
{
...
...
@@ -31,7 +32,7 @@ class PoppableScreenScenario extends Scenario with PlatformEchoMixin {
if
(
_buttonRect
!=
null
)
{
canvas
.
drawRect
(
_buttonRect
!
,
_buttonRect
,
Paint
()..
color
=
const
Color
.
fromARGB
(
255
,
255
,
0
,
0
),
);
}
...
...
testing/scenario_app/lib/src/scenario.dart
浏览文件 @
57720b2f
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.6
import
'dart:typed_data'
;
import
'dart:ui'
;
...
...
@@ -58,7 +59,7 @@ abstract class Scenario {
/// See [PlatformDispatcher.onPlatformMessage].
void
onPlatformMessage
(
String
name
,
ByteData
?
data
,
PlatformMessageResponseCallback
?
callback
,
ByteData
data
,
PlatformMessageResponseCallback
callback
,
)
{}
}
testing/scenario_app/lib/src/scenarios.dart
浏览文件 @
57720b2f
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.6
import
'dart:ui'
;
import
'animated_color_square.dart'
;
...
...
@@ -52,7 +53,7 @@ Map<String, ScenarioFactory> _scenarios = <String, ScenarioFactory>{
Map
<
String
,
dynamic
>
_currentScenarioParams
=
<
String
,
dynamic
>{};
Scenario
?
_currentScenarioInstance
;
Scenario
_currentScenarioInstance
;
/// Loads an scenario.
/// The map must contain a `name` entry, which equals to the name of the scenario.
...
...
@@ -62,16 +63,16 @@ void loadScenario(Map<String, dynamic> scenario) {
_currentScenarioParams
=
scenario
;
if
(
_currentScenarioInstance
!=
null
)
{
_currentScenarioInstance
!
.
unmount
();
_currentScenarioInstance
.
unmount
();
}
_currentScenarioInstance
=
_scenarios
[
scenario
[
'name'
]]
!
();
_currentScenarioInstance
=
_scenarios
[
scenario
[
'name'
]]();
window
.
scheduleFrame
();
print
(
'Loading scenario
$scenarioName
'
);
}
/// Gets the loaded [Scenario].
Scenario
?
get
currentScenario
{
Scenario
get
currentScenario
{
return
_currentScenarioInstance
;
}
...
...
testing/scenario_app/lib/src/send_text_focus_semantics.dart
浏览文件 @
57720b2f
...
...
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.6
import
'dart:typed_data'
;
import
'dart:ui'
;
...
...
testing/scenario_app/lib/src/touches_scenario.dart
浏览文件 @
57720b2f
...
...
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.6
import
'dart:ui'
;
import
'channel_util.dart'
;
...
...
testing/scenario_app/pubspec.yaml
浏览文件 @
57720b2f
...
...
@@ -5,7 +5,7 @@
name
:
scenario_app
publish_to
:
none
environment
:
sdk
:
'
>=2.12.0
<3.0.0'
sdk
:
'
>=2.12.0
-0
<3.0.0'
# Do not add any dependencies that require more than what is provided in
# //third_party/dart/pkg, //third_party/dart/third_party/pkg, or
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录