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
b6ff67cc
Commit
b6ff67cc
authored
Mar 10, 2016
by
Ian Hickson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2568 from Hixie/always_declare_return_types
Enable always_declare_return_types lint
parents
bdc83886
c7339de6
Changes
50
Hide whitespace changes
Inline
Side-by-side
Showing
50 changed files
with
99 additions
and
142 deletions
+99
-142
media_service.dart
examples/layers/services/media_service.dart
+1
-1
scroll_perf_test.dart
examples/stocks/test_driver/scroll_perf_test.dart
+1
-1
param.dart
packages/cassowary/lib/param.dart
+1
-1
row.dart
packages/cassowary/lib/row.dart
+2
-2
solver.dart
packages/cassowary/lib/solver.dart
+1
-1
utils.dart
packages/cassowary/lib/utils.dart
+0
-5
variable.dart
packages/cassowary/lib/variable.dart
+1
-1
binding.dart
packages/flutter/lib/src/widgets/binding.dart
+1
-1
semantics_debugger.dart
packages/flutter/lib/src/widgets/semantics_debugger.dart
+1
-1
lsq_solver_test.dart
packages/flutter/test/gestures/lsq_solver_test.dart
+1
-1
test_semantics.dart
packages/flutter/test/widget/test_semantics.dart
+1
-1
find.dart
packages/flutter_driver/lib/src/find.dart
+6
-10
health.dart
packages/flutter_driver/lib/src/health.dart
+1
-1
flutter_driver_test.dart
packages/flutter_driver/test/flutter_driver_test.dart
+2
-2
retry_test.dart
packages/flutter_driver/test/retry_test.dart
+1
-1
action.dart
packages/flutter_sprites/lib/src/action.dart
+1
-1
effect_line.dart
packages/flutter_sprites/lib/src/effect_line.dart
+1
-1
label.dart
packages/flutter_sprites/lib/src/label.dart
+2
-2
node.dart
packages/flutter_sprites/lib/src/node.dart
+2
-2
node3d.dart
packages/flutter_sprites/lib/src/node3d.dart
+3
-3
physics_body.dart
packages/flutter_sprites/lib/src/physics_body.dart
+14
-14
physics_group.dart
packages/flutter_sprites/lib/src/physics_group.dart
+8
-8
physics_joint.dart
packages/flutter_sprites/lib/src/physics_joint.dart
+6
-6
physics_world.dart
packages/flutter_sprites/lib/src/physics_world.dart
+3
-3
sound.dart
packages/flutter_sprites/lib/src/sound.dart
+2
-5
sprite_box.dart
packages/flutter_sprites/lib/src/sprite_box.dart
+4
-3
textured_line.dart
packages/flutter_sprites/lib/src/textured_line.dart
+4
-4
flutter_tools.dart
packages/flutter_tools/bin/flutter_tools.dart
+3
-1
adb.dart
packages/flutter_tools/lib/src/android/adb.dart
+1
-1
analyze.dart
packages/flutter_tools/lib/src/commands/analyze.dart
+1
-0
adb_test.dart
packages/flutter_tools/test/adb_test.dart
+1
-3
analyze_test.dart
packages/flutter_tools/test/analyze_test.dart
+1
-3
android_device_test.dart
packages/flutter_tools/test/android_device_test.dart
+1
-3
base_utils_test.dart
packages/flutter_tools/test/base_utils_test.dart
+1
-3
context_test.dart
packages/flutter_tools/test/context_test.dart
+1
-3
create_test.dart
packages/flutter_tools/test/create_test.dart
+1
-3
daemon_test.dart
packages/flutter_tools/test/daemon_test.dart
+1
-3
device_test.dart
packages/flutter_tools/test/device_test.dart
+1
-3
devices.test.dart
packages/flutter_tools/test/devices.test.dart
+1
-3
drive_test.dart
packages/flutter_tools/test/drive_test.dart
+3
-5
install_test.dart
packages/flutter_tools/test/install_test.dart
+1
-3
listen_test.dart
packages/flutter_tools/test/listen_test.dart
+1
-3
logs_test.dart
packages/flutter_tools/test/logs_test.dart
+1
-3
os_utils_test.dart
packages/flutter_tools/test/os_utils_test.dart
+1
-3
run_test.dart
packages/flutter_tools/test/run_test.dart
+1
-3
service_protocol_test.dart
packages/flutter_tools/test/service_protocol_test.dart
+1
-3
stop_test.dart
packages/flutter_tools/test/stop_test.dart
+1
-3
trace_test.dart
packages/flutter_tools/test/trace_test.dart
+1
-3
bundle_test.dart
packages/flx/test/bundle_test.dart
+2
-1
signing_test.dart
packages/flx/test/signing_test.dart
+1
-1
No files found.
examples/layers/services/media_service.dart
View file @
b6ff67cc
...
...
@@ -121,7 +121,7 @@ Widget splashScreen() {
);
}
main
()
async
{
Future
main
(
)
async
{
runApp
(
splashScreen
());
PianoApp
app
=
new
PianoApp
();
...
...
examples/stocks/test_driver/scroll_perf_test.dart
View file @
b6ff67cc
...
...
@@ -6,7 +6,7 @@ import 'dart:async';
import
'package:flutter_driver/flutter_driver.dart'
;
import
'package:test/test.dart'
;
main
()
{
void
main
(
)
{
group
(
'scrolling performance test'
,
()
{
FlutterDriver
driver
;
...
...
packages/cassowary/lib/param.dart
View file @
b6ff67cc
...
...
@@ -23,7 +23,7 @@ class Param extends _EquationMember {
double
get
value
=>
variable
.
value
;
String
get
name
=>
variable
.
name
;
set
name
(
String
name
)
{
variable
.
name
=
name
;
}
void
set
name
(
String
name
)
{
variable
.
name
=
name
;
}
Expression
asExpression
()
=>
new
Expression
([
new
Term
(
variable
,
1.0
)],
0.0
);
}
packages/cassowary/lib/row.dart
View file @
b6ff67cc
...
...
@@ -16,7 +16,7 @@ class _Row {
double
add
(
double
value
)
=>
constant
+=
value
;
void
insertSymbol
(
_Symbol
symbol
,
[
double
coefficient
=
1.0
])
{
double
val
=
_elvis
(
cells
[
symbol
],
0.0
)
;
double
val
=
cells
[
symbol
]
??
0.0
;
if
(
_nearZero
(
val
+
coefficient
))
{
cells
.
remove
(
symbol
);
...
...
@@ -52,7 +52,7 @@ class _Row {
solveForSymbol
(
rhs
);
}
double
coefficientForSymbol
(
_Symbol
symbol
)
=>
_elvis
(
cells
[
symbol
],
0.0
)
;
double
coefficientForSymbol
(
_Symbol
symbol
)
=>
cells
[
symbol
]
??
0.0
;
void
substitute
(
_Symbol
symbol
,
_Row
row
)
{
double
coefficient
=
cells
[
symbol
];
...
...
packages/cassowary/lib/solver.dart
View file @
b6ff67cc
...
...
@@ -583,7 +583,7 @@ class Solver {
}
}
return
_elvis
(
entering
,
new
_Symbol
(
_SymbolType
.
invalid
,
0
)
);
return
entering
??
new
_Symbol
(
_SymbolType
.
invalid
,
0
);
}
String
toString
()
{
...
...
packages/cassowary/lib/utils.dart
View file @
b6ff67cc
...
...
@@ -9,11 +9,6 @@ bool _nearZero(double value) {
return
value
<
0.0
?
-
value
<
epsilon
:
value
<
epsilon
;
}
// Workaround for the lack of a null coalescing operator. Uses a ternary
// instead. Sadly, due the lack of generic types on functions, we have to use
// dynamic instead.
_elvis
(
a
,
b
)
=>
a
!=
null
?
a
:
b
;
class
_Pair
<
X
,
Y
>
{
X
first
;
Y
second
;
...
...
packages/cassowary/lib/variable.dart
View file @
b6ff67cc
...
...
@@ -21,7 +21,7 @@ class Variable {
return
res
;
}
String
get
debugName
=>
_elvis
(
name
,
'variable
$_tick
'
)
;
String
get
debugName
=>
name
??
'variable
$_tick
'
;
@override
String
toString
()
=>
debugName
;
...
...
packages/flutter/lib/src/widgets/binding.dart
View file @
b6ff67cc
...
...
@@ -35,7 +35,7 @@ class WidgetFlutterBinding extends BindingBase with Scheduler, Gesturer, Service
return
_instance
;
}
initInstances
()
{
void
initInstances
()
{
super
.
initInstances
();
_instance
=
this
;
BuildableElement
.
scheduleBuildFor
=
scheduleBuildFor
;
...
...
packages/flutter/lib/src/widgets/semantics_debugger.dart
View file @
b6ff67cc
...
...
@@ -311,7 +311,7 @@ class _SemanticsDebuggerListener implements mojom.SemanticsListener {
int
generation
=
0
;
updateSemanticsTree
(
List
<
mojom
.
SemanticsNode
>
nodes
)
{
void
updateSemanticsTree
(
List
<
mojom
.
SemanticsNode
>
nodes
)
{
generation
+=
1
;
for
(
mojom
.
SemanticsNode
node
in
nodes
)
_updateNode
(
node
);
...
...
packages/flutter/test/gestures/lsq_solver_test.dart
View file @
b6ff67cc
...
...
@@ -7,7 +7,7 @@ import 'package:test/test.dart';
void
main
(
)
{
approx
(
double
value
,
double
expectation
)
{
bool
approx
(
double
value
,
double
expectation
)
{
const
double
eps
=
1
e
-
6
;
return
(
value
-
expectation
).
abs
()
<
eps
;
}
...
...
packages/flutter/test/widget/test_semantics.dart
View file @
b6ff67cc
...
...
@@ -10,7 +10,7 @@ class TestSemanticsListener implements mojom.SemanticsListener {
SemanticsNode
.
addListener
(
this
);
}
final
List
<
mojom
.
SemanticsNode
>
updates
=
<
mojom
.
SemanticsNode
>[];
updateSemanticsTree
(
List
<
mojom
.
SemanticsNode
>
nodes
)
{
void
updateSemanticsTree
(
List
<
mojom
.
SemanticsNode
>
nodes
)
{
assert
(!
nodes
.
any
((
mojom
.
SemanticsNode
node
)
=>
node
==
null
));
updates
.
addAll
(
nodes
);
updates
.
add
(
null
);
...
...
packages/flutter_driver/lib/src/find.dart
View file @
b6ff67cc
...
...
@@ -7,6 +7,10 @@ import 'message.dart';
const
List
<
Type
>
_supportedKeyValueTypes
=
const
<
Type
>[
String
,
int
];
DriverError
_createInvalidKeyValueTypeError
(
String
invalidType
)
{
return
new
DriverError
(
'Unsupported key value type
$invalidType
. Flutter Driver only supports
${_supportedKeyValueTypes.join(", ")}
'
);
}
/// Command to find an element.
class
Find
extends
Command
{
final
String
kind
=
'find'
;
...
...
@@ -20,10 +24,6 @@ class Find extends Command {
static
Find
deserialize
(
Map
<
String
,
String
>
json
)
{
return
new
Find
(
SearchSpecification
.
deserialize
(
json
));
}
static
_throwInvalidKeyValueType
(
String
invalidType
)
{
throw
new
DriverError
(
'Unsupported key value type
$invalidType
. Flutter Driver only supports
${_supportedKeyValueTypes.join(", ")}
'
);
}
}
/// Describes how to the driver should search for elements.
...
...
@@ -89,7 +89,7 @@ class ByValueKey extends SearchSpecification {
this
.
keyValueString
=
'
$keyValue
'
,
this
.
keyValueType
=
'
${keyValue.runtimeType}
'
{
if
(!
_supportedKeyValueTypes
.
contains
(
keyValue
.
runtimeType
))
_throwInvalidKeyValueType
(
'
$keyValue
.runtimeType'
);
throw
_createInvalidKeyValueTypeError
(
'
$keyValue
.runtimeType'
);
}
/// The true value of the key.
...
...
@@ -117,13 +117,9 @@ class ByValueKey extends SearchSpecification {
case
'String'
:
return
new
ByValueKey
(
keyValueString
);
default
:
return
_throwInvalidKeyValueType
(
keyValueType
);
throw
_createInvalidKeyValueTypeError
(
keyValueType
);
}
}
static
_throwInvalidKeyValueType
(
String
invalidType
)
{
throw
new
DriverError
(
'Unsupported key value type
$invalidType
. Flutter Driver only supports
${_supportedKeyValueTypes.join(", ")}
'
);
}
}
/// Command to read the text from a given element.
...
...
packages/flutter_driver/lib/src/health.dart
View file @
b6ff67cc
...
...
@@ -9,7 +9,7 @@ import 'message.dart';
class
GetHealth
implements
Command
{
final
String
kind
=
'get_health'
;
static
deserialize
(
Map
<
String
,
String
>
json
)
=>
new
GetHealth
();
static
GetHealth
deserialize
(
Map
<
String
,
String
>
json
)
=>
new
GetHealth
();
Map
<
String
,
String
>
serialize
()
=>
const
{};
}
...
...
packages/flutter_driver/test/flutter_driver_test.dart
View file @
b6ff67cc
...
...
@@ -13,7 +13,7 @@ import 'package:mockito/mockito.dart';
import
'package:quiver/testing/async.dart'
;
import
'package:vm_service_client/vm_service_client.dart'
;
main
()
{
void
main
(
)
{
group
(
'FlutterDriver.connect'
,
()
{
List
<
LogRecord
>
log
;
StreamSubscription
logSub
;
...
...
@@ -21,7 +21,7 @@ main() {
MockVM
mockVM
;
MockIsolate
mockIsolate
;
expectLogContains
(
String
message
)
{
void
expectLogContains
(
String
message
)
{
expect
(
log
.
map
((
r
)
=>
'
$r
'
),
anyElement
(
contains
(
message
)));
}
...
...
packages/flutter_driver/test/retry_test.dart
View file @
b6ff67cc
...
...
@@ -9,7 +9,7 @@ import 'package:quiver/testing/time.dart';
import
'package:flutter_driver/src/retry.dart'
;
main
()
{
void
main
(
)
{
group
(
'retry'
,
()
{
FakeAsync
fakeAsync
;
...
...
packages/flutter_sprites/lib/src/action.dart
View file @
b6ff67cc
...
...
@@ -125,7 +125,7 @@ class ActionRepeatForever extends Action {
/// var myInifiniteLoop = new ActionRepeatForever(myAction);
ActionRepeatForever
(
this
.
action
);
step
(
double
dt
)
{
void
step
(
double
dt
)
{
_elapsedInAction
+=
dt
;
while
(
_elapsedInAction
>
action
.
duration
)
{
_elapsedInAction
-=
action
.
duration
;
...
...
packages/flutter_sprites/lib/src/effect_line.dart
View file @
b6ff67cc
...
...
@@ -67,7 +67,7 @@ class EffectLine extends Node {
List
<
Point
>
get
points
=>
_points
;
set
points
(
List
<
Point
>
points
)
{
void
set
points
(
List
<
Point
>
points
)
{
_points
=
points
;
_pointAges
=
<
double
>[];
for
(
int
i
=
0
;
i
<
_points
.
length
;
i
++)
{
...
...
packages/flutter_sprites/lib/src/label.dart
View file @
b6ff67cc
...
...
@@ -15,7 +15,7 @@ class Label extends Node {
/// The text being drawn by the label.
String
get
text
=>
_text
;
set
text
(
String
text
)
{
void
set
text
(
String
text
)
{
_text
=
text
;
_painter
=
null
;
}
...
...
@@ -25,7 +25,7 @@ class Label extends Node {
/// The style to draw the text in.
TextStyle
get
textStyle
=>
_textStyle
;
set
textStyle
(
TextStyle
textStyle
)
{
void
set
textStyle
(
TextStyle
textStyle
)
{
_textStyle
=
textStyle
;
_painter
=
null
;
}
...
...
packages/flutter_sprites/lib/src/node.dart
View file @
b6ff67cc
...
...
@@ -85,7 +85,7 @@ class Node {
return
_constraints
;
}
set
constraints
(
List
<
Constraint
>
constraints
)
{
void
set
constraints
(
List
<
Constraint
>
constraints
)
{
_constraints
=
constraints
;
if
(
_spriteBox
!=
null
)
_spriteBox
.
_constrainedNodes
=
null
;
}
...
...
@@ -803,7 +803,7 @@ class Node {
/// );
PhysicsBody
get
physicsBody
=>
_physicsBody
;
set
physicsBody
(
PhysicsBody
physicsBody
)
{
void
set
physicsBody
(
PhysicsBody
physicsBody
)
{
if
(
parent
!=
null
)
{
assert
(
parent
is
PhysicsWorld
);
...
...
packages/flutter_sprites/lib/src/node3d.dart
View file @
b6ff67cc
...
...
@@ -13,7 +13,7 @@ class Node3D extends Node {
/// The node's rotation around the x axis in degrees.
double
get
rotationX
=>
_rotationX
;
set
rotationX
(
double
rotationX
)
{
void
set
rotationX
(
double
rotationX
)
{
_rotationX
=
rotationX
;
invalidateTransformMatrix
();
}
...
...
@@ -23,7 +23,7 @@ class Node3D extends Node {
/// The node's rotation around the y axis in degrees.
double
get
rotationY
=>
_rotationY
;
set
rotationY
(
double
rotationY
)
{
void
set
rotationY
(
double
rotationY
)
{
_rotationY
=
rotationY
;
invalidateTransformMatrix
();
}
...
...
@@ -33,7 +33,7 @@ class Node3D extends Node {
/// The projection depth. Default value is 500.0.
double
get
projectionDepth
=>
_projectionDepth
;
set
projectionDepth
(
double
projectionDepth
)
{
void
set
projectionDepth
(
double
projectionDepth
)
{
_projectionDepth
=
projectionDepth
;
invalidateTransformMatrix
();
}
...
...
packages/flutter_sprites/lib/src/physics_body.dart
View file @
b6ff67cc
...
...
@@ -91,7 +91,7 @@ class PhysicsBody {
/// myBody.density = 0.5;
double
get
density
=>
_density
;
set
density
(
double
density
)
{
void
set
density
(
double
density
)
{
_density
=
density
;
if
(
_body
==
null
)
...
...
@@ -109,7 +109,7 @@ class PhysicsBody {
/// myBody.friction = 0.4;
double
get
friction
=>
_friction
;
set
friction
(
double
friction
)
{
void
set
friction
(
double
friction
)
{
_friction
=
friction
;
if
(
_body
==
null
)
...
...
@@ -127,7 +127,7 @@ class PhysicsBody {
/// the range of 0.0 to 1.0.
///
/// myBody.restitution = 0.5;
set
restitution
(
double
restitution
)
{
void
set
restitution
(
double
restitution
)
{
_restitution
=
restitution
;
if
(
_body
==
null
)
...
...
@@ -146,7 +146,7 @@ class PhysicsBody {
/// myBody.isSensor = true;
bool
get
isSensor
=>
_isSensor
;
set
isSensor
(
bool
isSensor
)
{
void
set
isSensor
(
bool
isSensor
)
{
_isSensor
=
isSensor
;
if
(
_body
==
null
)
...
...
@@ -171,7 +171,7 @@ class PhysicsBody {
}
}
set
linearVelocity
(
Offset
linearVelocity
)
{
void
set
linearVelocity
(
Offset
linearVelocity
)
{
_linearVelocity
=
linearVelocity
;
if
(
_body
!=
null
)
{
...
...
@@ -195,7 +195,7 @@ class PhysicsBody {
return
_body
.
angularVelocity
;
}
set
angularVelocity
(
double
angularVelocity
)
{
void
set
angularVelocity
(
double
angularVelocity
)
{
_angularVelocity
=
angularVelocity
;
if
(
_body
!=
null
)
{
...
...
@@ -217,7 +217,7 @@ class PhysicsBody {
/// myBody.angularDampening = 0.1;
double
get
angularDampening
=>
_angularDampening
;
set
angularDampening
(
double
angularDampening
)
{
void
set
angularDampening
(
double
angularDampening
)
{
_angularDampening
=
angularDampening
;
if
(
_body
!=
null
)
...
...
@@ -231,7 +231,7 @@ class PhysicsBody {
/// myBody.allowSleep = false;
bool
get
allowSleep
=>
_allowSleep
;
set
allowSleep
(
bool
allowSleep
)
{
void
set
allowSleep
(
bool
allowSleep
)
{
_allowSleep
=
allowSleep
;
if
(
_body
!=
null
)
...
...
@@ -250,7 +250,7 @@ class PhysicsBody {
return
_awake
;
}
set
awake
(
bool
awake
)
{
void
set
awake
(
bool
awake
)
{
_awake
=
awake
;
if
(
_body
!=
null
)
...
...
@@ -264,7 +264,7 @@ class PhysicsBody {
/// myBody.fixedRotation = true;
bool
get
fixedRotation
=>
_fixedRotation
;
set
fixedRotation
(
bool
fixedRotation
)
{
void
set
fixedRotation
(
bool
fixedRotation
)
{
_fixedRotation
=
fixedRotation
;
if
(
_body
!=
null
)
...
...
@@ -280,7 +280,7 @@ class PhysicsBody {
/// if neccessary.
///
/// myBody.bullet = true;
set
bullet
(
bool
bullet
)
{
void
set
bullet
(
bool
bullet
)
{
_bullet
=
bullet
;
if
(
_body
!=
null
)
{
...
...
@@ -301,7 +301,7 @@ class PhysicsBody {
return
_active
;
}
set
active
(
bool
active
)
{
void
set
active
(
bool
active
)
{
_active
=
active
;
if
(
_body
!=
null
)
...
...
@@ -321,7 +321,7 @@ class PhysicsBody {
return
_collisionCategory
;
}
set
collisionCategory
(
Object
collisionCategory
)
{
void
set
collisionCategory
(
Object
collisionCategory
)
{
_collisionCategory
=
collisionCategory
;
_updateFilter
();
}
...
...
@@ -334,7 +334,7 @@ class PhysicsBody {
/// myBody.collisionMask = ["Air", "Ground"];
List
<
Object
>
get
collisionMask
=>
_collisionMask
;
set
collisionMask
(
List
<
Object
>
collisionMask
)
{
void
set
collisionMask
(
List
<
Object
>
collisionMask
)
{
_collisionMask
=
collisionMask
;
_updateFilter
();
}
...
...
packages/flutter_sprites/lib/src/physics_group.dart
View file @
b6ff67cc
...
...
@@ -9,37 +9,37 @@ part of flutter_sprites;
/// group.addChild(myNode);
class
PhysicsGroup
extends
Node
{
set
scaleX
(
double
scaleX
)
{
void
set
scaleX
(
double
scaleX
)
{
assert
(
false
);
}
set
scaleY
(
double
scaleX
)
{
void
set
scaleY
(
double
scaleX
)
{
assert
(
false
);
}
set
skewX
(
double
scaleX
)
{
void
set
skewX
(
double
scaleX
)
{
assert
(
false
);
}
set
skewY
(
double
scaleX
)
{
void
set
skewY
(
double
scaleX
)
{
assert
(
false
);
}
set
physicsBody
(
PhysicsBody
body
)
{
void
set
physicsBody
(
PhysicsBody
body
)
{
assert
(
false
);
}
set
position
(
Point
position
)
{
void
set
position
(
Point
position
)
{
super
.
position
=
position
;
_invalidatePhysicsBodies
(
this
);
}
set
rotation
(
double
rotation
)
{
void
set
rotation
(
double
rotation
)
{
super
.
rotation
=
rotation
;
_invalidatePhysicsBodies
(
this
);
}
set
scale
(
double
scale
)
{
void
set
scale
(
double
scale
)
{
super
.
scale
=
scale
;
_invalidatePhysicsBodies
(
this
);
}
...
...
packages/flutter_sprites/lib/src/physics_joint.dart
View file @
b6ff67cc
...
...
@@ -147,7 +147,7 @@ class PhysicsJointRevolute extends PhysicsJoint {
/// useful you also need to set [motorSpeed] and [maxMotorTorque].
bool
get
enableMotor
=>
_enableMotor
;
set
enableMotor
(
bool
enableMotor
)
{
void
set
enableMotor
(
bool
enableMotor
)
{
_enableMotor
=
enableMotor
;
if
(
_joint
!=
null
)
{
box2d
.
RevoluteJoint
revoluteJoint
=
_joint
;
...
...
@@ -161,7 +161,7 @@ class PhysicsJointRevolute extends PhysicsJoint {
/// set to true and [maxMotorTorque] is set to a non zero value.
double
get
motorSpeed
=>
_motorSpeed
;
set
motorSpeed
(
double
motorSpeed
)
{
void
set
motorSpeed
(
double
motorSpeed
)
{
_motorSpeed
=
motorSpeed
;
if
(
_joint
!=
null
)
{
box2d
.
RevoluteJoint
revoluteJoint
=
_joint
;
...
...
@@ -175,7 +175,7 @@ class PhysicsJointRevolute extends PhysicsJoint {
/// Sets the motor torque of this joint, will only work if [enableMotor] is
/// set to true and [motorSpeed] is set to a non zero value.
set
maxMotorTorque
(
double
maxMotorTorque
)
{
void
set
maxMotorTorque
(
double
maxMotorTorque
)
{
_maxMotorTorque
=
maxMotorTorque
;
if
(
_joint
!=
null
)
{
box2d
.
RevoluteJoint
revoluteJoint
=
_joint
;
...
...
@@ -252,7 +252,7 @@ class PhysicsJointPrismatic extends PhysicsJoint {
/// [maxMotorForce].
bool
get
enableMotor
=>
_enableMotor
;
set
enableMotor
(
bool
enableMotor
)
{
void
set
enableMotor
(
bool
enableMotor
)
{
_enableMotor
=
enableMotor
;
if
(
_joint
!=
null
)
{
box2d
.
PrismaticJoint
prismaticJoint
=
_joint
;
...
...
@@ -266,7 +266,7 @@ class PhysicsJointPrismatic extends PhysicsJoint {
/// set to true and [maxMotorForce] is set to a non zero value.
double
get
motorSpeed
=>
_motorSpeed
;
set
motorSpeed
(
double
motorSpeed
)
{
void
set
motorSpeed
(
double
motorSpeed
)
{
_motorSpeed
=
motorSpeed
;
if
(
_joint
!=
null
)
{
box2d
.
PrismaticJoint
prismaticJoint
=
_joint
;
...
...
@@ -280,7 +280,7 @@ class PhysicsJointPrismatic extends PhysicsJoint {
/// set to true and [motorSpeed] is set to a non zero value.
double
get
maxMotorForce
=>
_maxMotorForce
;
set
maxMotorForce
(
double
maxMotorForce
)
{
void
set
maxMotorForce
(
double
maxMotorForce
)
{
_maxMotorForce
=
maxMotorForce
;
if
(
_joint
!=
null
)
{
box2d
.
PrismaticJoint
prismaticJoint
=
_joint
;
...
...
packages/flutter_sprites/lib/src/physics_world.dart
View file @
b6ff67cc
...
...
@@ -74,7 +74,7 @@ class PhysicsWorld extends Node {
return
new
Offset
(
g
.
x
,
g
.
y
);
}
set
gravity
(
Offset
gravity
)
{
void
set
gravity
(
Offset
gravity
)
{
// Convert from points/s^2 to m/s^2
b2World
.
setGravity
(
new
Vector2
(
gravity
.
dx
/
b2WorldToNodeConversionFactor
,
gravity
.
dy
/
b2WorldToNodeConversionFactor
));
...
...
@@ -83,14 +83,14 @@ class PhysicsWorld extends Node {
/// If set to true, objects can fall asleep if the haven't moved in a while.
bool
get
allowSleep
=>
b2World
.
isAllowSleep
();
set
allowSleep
(
bool
allowSleep
)
{
void
set
allowSleep
(
bool
allowSleep
)
{
b2World
.
setAllowSleep
(
allowSleep
);
}
/// True if sub stepping should be used in the simulation.
bool
get
subStepping
=>
b2World
.
isSubStepping
();
set
subStepping
(
bool
subStepping
)
{
void
set
subStepping
(
bool
subStepping
)
{
b2World
.
setSubStepping
(
subStepping
);
}
...
...
packages/flutter_sprites/lib/src/sound.dart
View file @
b6ff67cc
...
...
@@ -137,11 +137,8 @@ SoundTrackPlayer _sharedSoundTrackPlayer;
class
SoundTrackPlayer
{
Set
<
SoundTrack
>
_soundTracks
=
new
HashSet
<
SoundTrack
>();
static
sharedInstance
()
{
if
(
_sharedSoundTrackPlayer
==
null
)
{
_sharedSoundTrackPlayer
=
new
SoundTrackPlayer
();
}
return
_sharedSoundTrackPlayer
;
static
SoundTrackPlayer
sharedInstance
()
{
return
_sharedSoundTrackPlayer
??=
new
SoundTrackPlayer
();
}
SoundTrackPlayer
()
{
...
...
packages/flutter_sprites/lib/src/sprite_box.dart
View file @
b6ff67cc
...
...
@@ -38,7 +38,8 @@ class SpriteBox extends RenderBox {
||
value
.
size
.
height
>
0
);
// Remove sprite box references
if
(
_rootNode
!=
null
)
_removeSpriteBoxReference
(
_rootNode
);
if
(
_rootNode
!=
null
)
_removeSpriteBoxReference
(
_rootNode
);
// Update the value
_rootNode
=
value
;
...
...
@@ -374,7 +375,7 @@ class SpriteBox extends RenderBox {
double
delta
=
(
timeStamp
-
_lastTimeStamp
).
inMicroseconds
.
toDouble
()
/
Duration
.
MICROSECONDS_PER_SECOND
;
_lastTimeStamp
=
timeStamp
;
_frameRate
=
1.0
/
delta
;
_frameRate
=
1.0
/
delta
;
if
(
_initialized
)
{
_callConstraintsPreUpdate
(
delta
);
...
...
@@ -497,7 +498,7 @@ class SpriteBox extends RenderBox {
return
nodes
;
}
_addNodesAtPosition
(
Node
node
,
Point
position
,
List
<
Node
>
list
)
{
void
_addNodesAtPosition
(
Node
node
,
Point
position
,
List
<
Node
>
list
)
{
// Visit children first
for
(
Node
child
in
node
.
children
)
{
_addNodesAtPosition
(
child
,
position
,
list
);
...
...
packages/flutter_sprites/lib/src/textured_line.dart
View file @
b6ff67cc
...
...
@@ -21,7 +21,7 @@ class TexturedLinePainter {
List
<
Point
>
get
points
=>
_points
;
set
points
(
List
<
Point
>
points
)
{
void
set
points
(
List
<
Point
>
points
)
{
_points
=
points
;
_calculatedTextureStops
=
null
;
}
...
...
@@ -32,7 +32,7 @@ class TexturedLinePainter {
Texture
get
texture
=>
_texture
;
set
texture
(
Texture
texture
)
{
void
set
texture
(
Texture
texture
)
{
_texture
=
texture
;
if
(
texture
==
null
)
{
_cachedPaint
=
new
Paint
();
...
...
@@ -68,9 +68,9 @@ class TexturedLinePainter {
double
_textureLoopLength
;
get
textureLoopLength
=>
textureLoopLength
;
double
get
textureLoopLength
=>
textureLoopLength
;
set
textureLoopLength
(
double
textureLoopLength
)
{
void
set
textureLoopLength
(
double
textureLoopLength
)
{
_textureLoopLength
=
textureLoopLength
;
_calculatedTextureStops
=
null
;
}
...
...
packages/flutter_tools/bin/flutter_tools.dart
View file @
b6ff67cc
...
...
@@ -4,4 +4,6 @@
import
'package:flutter_tools/executable.dart'
as
executable
;
main
(
List
<
String
>
args
)
=>
executable
.
main
(
args
);
void
main
(
List
<
String
>
args
)
{
executable
.
main
(
args
);
}
packages/flutter_tools/lib/src/android/adb.dart
View file @
b6ff67cc
...
...
@@ -204,7 +204,7 @@ class AdbDevice {
/// Device model; can be null. `XT1045`, `Nexus_7`
String
get
modelID
=>
_info
[
'model'
];
set
modelID
(
String
value
)
{
void
set
modelID
(
String
value
)
{
_info
[
'model'
]
=
value
;
}
...
...
packages/flutter_tools/lib/src/commands/analyze.dart
View file @
b6ff67cc
...
...
@@ -288,6 +288,7 @@ analyzer:
todo: ignore
linter:
rules:
- always_declare_return_types
# we'
ll
turn
on
avoid_as
as
soon
as
it
doesn
't complain about "as dynamic"
# - avoid_as
- camel_case_types
...
...
packages/flutter_tools/test/adb_test.dart
View file @
b6ff67cc
...
...
@@ -5,9 +5,7 @@
import
'package:flutter_tools/src/android/adb.dart'
;
import
'package:test/test.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
Adb
adb
=
new
Adb
(
'adb'
);
// We only test the [Adb] class is we're able to locate the adb binary.
...
...
packages/flutter_tools/test/analyze_test.dart
View file @
b6ff67cc
...
...
@@ -14,9 +14,7 @@ import 'package:test/test.dart';
import
'src/context.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
AnalysisServer
server
;
Directory
tempDir
;
...
...
packages/flutter_tools/test/android_device_test.dart
View file @
b6ff67cc
...
...
@@ -7,9 +7,7 @@ import 'package:test/test.dart';
import
'src/context.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'android_device'
,
()
{
testUsingContext
(
'stores the requested id'
,
()
{
String
deviceId
=
'1234'
;
...
...
packages/flutter_tools/test/base_utils_test.dart
View file @
b6ff67cc
...
...
@@ -7,9 +7,7 @@ import 'dart:async';
import
'package:flutter_tools/src/base/utils.dart'
;
import
'package:test/test.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'ItemListNotifier'
,
()
{
test
(
'sends notifications'
,
()
async
{
ItemListNotifier
<
String
>
list
=
new
ItemListNotifier
<
String
>();
...
...
packages/flutter_tools/test/context_test.dart
View file @
b6ff67cc
...
...
@@ -7,9 +7,7 @@ import 'package:flutter_tools/src/base/logger.dart';
import
'package:flutter_tools/src/globals.dart'
;
import
'package:test/test.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'DeviceManager'
,
()
{
test
(
'error'
,
()
async
{
AppContext
context
=
new
AppContext
();
...
...
packages/flutter_tools/test/create_test.dart
View file @
b6ff67cc
...
...
@@ -13,9 +13,7 @@ import 'package:test/test.dart';
import
'src/context.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'create'
,
()
{
Directory
temp
;
...
...
packages/flutter_tools/test/daemon_test.dart
View file @
b6ff67cc
...
...
@@ -17,9 +17,7 @@ import 'package:test/test.dart';
import
'src/context.dart'
;
import
'src/mocks.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
Daemon
daemon
;
AppContext
appContext
;
NotifyingLogger
notifyingLogger
;
...
...
packages/flutter_tools/test/device_test.dart
View file @
b6ff67cc
...
...
@@ -7,9 +7,7 @@ import 'package:test/test.dart';
import
'src/context.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'DeviceManager'
,
()
{
testUsingContext
(
'getDevices'
,
()
async
{
// Test that DeviceManager.getDevices() doesn't throw.
...
...
packages/flutter_tools/test/devices.test.dart
View file @
b6ff67cc
...
...
@@ -10,9 +10,7 @@ import 'package:test/test.dart';
import
'src/common.dart'
;
import
'src/context.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'devices'
,
()
{
testUsingContext
(
'returns 0 when called'
,
()
{
DevicesCommand
command
=
new
DevicesCommand
();
...
...
packages/flutter_tools/test/drive_test.dart
View file @
b6ff67cc
...
...
@@ -20,9 +20,7 @@ import 'src/common.dart';
import
'src/context.dart'
;
import
'src/mocks.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'drive'
,
()
{
DriveCommand
command
;
Device
mockDevice
;
...
...
@@ -182,7 +180,7 @@ defineTests() {
});
group
(
'findTargetDevice on iOS'
,
()
{
setOs
()
{
void
setOs
()
{
when
(
os
.
isMacOS
).
thenReturn
(
true
);
when
(
os
.
isLinux
).
thenReturn
(
false
);
}
...
...
@@ -222,7 +220,7 @@ defineTests() {
});
group
(
'findTargetDevice on Linux'
,
()
{
setOs
()
{
void
setOs
()
{
when
(
os
.
isMacOS
).
thenReturn
(
false
);
when
(
os
.
isLinux
).
thenReturn
(
true
);
}
...
...
packages/flutter_tools/test/install_test.dart
View file @
b6ff67cc
...
...
@@ -10,9 +10,7 @@ import 'src/common.dart';
import
'src/context.dart'
;
import
'src/mocks.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'install'
,
()
{
testUsingContext
(
'returns 0 when Android is connected and ready for an install'
,
()
{
InstallCommand
command
=
new
InstallCommand
();
...
...
packages/flutter_tools/test/listen_test.dart
View file @
b6ff67cc
...
...
@@ -9,9 +9,7 @@ import 'src/common.dart';
import
'src/context.dart'
;
import
'src/mocks.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'listen'
,
()
{
testUsingContext
(
'returns 1 when no device is connected'
,
()
{
ListenCommand
command
=
new
ListenCommand
(
singleRun:
true
);
...
...
packages/flutter_tools/test/logs_test.dart
View file @
b6ff67cc
...
...
@@ -9,9 +9,7 @@ import 'src/common.dart';
import
'src/context.dart'
;
import
'src/mocks.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'logs'
,
()
{
testUsingContext
(
'fail with a bad device id'
,
()
{
LogsCommand
command
=
new
LogsCommand
();
...
...
packages/flutter_tools/test/os_utils_test.dart
View file @
b6ff67cc
...
...
@@ -8,9 +8,7 @@ import 'package:flutter_tools/src/base/os.dart';
import
'package:path/path.dart'
as
path
;
import
'package:test/test.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'OperatingSystemUtils'
,
()
{
Directory
temp
;
...
...
packages/flutter_tools/test/run_test.dart
View file @
b6ff67cc
...
...
@@ -9,9 +9,7 @@ import 'src/common.dart';
import
'src/context.dart'
;
import
'src/mocks.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'run'
,
()
{
testUsingContext
(
'fails when target not found'
,
()
{
RunCommand
command
=
new
RunCommand
();
...
...
packages/flutter_tools/test/service_protocol_test.dart
View file @
b6ff67cc
...
...
@@ -9,9 +9,7 @@ import 'package:flutter_tools/src/service_protocol.dart';
import
'src/mocks.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'service_protocol'
,
()
{
test
(
'Discovery Heartbeat'
,
()
async
{
MockDeviceLogReader
logReader
=
new
MockDeviceLogReader
();
...
...
packages/flutter_tools/test/stop_test.dart
View file @
b6ff67cc
...
...
@@ -12,9 +12,7 @@ import 'src/common.dart';
import
'src/context.dart'
;
import
'src/mocks.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'stop'
,
()
{
testUsingContext
(
'returns 0 when Android is connected and ready to be stopped'
,
()
{
StopCommand
command
=
new
StopCommand
();
...
...
packages/flutter_tools/test/trace_test.dart
View file @
b6ff67cc
...
...
@@ -9,9 +9,7 @@ import 'src/common.dart';
import
'src/context.dart'
;
import
'src/mocks.dart'
;
main
()
=>
defineTests
();
defineTests
()
{
void
main
(
)
{
group
(
'trace'
,
()
{
testUsingContext
(
'returns 1 when no Android device is connected'
,
()
{
TraceCommand
command
=
new
TraceCommand
();
...
...
packages/flx/test/bundle_test.dart
View file @
b6ff67cc
import
'dart:async'
;
import
'dart:convert'
hide
BASE64
;
import
'dart:io'
;
import
'dart:typed_data'
;
...
...
@@ -7,7 +8,7 @@ import 'package:flx/bundle.dart';
import
'package:flx/signing.dart'
;
import
'package:test/test.dart'
;
main
()
async
{
Future
main
(
)
async
{
// The following constant was generated via the openssl shell commands:
// openssl ecparam -genkey -name prime256v1 -out privatekey.pem
// openssl ec -in privatekey.pem -outform DER | base64
...
...
packages/flx/test/signing_test.dart
View file @
b6ff67cc
...
...
@@ -8,7 +8,7 @@ import 'package:crypto/crypto.dart';
import
'package:flx/signing.dart'
;
import
'package:test/test.dart'
;
main
()
async
{
Future
main
(
)
async
{
// The following constant was generated via the openssl shell commands:
// openssl ecparam -genkey -name prime256v1 -out privatekey.pem
// openssl ec -in privatekey.pem -outform DER | base64
...
...
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