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
734a90eb
Unverified
Commit
734a90eb
authored
Aug 19, 2020
by
Michael Goderbauer
Committed by
GitHub
Aug 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migrate semantics to nullsafety (#64055)
parent
6ca9cd7b
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
408 additions
and
413 deletions
+408
-413
analysis_options.yaml
packages/flutter/analysis_options.yaml
+1
-0
semantics.dart
packages/flutter/lib/semantics.dart
+0
-2
binding.dart
packages/flutter/lib/src/semantics/binding.dart
+4
-5
debug.dart
packages/flutter/lib/src/semantics/debug.dart
+1
-2
semantics.dart
packages/flutter/lib/src/semantics/semantics.dart
+401
-401
semantics_event.dart
packages/flutter/lib/src/semantics/semantics_event.dart
+1
-2
semantics_service.dart
packages/flutter/lib/src/semantics/semantics_service.dart
+0
-1
No files found.
packages/flutter/analysis_options.yaml
View file @
734a90eb
...
...
@@ -7,5 +7,6 @@ analyzer:
-
non-nullable
errors
:
always_require_non_null_named_parameters
:
false
# not needed with nnbd
type_init_formals
:
false
# https://github.com/dart-lang/linter/issues/2192
void_checks
:
false
# https://github.com/dart-lang/linter/issues/2185
unnecessary_null_comparison
:
false
# https://github.com/dart-lang/language/issues/1018 , turned off until https://github.com/flutter/flutter/issues/61042
packages/flutter/lib/semantics.dart
View file @
734a90eb
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
/// The Flutter semantics package.
///
/// To use, import `package:flutter/semantics.dart`.
...
...
packages/flutter/lib/src/semantics/binding.dart
View file @
734a90eb
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'dart:ui'
as
ui
show
AccessibilityFeatures
,
SemanticsUpdateBuilder
;
...
...
@@ -16,8 +15,8 @@ export 'dart:ui' show AccessibilityFeatures;
// TODO(jonahwilliams): move the remaining semantic related bindings here.
mixin
SemanticsBinding
on
BindingBase
{
/// The current [SemanticsBinding], if one has been created.
static
SemanticsBinding
get
instance
=>
_instance
;
static
SemanticsBinding
_instance
;
static
SemanticsBinding
?
get
instance
=>
_instance
;
static
SemanticsBinding
?
_instance
;
@override
void
initInstances
()
{
...
...
@@ -53,7 +52,7 @@ mixin SemanticsBinding on BindingBase {
/// [WidgetsBindingObserver] and listen to
/// [WidgetsBindingObserver.didChangeAccessibilityFeatures].
ui
.
AccessibilityFeatures
get
accessibilityFeatures
=>
_accessibilityFeatures
;
ui
.
AccessibilityFeatures
_accessibilityFeatures
;
late
ui
.
AccessibilityFeatures
_accessibilityFeatures
;
/// The platform is requesting that animations be disabled or simplified.
///
...
...
@@ -63,7 +62,7 @@ mixin SemanticsBinding on BindingBase {
bool
value
=
_accessibilityFeatures
.
disableAnimations
;
assert
(()
{
if
(
debugSemanticsDisableAnimations
!=
null
)
value
=
debugSemanticsDisableAnimations
;
value
=
debugSemanticsDisableAnimations
!
;
return
true
;
}());
return
value
;
...
...
packages/flutter/lib/src/semantics/debug.dart
View file @
734a90eb
...
...
@@ -2,10 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
/// Overrides the setting of [SemanticsBinding.disableAnimations] for debugging
/// and testing.
///
/// This value is ignored in non-debug builds.
bool
debugSemanticsDisableAnimations
;
bool
?
debugSemanticsDisableAnimations
;
packages/flutter/lib/src/semantics/semantics.dart
View file @
734a90eb
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/semantics/semantics_event.dart
View file @
734a90eb
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'package:flutter/foundation.dart'
;
import
'package:flutter/painting.dart'
;
...
...
@@ -30,7 +29,7 @@ abstract class SemanticsEvent {
///
/// [nodeId] is the unique identifier of the semantics node associated with
/// the event, or null if the event is not associated with a semantics node.
Map
<
String
,
dynamic
>
toMap
({
int
nodeId
})
{
Map
<
String
,
dynamic
>
toMap
({
int
?
nodeId
})
{
final
Map
<
String
,
dynamic
>
event
=
<
String
,
dynamic
>{
'type'
:
type
,
'data'
:
getDataMap
(),
...
...
packages/flutter/lib/src/semantics/semantics_service.dart
View file @
734a90eb
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'dart:async'
;
import
'dart:ui'
show
TextDirection
;
...
...
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