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
4055e196
Unverified
Commit
4055e196
authored
Nov 26, 2019
by
Alexandre Ardhuin
Committed by
GitHub
Nov 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implicit-casts:false in flutter/lib/src/foundation (#45503)
parent
9e72a80a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
20 deletions
+22
-20
_bitfield_io.dart
packages/flutter/lib/src/foundation/_bitfield_io.dart
+7
-5
_isolates_io.dart
packages/flutter/lib/src/foundation/_isolates_io.dart
+3
-3
assertions.dart
packages/flutter/lib/src/foundation/assertions.dart
+3
-3
diagnostics.dart
packages/flutter/lib/src/foundation/diagnostics.dart
+1
-1
key.dart
packages/flutter/lib/src/foundation/key.dart
+2
-2
synchronous_future.dart
packages/flutter/lib/src/foundation/synchronous_future.dart
+6
-6
No files found.
packages/flutter/lib/src/foundation/_bitfield_io.dart
View file @
4055e196
...
...
@@ -28,17 +28,19 @@ class BitField<T extends dynamic> implements bitfield.BitField<T> {
@override
bool
operator
[](
T
index
)
{
assert
(
index
.
index
<
_length
);
return
(
_bits
&
1
<<
index
.
index
)
>
0
;
final
int
_index
=
index
.
index
as
int
;
assert
(
_index
<
_length
);
return
(
_bits
&
1
<<
_index
)
>
0
;
}
@override
void
operator
[]=(
T
index
,
bool
value
)
{
assert
(
index
.
index
<
_length
);
final
int
_index
=
index
.
index
as
int
;
assert
(
_index
<
_length
);
if
(
value
)
_bits
=
_bits
|
(
1
<<
index
.
index
);
_bits
=
_bits
|
(
1
<<
_
index
);
else
_bits
=
_bits
&
~(
1
<<
index
.
index
);
_bits
=
_bits
&
~(
1
<<
_
index
);
}
@override
...
...
packages/flutter/lib/src/foundation/_isolates_io.dart
View file @
4055e196
...
...
@@ -38,7 +38,7 @@ Future<R> compute<Q, R>(isolates.ComputeCallback<Q, R> callback, Q message, { St
assert
(
errorData
is
List
<
dynamic
>);
assert
(
errorData
.
length
==
2
);
final
Exception
exception
=
Exception
(
errorData
[
0
]);
final
StackTrace
stack
=
StackTrace
.
fromString
(
errorData
[
1
]);
final
StackTrace
stack
=
StackTrace
.
fromString
(
errorData
[
1
]
as
String
);
if
(
result
.
isCompleted
)
{
Zone
.
current
.
handleUncaughtError
(
exception
,
stack
);
}
else
{
...
...
@@ -48,7 +48,7 @@ Future<R> compute<Q, R>(isolates.ComputeCallback<Q, R> callback, Q message, { St
resultPort
.
listen
((
dynamic
resultData
)
{
assert
(
resultData
==
null
||
resultData
is
R
);
if
(!
result
.
isCompleted
)
result
.
complete
(
resultData
);
result
.
complete
(
resultData
as
R
);
});
await
result
.
future
;
Timeline
.
startSync
(
'
$debugLabel
: end'
,
flow:
Flow
.
end
(
flow
.
id
));
...
...
@@ -74,7 +74,7 @@ class _IsolateConfiguration<Q, R> {
final
String
debugLabel
;
final
int
flowId
;
R
apply
()
=>
callback
(
message
);
FutureOr
<
R
>
apply
()
=>
callback
(
message
);
}
Future
<
void
>
_spawn
<
Q
,
R
>(
_IsolateConfiguration
<
Q
,
FutureOr
<
R
>>
configuration
)
async
{
...
...
packages/flutter/lib/src/foundation/assertions.dart
View file @
4055e196
...
...
@@ -335,7 +335,7 @@ class FlutterErrorDetails extends Diagnosticable {
}
longMessage
??=
fullMessage
;
}
else
if
(
exception
is
String
)
{
longMessage
=
exception
;
longMessage
=
exception
as
String
;
}
else
if
(
exception
is
Error
||
exception
is
Exception
)
{
longMessage
=
exception
.
toString
();
}
else
{
...
...
@@ -349,10 +349,10 @@ class FlutterErrorDetails extends Diagnosticable {
Diagnosticable
_exceptionToDiagnosticable
()
{
if
(
exception
is
FlutterError
)
{
return
exception
;
return
exception
as
FlutterError
;
}
if
(
exception
is
AssertionError
&&
exception
.
message
is
FlutterError
)
{
return
exception
.
message
;
return
exception
.
message
as
FlutterError
;
}
return
null
;
}
...
...
packages/flutter/lib/src/foundation/diagnostics.dart
View file @
4055e196
...
...
@@ -3110,7 +3110,7 @@ mixin DiagnosticableMixin {
DiagnosticsNode
toDiagnosticsNode
({
String
name
,
DiagnosticsTreeStyle
style
})
{
return
DiagnosticableNode
<
Diagnosticable
>(
name:
name
,
value:
this
,
value:
this
as
Diagnosticable
,
style:
style
,
);
}
...
...
packages/flutter/lib/src/foundation/key.dart
View file @
4055e196
...
...
@@ -67,8 +67,8 @@ class ValueKey<T> extends LocalKey {
bool
operator
==(
dynamic
other
)
{
if
(
other
.
runtimeType
!=
runtimeType
)
return
false
;
final
ValueKey
<
T
>
typedOther
=
other
;
return
value
==
typedOther
.
value
;
return
other
is
ValueKey
<
T
>
&&
other
.
value
==
value
;
}
@override
...
...
packages/flutter/lib/src/foundation/synchronous_future.dart
View file @
4055e196
...
...
@@ -31,25 +31,25 @@ class SynchronousFuture<T> implements Future<T> {
}
@override
Future
<
T
>
catchError
(
Function
onError
,
{
bool
test
(
dynamic
error
)
})
=>
Completer
<
T
>().
future
;
Future
<
T
>
catchError
(
Function
onError
,
{
bool
test
(
Object
error
)
})
=>
Completer
<
T
>().
future
;
@override
Future
<
E
>
then
<
E
>(
dynamic
f
(
T
value
),
{
Function
onError
})
{
Future
<
E
>
then
<
E
>(
FutureOr
<
E
>
f
(
T
value
),
{
Function
onError
})
{
final
dynamic
result
=
f
(
_value
);
if
(
result
is
Future
<
E
>)
return
result
;
return
SynchronousFuture
<
E
>(
result
);
return
SynchronousFuture
<
E
>(
result
as
E
);
}
@override
Future
<
T
>
timeout
(
Duration
timeLimit
,
{
dynamic
onTimeout
()
})
{
Future
<
T
>
timeout
(
Duration
timeLimit
,
{
FutureOr
<
T
>
onTimeout
()
})
{
return
Future
<
T
>.
value
(
_value
).
timeout
(
timeLimit
,
onTimeout:
onTimeout
);
}
@override
Future
<
T
>
whenComplete
(
dynamic
action
())
{
Future
<
T
>
whenComplete
(
FutureOr
<
dynamic
>
action
())
{
try
{
final
dynamic
result
=
action
();
final
FutureOr
<
dynamic
>
result
=
action
();
if
(
result
is
Future
)
return
result
.
then
<
T
>((
dynamic
value
)
=>
_value
);
return
this
;
...
...
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