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
a0769f24
Commit
a0769f24
authored
Mar 17, 2017
by
Alexandre Ardhuin
Committed by
GitHub
Mar 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apply the upcoming rule unnecessary_this (#8838)
parent
90aa2957
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
48 additions
and
51 deletions
+48
-51
adb_test.dart
dev/devicelab/test/adb_test.dart
+3
-3
home.dart
examples/flutter_gallery/lib/demo/calculator/home.dart
+3
-3
colors_demo.dart
examples/flutter_gallery/lib/demo/colors_demo.dart
+1
-1
animations.dart
packages/flutter/lib/src/animation/animations.dart
+3
-3
bottom_navigation_bar.dart
packages/flutter/lib/src/material/bottom_navigation_bar.dart
+5
-5
expand_icon.dart
packages/flutter/lib/src/material/expand_icon.dart
+3
-3
expansion_panel.dart
packages/flutter/lib/src/material/expansion_panel.dart
+5
-5
stepper.dart
packages/flutter/lib/src/material/stepper.dart
+7
-7
ticker.dart
packages/flutter/lib/src/scheduler/ticker.dart
+1
-1
animated_cross_fade.dart
packages/flutter/lib/src/widgets/animated_cross_fade.dart
+3
-3
scroll_view.dart
packages/flutter/lib/src/widgets/scroll_view.dart
+3
-3
single_child_scroll_view.dart
...ges/flutter/lib/src/widgets/single_child_scroll_view.dart
+2
-2
dismissable_test.dart
packages/flutter/test/widgets/dismissable_test.dart
+1
-1
independent_widget_layout_test.dart
.../flutter/test/widgets/independent_widget_layout_test.dart
+2
-2
asset.dart
packages/flutter_tools/lib/src/asset.dart
+3
-4
cache.dart
packages/flutter_tools/lib/src/cache.dart
+2
-4
drive.dart
packages/flutter_tools/lib/src/commands/drive.dart
+1
-1
No files found.
dev/devicelab/test/adb_test.dart
View file @
a0769f24
...
...
@@ -130,9 +130,9 @@ class CommandArgs {
return
false
;
final
CommandArgs
otherCmd
=
other
;
return
otherCmd
.
command
==
this
.
command
&&
const
ListEquality
<
String
>().
equals
(
otherCmd
.
arguments
,
this
.
arguments
)
&&
const
MapEquality
<
String
,
String
>().
equals
(
otherCmd
.
environment
,
this
.
environment
);
return
otherCmd
.
command
==
command
&&
const
ListEquality
<
String
>().
equals
(
otherCmd
.
arguments
,
arguments
)
&&
const
MapEquality
<
String
,
String
>().
equals
(
otherCmd
.
environment
,
environment
);
}
@override
...
...
examples/flutter_gallery/lib/demo/calculator/home.dart
View file @
a0769f24
...
...
@@ -231,7 +231,7 @@ class KeyRow extends StatelessWidget {
return
new
Expanded
(
child:
new
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
this
.
keys
children:
keys
)
);
}
...
...
@@ -248,10 +248,10 @@ class CalcKey extends StatelessWidget {
final
Orientation
orientation
=
MediaQuery
.
of
(
context
).
orientation
;
return
new
Expanded
(
child:
new
InkResponse
(
onTap:
this
.
onTap
,
onTap:
onTap
,
child:
new
Center
(
child:
new
Text
(
t
his
.
t
ext
,
text
,
style:
new
TextStyle
(
fontSize:
(
orientation
==
Orientation
.
portrait
)
?
32.0
:
24.0
)
...
...
examples/flutter_gallery/lib/demo/colors_demo.dart
View file @
a0769f24
...
...
@@ -14,7 +14,7 @@ class ColorSwatch {
final
Map
<
int
,
Color
>
accentColors
;
final
int
threshold
;
// titles for indices > threshold are white, otherwise black
bool
get
isValid
=>
this
.
name
!=
null
&&
this
.
colors
!=
null
&&
threshold
!=
null
;
bool
get
isValid
=>
name
!=
null
&&
colors
!=
null
&&
threshold
!=
null
;
}
final
List
<
ColorSwatch
>
colorSwatches
=
<
ColorSwatch
>[
...
...
packages/flutter/lib/src/animation/animations.dart
View file @
a0769f24
...
...
@@ -592,9 +592,9 @@ abstract class CompoundAnimation<T> extends Animation<T>
AnimationStatus
_lastStatus
;
void
_maybeNotifyStatusListeners
(
AnimationStatus
_
)
{
if
(
this
.
status
!=
_lastStatus
)
{
_lastStatus
=
this
.
status
;
notifyStatusListeners
(
this
.
status
);
if
(
status
!=
_lastStatus
)
{
_lastStatus
=
status
;
notifyStatusListeners
(
status
);
}
}
...
...
packages/flutter/lib/src/material/bottom_navigation_bar.dart
View file @
a0769f24
...
...
@@ -53,8 +53,8 @@ class BottomNavigationBarItem {
@required
this
.
title
,
this
.
backgroundColor
})
{
assert
(
this
.
icon
!=
null
);
assert
(
t
his
.
t
itle
!=
null
);
assert
(
icon
!=
null
);
assert
(
title
!=
null
);
}
/// The icon of the item.
...
...
@@ -492,9 +492,9 @@ class _Circle {
this
.
color
,
@required
TickerProvider
vsync
,
})
{
assert
(
this
.
state
!=
null
);
assert
(
this
.
index
!=
null
);
assert
(
this
.
color
!=
null
);
assert
(
state
!=
null
);
assert
(
index
!=
null
);
assert
(
color
!=
null
);
controller
=
new
AnimationController
(
duration:
kThemeAnimationDuration
,
...
...
packages/flutter/lib/src/material/expand_icon.dart
View file @
a0769f24
...
...
@@ -28,9 +28,9 @@ class ExpandIcon extends StatefulWidget {
@required
this
.
onPressed
,
this
.
padding
:
const
EdgeInsets
.
all
(
8.0
)
})
:
super
(
key:
key
)
{
assert
(
this
.
isExpanded
!=
null
);
assert
(
this
.
size
!=
null
);
assert
(
this
.
padding
!=
null
);
assert
(
isExpanded
!=
null
);
assert
(
size
!=
null
);
assert
(
padding
!=
null
);
}
/// Whether the icon is in an expanded state.
...
...
packages/flutter/lib/src/material/expansion_panel.dart
View file @
a0769f24
...
...
@@ -44,9 +44,9 @@ class ExpansionPanel {
@required
this
.
body
,
this
.
isExpanded
:
false
})
{
assert
(
this
.
headerBuilder
!=
null
);
assert
(
this
.
body
!=
null
);
assert
(
this
.
isExpanded
!=
null
);
assert
(
headerBuilder
!=
null
);
assert
(
body
!=
null
);
assert
(
isExpanded
!=
null
);
}
/// The widget builder that builds the expansion panels' header.
...
...
@@ -79,8 +79,8 @@ class ExpansionPanelList extends StatelessWidget {
this
.
expansionCallback
,
this
.
animationDuration
:
kThemeAnimationDuration
})
:
super
(
key:
key
)
{
assert
(
this
.
children
!=
null
);
assert
(
this
.
animationDuration
!=
null
);
assert
(
children
!=
null
);
assert
(
animationDuration
!=
null
);
}
/// The children of the expansion panel list. They are layed in a similar
...
...
packages/flutter/lib/src/material/stepper.dart
View file @
a0769f24
...
...
@@ -81,9 +81,9 @@ class Step {
this
.
state
:
StepState
.
indexed
,
this
.
isActive
:
false
,
})
{
assert
(
t
his
.
t
itle
!=
null
);
assert
(
this
.
content
!=
null
);
assert
(
this
.
state
!=
null
);
assert
(
title
!=
null
);
assert
(
content
!=
null
);
assert
(
state
!=
null
);
}
/// The title of the step that typically describes it.
...
...
@@ -138,10 +138,10 @@ class Stepper extends StatefulWidget {
this
.
onStepContinue
,
this
.
onStepCancel
,
})
:
super
(
key:
key
)
{
assert
(
this
.
steps
!=
null
);
assert
(
t
his
.
t
ype
!=
null
);
assert
(
this
.
currentStep
!=
null
);
assert
(
0
<=
currentStep
&&
currentStep
<
this
.
steps
.
length
);
assert
(
steps
!=
null
);
assert
(
type
!=
null
);
assert
(
currentStep
!=
null
);
assert
(
0
<=
currentStep
&&
currentStep
<
steps
.
length
);
}
/// The steps of the stepper whose titles, subtitles, icons always get shown.
...
...
packages/flutter/lib/src/scheduler/ticker.dart
View file @
a0769f24
...
...
@@ -132,7 +132,7 @@ class Ticker {
throw
new
FlutterError
(
'A ticker was started twice.
\n
'
'A ticker that is already active cannot be started again without first stopping it.
\n
'
'The affected ticker was:
${ t
his.t
oString(debugIncludeStack: true) }
'
'The affected ticker was:
${ toString(debugIncludeStack: true) }
'
);
}
return
true
;
...
...
packages/flutter/lib/src/widgets/animated_cross_fade.dart
View file @
a0769f24
...
...
@@ -53,9 +53,9 @@ class AnimatedCrossFade extends StatefulWidget {
@required
this
.
crossFadeState
,
@required
this
.
duration
})
:
super
(
key:
key
)
{
assert
(
this
.
firstCurve
!=
null
);
assert
(
this
.
secondCurve
!=
null
);
assert
(
this
.
sizeCurve
!=
null
);
assert
(
firstCurve
!=
null
);
assert
(
secondCurve
!=
null
);
assert
(
sizeCurve
!=
null
);
}
/// The child that is visible when [crossFadeState] is [showFirst]. It fades
...
...
packages/flutter/lib/src/widgets/scroll_view.dart
View file @
a0769f24
...
...
@@ -26,10 +26,10 @@ abstract class ScrollView extends StatelessWidget {
this
.
shrinkWrap
:
false
,
})
:
primary
=
primary
??
controller
==
null
&&
scrollDirection
==
Axis
.
vertical
,
super
(
key:
key
)
{
assert
(
this
.
reverse
!=
null
);
assert
(
this
.
shrinkWrap
!=
null
);
assert
(
reverse
!=
null
);
assert
(
shrinkWrap
!=
null
);
assert
(
this
.
primary
!=
null
);
assert
(
this
.
controller
==
null
||
!
this
.
primary
,
assert
(
controller
==
null
||
!
this
.
primary
,
'Primary ScrollViews obtain their ScrollController via inheritance from a PrimaryScrollController widget. '
'You cannot both set primary to true and pass an explicit controller.'
);
...
...
packages/flutter/lib/src/widgets/single_child_scroll_view.dart
View file @
a0769f24
...
...
@@ -49,9 +49,9 @@ class SingleChildScrollView extends StatelessWidget {
this
.
child
,
})
:
primary
=
primary
??
controller
==
null
&&
scrollDirection
==
Axis
.
vertical
,
super
(
key:
key
)
{
assert
(
this
.
scrollDirection
!=
null
);
assert
(
scrollDirection
!=
null
);
assert
(
this
.
primary
!=
null
);
assert
(
this
.
controller
==
null
||
!
this
.
primary
,
assert
(
controller
==
null
||
!
this
.
primary
,
'Primary ScrollViews obtain their ScrollController via inheritance from a PrimaryScrollController widget. '
'You cannot both set primary to true and pass an explicit controller.'
);
...
...
packages/flutter/test/widgets/dismissable_test.dart
View file @
a0769f24
...
...
@@ -122,7 +122,7 @@ class Test1215DismissableWidget extends StatelessWidget {
key:
new
ObjectKey
(
text
),
child:
new
AspectRatio
(
aspectRatio:
1.0
,
child:
new
Text
(
t
his
.
t
ext
),
child:
new
Text
(
text
),
),
);
}
...
...
packages/flutter/test/widgets/independent_widget_layout_test.dart
View file @
a0769f24
...
...
@@ -73,12 +73,12 @@ class TriggerableState extends State<TriggerableWidget> {
@override
void
initState
()
{
super
.
initState
();
config
.
trigger
.
callback
=
this
.
fire
;
config
.
trigger
.
callback
=
fire
;
}
@override
void
didUpdateConfig
(
TriggerableWidget
oldConfig
)
{
config
.
trigger
.
callback
=
this
.
fire
;
config
.
trigger
.
callback
=
fire
;
}
int
_count
=
0
;
...
...
packages/flutter_tools/lib/src/asset.dart
View file @
a0769f24
...
...
@@ -156,11 +156,10 @@ class AssetBundle {
}
class
_Asset
{
_Asset
({
this
.
base
,
String
assetEntry
,
this
.
relativePath
,
this
.
source
})
{
this
.
_assetEntry
=
assetEntry
;
}
_Asset
({
this
.
base
,
String
assetEntry
,
this
.
relativePath
,
this
.
source
})
:
_assetEntry
=
assetEntry
;
String
_assetEntry
;
final
String
_assetEntry
;
final
String
base
;
...
...
packages/flutter_tools/lib/src/cache.dart
View file @
a0769f24
...
...
@@ -15,11 +15,9 @@ import 'globals.dart';
/// A wrapper around the `bin/cache/` directory.
class
Cache
{
/// [rootOverride] is configurable for testing.
Cache
({
Directory
rootOverride
})
{
this
.
_rootOverride
=
rootOverride
;
}
Cache
({
Directory
rootOverride
})
:
_rootOverride
=
rootOverride
;
Directory
_rootOverride
;
final
Directory
_rootOverride
;
// Initialized by FlutterCommandRunner on startup.
static
String
flutterRoot
;
...
...
packages/flutter_tools/lib/src/commands/drive.dart
View file @
a0769f24
...
...
@@ -89,7 +89,7 @@ class DriveCommand extends RunCommandBase {
if
(
testFile
==
null
)
throwToolExit
(
null
);
this
.
_device
=
await
targetDeviceFinder
();
_device
=
await
targetDeviceFinder
();
if
(
device
==
null
)
throwToolExit
(
null
);
...
...
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