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
4c530d5e
Commit
4c530d5e
authored
Mar 29, 2017
by
Alexandre Ardhuin
Committed by
GitHub
Mar 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prefer_final_fields (#8967)
parent
bc7801bf
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
44 additions
and
44 deletions
+44
-44
data_table_demo.dart
...es/flutter_gallery/lib/demo/material/data_table_demo.dart
+1
-1
date_and_time_picker_demo.dart
..._gallery/lib/demo/material/date_and_time_picker_demo.dart
+1
-1
text_field_demo.dart
...es/flutter_gallery/lib/demo/material/text_field_demo.dart
+2
-2
binding.dart
packages/flutter/lib/src/gestures/binding.dart
+1
-1
converter.dart
packages/flutter/lib/src/gestures/converter.dart
+1
-1
drag.dart
packages/flutter/lib/src/gestures/drag.dart
+1
-1
scale.dart
packages/flutter/lib/src/gestures/scale.dart
+1
-1
about.dart
packages/flutter/lib/src/material/about.dart
+1
-1
date_picker.dart
packages/flutter/lib/src/material/date_picker.dart
+1
-1
input.dart
packages/flutter/lib/src/material/input.dart
+2
-2
progress_indicator.dart
packages/flutter/lib/src/material/progress_indicator.dart
+1
-1
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+1
-1
animated_size.dart
packages/flutter/lib/src/rendering/animated_size.dart
+1
-1
object.dart
packages/flutter/lib/src/rendering/object.dart
+1
-1
table.dart
packages/flutter/lib/src/rendering/table.dart
+1
-1
drag_target.dart
packages/flutter/lib/src/widgets/drag_target.dart
+1
-1
form.dart
packages/flutter/lib/src/widgets/form.dart
+1
-1
heroes.dart
packages/flutter/lib/src/widgets/heroes.dart
+1
-1
sliver.dart
packages/flutter/lib/src/widgets/sliver.dart
+2
-2
routes_test.dart
packages/flutter/test/widgets/routes_test.dart
+1
-1
test_async_utils.dart
packages/flutter_test/lib/src/test_async_utils.dart
+1
-1
android_device.dart
packages/flutter_tools/lib/src/android/android_device.dart
+1
-1
android_studio.dart
packages/flutter_tools/lib/src/android/android_studio.dart
+1
-1
context.dart
packages/flutter_tools/lib/src/base/context.dart
+1
-1
logger.dart
packages/flutter_tools/lib/src/base/logger.dart
+4
-4
utils.dart
packages/flutter_tools/lib/src/base/utils.dart
+3
-3
analyze_continuously.dart
.../flutter_tools/lib/src/commands/analyze_continuously.dart
+2
-2
daemon.dart
packages/flutter_tools/lib/src/commands/daemon.dart
+4
-4
analysis.dart
packages/flutter_tools/lib/src/dart/analysis.dart
+2
-2
device.dart
packages/flutter_tools/lib/src/device.dart
+1
-1
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+1
-1
No files found.
examples/flutter_gallery/lib/demo/material/data_table_demo.dart
View file @
4c530d5e
...
@@ -151,7 +151,7 @@ class _DataTableDemoState extends State<DataTableDemo> {
...
@@ -151,7 +151,7 @@ class _DataTableDemoState extends State<DataTableDemo> {
int
_rowsPerPage
=
PaginatedDataTable
.
defaultRowsPerPage
;
int
_rowsPerPage
=
PaginatedDataTable
.
defaultRowsPerPage
;
int
_sortColumnIndex
;
int
_sortColumnIndex
;
bool
_sortAscending
=
true
;
bool
_sortAscending
=
true
;
DessertDataSource
_dessertsDataSource
=
new
DessertDataSource
();
final
DessertDataSource
_dessertsDataSource
=
new
DessertDataSource
();
void
_sort
<
T
>(
Comparable
<
T
>
getField
(
Dessert
d
),
int
columnIndex
,
bool
ascending
)
{
void
_sort
<
T
>(
Comparable
<
T
>
getField
(
Dessert
d
),
int
columnIndex
,
bool
ascending
)
{
_dessertsDataSource
.
_sort
<
T
>(
getField
,
ascending
);
_dessertsDataSource
.
_sort
<
T
>(
getField
,
ascending
);
...
...
examples/flutter_gallery/lib/demo/material/date_and_time_picker_demo.dart
View file @
4c530d5e
...
@@ -121,7 +121,7 @@ class _DateAndTimePickerDemoState extends State<DateAndTimePickerDemo> {
...
@@ -121,7 +121,7 @@ class _DateAndTimePickerDemoState extends State<DateAndTimePickerDemo> {
TimeOfDay
_fromTime
=
const
TimeOfDay
(
hour:
7
,
minute:
28
);
TimeOfDay
_fromTime
=
const
TimeOfDay
(
hour:
7
,
minute:
28
);
DateTime
_toDate
=
new
DateTime
.
now
();
DateTime
_toDate
=
new
DateTime
.
now
();
TimeOfDay
_toTime
=
const
TimeOfDay
(
hour:
7
,
minute:
28
);
TimeOfDay
_toTime
=
const
TimeOfDay
(
hour:
7
,
minute:
28
);
List
<
String
>
_allActivities
=
<
String
>[
'hiking'
,
'swimming'
,
'boating'
,
'fishing'
];
final
List
<
String
>
_allActivities
=
<
String
>[
'hiking'
,
'swimming'
,
'boating'
,
'fishing'
];
String
_activity
=
'fishing'
;
String
_activity
=
'fishing'
;
@override
@override
...
...
examples/flutter_gallery/lib/demo/material/text_field_demo.dart
View file @
4c530d5e
...
@@ -34,8 +34,8 @@ class TextFieldDemoState extends State<TextFieldDemo> {
...
@@ -34,8 +34,8 @@ class TextFieldDemoState extends State<TextFieldDemo> {
bool
_autovalidate
=
false
;
bool
_autovalidate
=
false
;
bool
_formWasEdited
=
false
;
bool
_formWasEdited
=
false
;
GlobalKey
<
FormState
>
_formKey
=
new
GlobalKey
<
FormState
>();
final
GlobalKey
<
FormState
>
_formKey
=
new
GlobalKey
<
FormState
>();
GlobalKey
<
FormFieldState
<
InputValue
>>
_passwordFieldKey
=
new
GlobalKey
<
FormFieldState
<
InputValue
>>();
final
GlobalKey
<
FormFieldState
<
InputValue
>>
_passwordFieldKey
=
new
GlobalKey
<
FormFieldState
<
InputValue
>>();
void
_handleSubmitted
()
{
void
_handleSubmitted
()
{
final
FormState
form
=
_formKey
.
currentState
;
final
FormState
form
=
_formKey
.
currentState
;
if
(!
form
.
validate
())
{
if
(!
form
.
validate
())
{
...
...
packages/flutter/lib/src/gestures/binding.dart
View file @
4c530d5e
...
@@ -61,7 +61,7 @@ abstract class GestureBinding extends BindingBase implements HitTestable, HitTes
...
@@ -61,7 +61,7 @@ abstract class GestureBinding extends BindingBase implements HitTestable, HitTes
///
///
/// The state of hovering pointers is not tracked because that would require
/// The state of hovering pointers is not tracked because that would require
/// hit-testing on every frame.
/// hit-testing on every frame.
Map
<
int
,
HitTestResult
>
_hitTests
=
<
int
,
HitTestResult
>{};
final
Map
<
int
,
HitTestResult
>
_hitTests
=
<
int
,
HitTestResult
>{};
void
_handlePointerEvent
(
PointerEvent
event
)
{
void
_handlePointerEvent
(
PointerEvent
event
)
{
HitTestResult
result
;
HitTestResult
result
;
...
...
packages/flutter/lib/src/gestures/converter.dart
View file @
4c530d5e
...
@@ -34,7 +34,7 @@ class _PointerState {
...
@@ -34,7 +34,7 @@ class _PointerState {
/// Converts from engine pointer data to framework pointer events.
/// Converts from engine pointer data to framework pointer events.
class
PointerEventConverter
{
class
PointerEventConverter
{
// Map from platform pointer identifiers to PointerEvent pointer identifiers.
// Map from platform pointer identifiers to PointerEvent pointer identifiers.
static
Map
<
int
,
_PointerState
>
_pointers
=
<
int
,
_PointerState
>{};
static
final
Map
<
int
,
_PointerState
>
_pointers
=
<
int
,
_PointerState
>{};
static
_PointerState
_ensureStateForPointer
(
ui
.
PointerData
datum
,
Point
position
)
{
static
_PointerState
_ensureStateForPointer
(
ui
.
PointerData
datum
,
Point
position
)
{
return
_pointers
.
putIfAbsent
(
return
_pointers
.
putIfAbsent
(
...
...
packages/flutter/lib/src/gestures/drag.dart
View file @
4c530d5e
...
@@ -278,7 +278,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer {
...
@@ -278,7 +278,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer {
double
_getPrimaryValueFromOffset
(
Offset
value
);
double
_getPrimaryValueFromOffset
(
Offset
value
);
bool
get
_hasSufficientPendingDragDeltaToAccept
;
bool
get
_hasSufficientPendingDragDeltaToAccept
;
Map
<
int
,
VelocityTracker
>
_velocityTrackers
=
<
int
,
VelocityTracker
>{};
final
Map
<
int
,
VelocityTracker
>
_velocityTrackers
=
<
int
,
VelocityTracker
>{};
@override
@override
void
addPointer
(
PointerEvent
event
)
{
void
addPointer
(
PointerEvent
event
)
{
...
...
packages/flutter/lib/src/gestures/scale.dart
View file @
4c530d5e
...
@@ -115,7 +115,7 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer {
...
@@ -115,7 +115,7 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer {
double
_initialSpan
;
double
_initialSpan
;
double
_currentSpan
;
double
_currentSpan
;
Map
<
int
,
Point
>
_pointerLocations
;
Map
<
int
,
Point
>
_pointerLocations
;
Map
<
int
,
VelocityTracker
>
_velocityTrackers
=
<
int
,
VelocityTracker
>{};
final
Map
<
int
,
VelocityTracker
>
_velocityTrackers
=
<
int
,
VelocityTracker
>{};
double
get
_scaleFactor
=>
_initialSpan
>
0.0
?
_currentSpan
/
_initialSpan
:
1.0
;
double
get
_scaleFactor
=>
_initialSpan
>
0.0
?
_currentSpan
/
_initialSpan
:
1.0
;
...
...
packages/flutter/lib/src/material/about.dart
View file @
4c530d5e
...
@@ -369,7 +369,7 @@ class _LicensePageState extends State<LicensePage> {
...
@@ -369,7 +369,7 @@ class _LicensePageState extends State<LicensePage> {
_initLicenses
();
_initLicenses
();
}
}
List
<
Widget
>
_licenses
=
<
Widget
>[];
final
List
<
Widget
>
_licenses
=
<
Widget
>[];
bool
_loaded
=
false
;
bool
_loaded
=
false
;
Future
<
Null
>
_initLicenses
()
async
{
Future
<
Null
>
_initLicenses
()
async
{
...
...
packages/flutter/lib/src/material/date_picker.dart
View file @
4c530d5e
...
@@ -599,7 +599,7 @@ class _DatePickerDialogState extends State<_DatePickerDialog> {
...
@@ -599,7 +599,7 @@ class _DatePickerDialogState extends State<_DatePickerDialog> {
DateTime
_selectedDate
;
DateTime
_selectedDate
;
_DatePickerMode
_mode
=
_DatePickerMode
.
day
;
_DatePickerMode
_mode
=
_DatePickerMode
.
day
;
GlobalKey
_pickerKey
=
new
GlobalKey
();
final
GlobalKey
_pickerKey
=
new
GlobalKey
();
void
_vibrate
()
{
void
_vibrate
()
{
switch
(
Theme
.
of
(
context
).
platform
)
{
switch
(
Theme
.
of
(
context
).
platform
)
{
...
...
packages/flutter/lib/src/material/input.dart
View file @
4c530d5e
...
@@ -107,8 +107,8 @@ class InputField extends StatefulWidget {
...
@@ -107,8 +107,8 @@ class InputField extends StatefulWidget {
}
}
class
_InputFieldState
extends
State
<
InputField
>
{
class
_InputFieldState
extends
State
<
InputField
>
{
GlobalKey
<
EditableTextState
>
_editableTextKey
=
new
GlobalKey
<
EditableTextState
>();
final
GlobalKey
<
EditableTextState
>
_editableTextKey
=
new
GlobalKey
<
EditableTextState
>();
GlobalKey
<
EditableTextState
>
_focusKey
=
new
GlobalKey
(
debugLabel:
"_InputFieldState _focusKey"
);
final
GlobalKey
<
EditableTextState
>
_focusKey
=
new
GlobalKey
(
debugLabel:
"_InputFieldState _focusKey"
);
GlobalKey
get
focusKey
=>
config
.
focusKey
??
(
config
.
key
is
GlobalKey
?
config
.
key
:
_focusKey
);
GlobalKey
get
focusKey
=>
config
.
focusKey
??
(
config
.
key
is
GlobalKey
?
config
.
key
:
_focusKey
);
...
...
packages/flutter/lib/src/material/progress_indicator.dart
View file @
4c530d5e
...
@@ -455,7 +455,7 @@ class RefreshProgressIndicator extends CircularProgressIndicator {
...
@@ -455,7 +455,7 @@ class RefreshProgressIndicator extends CircularProgressIndicator {
}
}
class
_RefreshProgressIndicatorState
extends
_CircularProgressIndicatorState
{
class
_RefreshProgressIndicatorState
extends
_CircularProgressIndicatorState
{
static
double
_kIndicatorSize
=
40.0
;
static
const
double
_kIndicatorSize
=
40.0
;
// Always show the indeterminate version of the circular progress indicator.
// Always show the indeterminate version of the circular progress indicator.
// When value is non-null the sweep of the progress indicator arrow's arc
// When value is non-null the sweep of the progress indicator arrow's arc
...
...
packages/flutter/lib/src/material/scaffold.dart
View file @
4c530d5e
...
@@ -512,7 +512,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin {
...
@@ -512,7 +512,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin {
// SNACKBAR API
// SNACKBAR API
Queue
<
ScaffoldFeatureController
<
SnackBar
,
SnackBarClosedReason
>>
_snackBars
=
new
Queue
<
ScaffoldFeatureController
<
SnackBar
,
SnackBarClosedReason
>>();
final
Queue
<
ScaffoldFeatureController
<
SnackBar
,
SnackBarClosedReason
>>
_snackBars
=
new
Queue
<
ScaffoldFeatureController
<
SnackBar
,
SnackBarClosedReason
>>();
AnimationController
_snackBarController
;
AnimationController
_snackBarController
;
Timer
_snackBarTimer
;
Timer
_snackBarTimer
;
...
...
packages/flutter/lib/src/rendering/animated_size.dart
View file @
4c530d5e
...
@@ -58,7 +58,7 @@ class RenderAnimatedSize extends RenderAligningShiftedBox {
...
@@ -58,7 +58,7 @@ class RenderAnimatedSize extends RenderAligningShiftedBox {
AnimationController
_controller
;
AnimationController
_controller
;
CurvedAnimation
_animation
;
CurvedAnimation
_animation
;
SizeTween
_sizeTween
=
new
SizeTween
();
final
SizeTween
_sizeTween
=
new
SizeTween
();
bool
_didChangeTargetSizeLastFrame
=
false
;
bool
_didChangeTargetSizeLastFrame
=
false
;
bool
_hasVisualOverflow
;
bool
_hasVisualOverflow
;
double
_lastValue
;
double
_lastValue
;
...
...
packages/flutter/lib/src/rendering/object.dart
View file @
4c530d5e
...
@@ -1020,7 +1020,7 @@ class PipelineOwner {
...
@@ -1020,7 +1020,7 @@ class PipelineOwner {
}
}
}
}
List
<
RenderObject
>
_nodesNeedingCompositingBitsUpdate
=
<
RenderObject
>[];
final
List
<
RenderObject
>
_nodesNeedingCompositingBitsUpdate
=
<
RenderObject
>[];
/// Updates the [needsCompositing] bits.
/// Updates the [needsCompositing] bits.
///
///
/// Called as part of the rendering pipeline after [flushLayout] and before
/// Called as part of the rendering pipeline after [flushLayout] and before
...
...
packages/flutter/lib/src/rendering/table.dart
View file @
4c530d5e
...
@@ -1079,7 +1079,7 @@ class RenderTable extends RenderBox {
...
@@ -1079,7 +1079,7 @@ class RenderTable extends RenderBox {
}
}
// cache the table geometry for painting purposes
// cache the table geometry for painting purposes
List
<
double
>
_rowTops
=
<
double
>[];
final
List
<
double
>
_rowTops
=
<
double
>[];
List
<
double
>
_columnLefts
;
List
<
double
>
_columnLefts
;
/// Returns the position and dimensions of the box that the given
/// Returns the position and dimensions of the box that the given
...
...
packages/flutter/lib/src/widgets/drag_target.dart
View file @
4c530d5e
...
@@ -462,7 +462,7 @@ class _DragAvatar<T> extends Drag {
...
@@ -462,7 +462,7 @@ class _DragAvatar<T> extends Drag {
final
OverlayState
overlayState
;
final
OverlayState
overlayState
;
_DragTargetState
<
T
>
_activeTarget
;
_DragTargetState
<
T
>
_activeTarget
;
List
<
_DragTargetState
<
T
>>
_enteredTargets
=
<
_DragTargetState
<
T
>>[];
final
List
<
_DragTargetState
<
T
>>
_enteredTargets
=
<
_DragTargetState
<
T
>>[];
Point
_position
;
Point
_position
;
Offset
_lastOffset
;
Offset
_lastOffset
;
OverlayEntry
_entry
;
OverlayEntry
_entry
;
...
...
packages/flutter/lib/src/widgets/form.dart
View file @
4c530d5e
...
@@ -70,7 +70,7 @@ class Form extends StatefulWidget {
...
@@ -70,7 +70,7 @@ class Form extends StatefulWidget {
/// Typically obtained via [Form.of].
/// Typically obtained via [Form.of].
class
FormState
extends
State
<
Form
>
{
class
FormState
extends
State
<
Form
>
{
int
_generation
=
0
;
int
_generation
=
0
;
Set
<
FormFieldState
<
dynamic
>>
_fields
=
new
Set
<
FormFieldState
<
dynamic
>>();
final
Set
<
FormFieldState
<
dynamic
>>
_fields
=
new
Set
<
FormFieldState
<
dynamic
>>();
// Called when a form field has changed. This will cause all form fields
// Called when a form field has changed. This will cause all form fields
// to rebuild, useful if form fields have interdependencies.
// to rebuild, useful if form fields have interdependencies.
...
...
packages/flutter/lib/src/widgets/heroes.dart
View file @
4c530d5e
...
@@ -135,7 +135,7 @@ class Hero extends StatefulWidget {
...
@@ -135,7 +135,7 @@ class Hero extends StatefulWidget {
}
}
class
_HeroState
extends
State
<
Hero
>
{
class
_HeroState
extends
State
<
Hero
>
{
GlobalKey
_key
=
new
GlobalKey
();
final
GlobalKey
_key
=
new
GlobalKey
();
Size
_placeholderSize
;
Size
_placeholderSize
;
void
startFlight
()
{
void
startFlight
()
{
...
...
packages/flutter/lib/src/widgets/sliver.dart
View file @
4c530d5e
...
@@ -287,8 +287,8 @@ class SliverMultiBoxAdaptorElement extends RenderObjectElement implements Render
...
@@ -287,8 +287,8 @@ class SliverMultiBoxAdaptorElement extends RenderObjectElement implements Render
performRebuild
();
performRebuild
();
}
}
SplayTreeMap
<
int
,
Element
>
_childElements
=
new
SplayTreeMap
<
int
,
Element
>();
final
SplayTreeMap
<
int
,
Element
>
_childElements
=
new
SplayTreeMap
<
int
,
Element
>();
Map
<
int
,
Widget
>
_childWidgets
=
new
HashMap
<
int
,
Widget
>();
final
Map
<
int
,
Widget
>
_childWidgets
=
new
HashMap
<
int
,
Widget
>();
RenderBox
_currentBeforeChild
;
RenderBox
_currentBeforeChild
;
@override
@override
...
...
packages/flutter/test/widgets/routes_test.dart
View file @
4c530d5e
...
@@ -18,7 +18,7 @@ class TestRoute extends LocalHistoryRoute<String> {
...
@@ -18,7 +18,7 @@ class TestRoute extends LocalHistoryRoute<String> {
@override
@override
List
<
OverlayEntry
>
get
overlayEntries
=>
_entries
;
List
<
OverlayEntry
>
get
overlayEntries
=>
_entries
;
List
<
OverlayEntry
>
_entries
=
<
OverlayEntry
>[];
final
List
<
OverlayEntry
>
_entries
=
<
OverlayEntry
>[];
void
log
(
String
s
)
{
void
log
(
String
s
)
{
results
.
add
(
'
$name
:
$s
'
);
results
.
add
(
'
$name
:
$s
'
);
...
...
packages/flutter_test/lib/src/test_async_utils.dart
View file @
4c530d5e
...
@@ -48,7 +48,7 @@ class TestAsyncUtils {
...
@@ -48,7 +48,7 @@ class TestAsyncUtils {
TestAsyncUtils
.
_
();
TestAsyncUtils
.
_
();
static
const
String
_className
=
'TestAsyncUtils'
;
static
const
String
_className
=
'TestAsyncUtils'
;
static
List
<
_AsyncScope
>
_scopeStack
=
<
_AsyncScope
>[];
static
final
List
<
_AsyncScope
>
_scopeStack
=
<
_AsyncScope
>[];
/// Calls the given callback in a new async scope. The callback argument is
/// Calls the given callback in a new async scope. The callback argument is
/// the asynchronous body of the calling method. The calling method is said to
/// the asynchronous body of the calling method. The calling method is said to
...
...
packages/flutter_tools/lib/src/android/android_device.dart
View file @
4c530d5e
...
@@ -427,7 +427,7 @@ class AndroidDevice extends Device {
...
@@ -427,7 +427,7 @@ class AndroidDevice extends Device {
return
_portForwarder
;
return
_portForwarder
;
}
}
static
RegExp
_timeRegExp
=
new
RegExp
(
r'^\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3}'
,
multiLine:
true
);
static
final
RegExp
_timeRegExp
=
new
RegExp
(
r'^\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3}'
,
multiLine:
true
);
/// Return the most recent timestamp in the Android log or `null` if there is
/// Return the most recent timestamp in the Android log or `null` if there is
/// no available timestamp. The format can be passed to logcat's -T option.
/// no available timestamp. The format can be passed to logcat's -T option.
...
...
packages/flutter_tools/lib/src/android/android_studio.dart
View file @
4c530d5e
...
@@ -61,7 +61,7 @@ class AndroidStudio implements Comparable<AndroidStudio> {
...
@@ -61,7 +61,7 @@ class AndroidStudio implements Comparable<AndroidStudio> {
String
_gradlePath
;
String
_gradlePath
;
String
_javaPath
;
String
_javaPath
;
bool
_isValid
=
false
;
bool
_isValid
=
false
;
List
<
String
>
_validationMessages
=
<
String
>[];
final
List
<
String
>
_validationMessages
=
<
String
>[];
factory
AndroidStudio
.
fromMacOSBundle
(
String
bundlePath
)
{
factory
AndroidStudio
.
fromMacOSBundle
(
String
bundlePath
)
{
final
String
studioPath
=
fs
.
path
.
join
(
bundlePath
,
'Contents'
);
final
String
studioPath
=
fs
.
path
.
join
(
bundlePath
,
'Contents'
);
...
...
packages/flutter_tools/lib/src/base/context.dart
View file @
4c530d5e
...
@@ -11,7 +11,7 @@ typedef void ErrorHandler(dynamic error, StackTrace stackTrace);
...
@@ -11,7 +11,7 @@ typedef void ErrorHandler(dynamic error, StackTrace stackTrace);
AppContext
get
context
=>
Zone
.
current
[
'context'
];
AppContext
get
context
=>
Zone
.
current
[
'context'
];
class
AppContext
{
class
AppContext
{
Map
<
Type
,
dynamic
>
_instances
=
<
Type
,
dynamic
>{};
final
Map
<
Type
,
dynamic
>
_instances
=
<
Type
,
dynamic
>{};
Zone
_zone
;
Zone
_zone
;
AppContext
()
:
_zone
=
Zone
.
current
;
AppContext
()
:
_zone
=
Zone
.
current
;
...
...
packages/flutter_tools/lib/src/base/logger.dart
View file @
4c530d5e
...
@@ -135,9 +135,9 @@ class BufferLogger extends Logger {
...
@@ -135,9 +135,9 @@ class BufferLogger extends Logger {
@override
@override
bool
get
isVerbose
=>
false
;
bool
get
isVerbose
=>
false
;
StringBuffer
_error
=
new
StringBuffer
();
final
StringBuffer
_error
=
new
StringBuffer
();
StringBuffer
_status
=
new
StringBuffer
();
final
StringBuffer
_status
=
new
StringBuffer
();
StringBuffer
_trace
=
new
StringBuffer
();
final
StringBuffer
_trace
=
new
StringBuffer
();
String
get
errorText
=>
_error
.
toString
();
String
get
errorText
=>
_error
.
toString
();
String
get
statusText
=>
_status
.
toString
();
String
get
statusText
=>
_status
.
toString
();
...
@@ -282,7 +282,7 @@ class AnsiTerminal {
...
@@ -282,7 +282,7 @@ class AnsiTerminal {
String
clearScreen
()
=>
supportsColor
?
_clear
:
'
\n\n
'
;
String
clearScreen
()
=>
supportsColor
?
_clear
:
'
\n\n
'
;
set
singleCharMode
(
bool
value
)
{
set
singleCharMode
(
bool
value
)
{
// TODO(goderbauer): instead of trying to set lineMode and then catching [_ENOTTY] or [_INVALID_HANDLE],
// TODO(goderbauer): instead of trying to set lineMode and then catching [_ENOTTY] or [_INVALID_HANDLE],
// we should check beforehand if stdin is connected to a terminal or not
// we should check beforehand if stdin is connected to a terminal or not
// (requires https://github.com/dart-lang/sdk/issues/29083 to be resolved).
// (requires https://github.com/dart-lang/sdk/issues/29083 to be resolved).
try
{
try
{
...
...
packages/flutter_tools/lib/src/base/utils.dart
View file @
4c530d5e
...
@@ -105,8 +105,8 @@ class ItemListNotifier<T> {
...
@@ -105,8 +105,8 @@ class ItemListNotifier<T> {
Set
<
T
>
_items
;
Set
<
T
>
_items
;
StreamController
<
T
>
_addedController
=
new
StreamController
<
T
>.
broadcast
();
final
StreamController
<
T
>
_addedController
=
new
StreamController
<
T
>.
broadcast
();
StreamController
<
T
>
_removedController
=
new
StreamController
<
T
>.
broadcast
();
final
StreamController
<
T
>
_removedController
=
new
StreamController
<
T
>.
broadcast
();
Stream
<
T
>
get
onAdded
=>
_addedController
.
stream
;
Stream
<
T
>
get
onAdded
=>
_addedController
.
stream
;
Stream
<
T
>
get
onRemoved
=>
_removedController
.
stream
;
Stream
<
T
>
get
onRemoved
=>
_removedController
.
stream
;
...
@@ -168,7 +168,7 @@ class SettingsFile {
...
@@ -168,7 +168,7 @@ class SettingsFile {
/// For more information, see
/// For more information, see
/// http://en.wikipedia.org/wiki/Universally_unique_identifier.
/// http://en.wikipedia.org/wiki/Universally_unique_identifier.
class
Uuid
{
class
Uuid
{
Random
_random
=
new
Random
();
final
Random
_random
=
new
Random
();
/// Generate a version 4 (random) uuid. This is a uuid scheme that only uses
/// Generate a version 4 (random) uuid. This is a uuid scheme that only uses
/// random numbers as the source of the generated uuid.
/// random numbers as the source of the generated uuid.
...
...
packages/flutter_tools/lib/src/commands/analyze_continuously.dart
View file @
4c530d5e
...
@@ -150,8 +150,8 @@ class AnalysisServer {
...
@@ -150,8 +150,8 @@ class AnalysisServer {
final
List
<
String
>
directories
;
final
List
<
String
>
directories
;
Process
_process
;
Process
_process
;
StreamController
<
bool
>
_analyzingController
=
new
StreamController
<
bool
>.
broadcast
();
final
StreamController
<
bool
>
_analyzingController
=
new
StreamController
<
bool
>.
broadcast
();
StreamController
<
FileAnalysisErrors
>
_errorsController
=
new
StreamController
<
FileAnalysisErrors
>.
broadcast
();
final
StreamController
<
FileAnalysisErrors
>
_errorsController
=
new
StreamController
<
FileAnalysisErrors
>.
broadcast
();
int
_id
=
0
;
int
_id
=
0
;
...
...
packages/flutter_tools/lib/src/commands/daemon.dart
View file @
4c530d5e
...
@@ -286,11 +286,11 @@ class AppDomain extends Domain {
...
@@ -286,11 +286,11 @@ class AppDomain extends Domain {
registerHandler
(
'discover'
,
discover
);
registerHandler
(
'discover'
,
discover
);
}
}
static
Uuid
_uuidGenerator
=
new
Uuid
();
static
final
Uuid
_uuidGenerator
=
new
Uuid
();
static
String
_getNewAppId
()
=>
_uuidGenerator
.
generateV4
();
static
String
_getNewAppId
()
=>
_uuidGenerator
.
generateV4
();
List
<
AppInstance
>
_apps
=
<
AppInstance
>[];
final
List
<
AppInstance
>
_apps
=
<
AppInstance
>[];
Future
<
Map
<
String
,
dynamic
>>
start
(
Map
<
String
,
dynamic
>
args
)
async
{
Future
<
Map
<
String
,
dynamic
>>
start
(
Map
<
String
,
dynamic
>
args
)
async
{
final
String
deviceId
=
_getStringArg
(
args
,
'deviceId'
,
required:
true
);
final
String
deviceId
=
_getStringArg
(
args
,
'deviceId'
,
required:
true
);
...
@@ -537,7 +537,7 @@ class DeviceDomain extends Domain {
...
@@ -537,7 +537,7 @@ class DeviceDomain extends Domain {
}
}
}
}
List
<
PollingDeviceDiscovery
>
_discoverers
=
<
PollingDeviceDiscovery
>[];
final
List
<
PollingDeviceDiscovery
>
_discoverers
=
<
PollingDeviceDiscovery
>[];
Future
<
List
<
Device
>>
getDevices
([
Map
<
String
,
dynamic
>
args
])
{
Future
<
List
<
Device
>>
getDevices
([
Map
<
String
,
dynamic
>
args
])
{
final
List
<
Device
>
devices
=
_discoverers
.
expand
((
PollingDeviceDiscovery
discoverer
)
{
final
List
<
Device
>
devices
=
_discoverers
.
expand
((
PollingDeviceDiscovery
discoverer
)
{
...
@@ -670,7 +670,7 @@ dynamic _toJsonable(dynamic obj) {
...
@@ -670,7 +670,7 @@ dynamic _toJsonable(dynamic obj) {
}
}
class
NotifyingLogger
extends
Logger
{
class
NotifyingLogger
extends
Logger
{
StreamController
<
LogMessage
>
_messageController
=
new
StreamController
<
LogMessage
>.
broadcast
();
final
StreamController
<
LogMessage
>
_messageController
=
new
StreamController
<
LogMessage
>.
broadcast
();
Stream
<
LogMessage
>
get
onMessage
=>
_messageController
.
stream
;
Stream
<
LogMessage
>
get
onMessage
=>
_messageController
.
stream
;
...
...
packages/flutter_tools/lib/src/dart/analysis.dart
View file @
4c530d5e
...
@@ -34,7 +34,7 @@ class AnalysisDriver {
...
@@ -34,7 +34,7 @@ class AnalysisDriver {
_processPlugins
();
_processPlugins
();
}
}
Set
<
Source
>
_analyzedSources
=
new
HashSet
<
Source
>();
final
Set
<
Source
>
_analyzedSources
=
new
HashSet
<
Source
>();
AnalysisOptionsProvider
analysisOptionsProvider
=
AnalysisOptionsProvider
analysisOptionsProvider
=
new
AnalysisOptionsProvider
();
new
AnalysisOptionsProvider
();
...
@@ -245,7 +245,7 @@ class PackageInfo {
...
@@ -245,7 +245,7 @@ class PackageInfo {
Packages
_packages
;
Packages
_packages
;
Map
<
String
,
List
<
file_system
.
Folder
>>
asMap
()
=>
_map
;
Map
<
String
,
List
<
file_system
.
Folder
>>
asMap
()
=>
_map
;
HashMap
<
String
,
List
<
file_system
.
Folder
>>
_map
=
final
HashMap
<
String
,
List
<
file_system
.
Folder
>>
_map
=
new
HashMap
<
String
,
List
<
file_system
.
Folder
>>();
new
HashMap
<
String
,
List
<
file_system
.
Folder
>>();
Packages
asPackages
()
=>
_packages
;
Packages
asPackages
()
=>
_packages
;
...
...
packages/flutter_tools/lib/src/device.dart
View file @
4c530d5e
...
@@ -30,7 +30,7 @@ class DeviceManager {
...
@@ -30,7 +30,7 @@ class DeviceManager {
_deviceDiscoverers
.
add
(
new
IOSSimulators
());
_deviceDiscoverers
.
add
(
new
IOSSimulators
());
}
}
List
<
DeviceDiscovery
>
_deviceDiscoverers
=
<
DeviceDiscovery
>[];
final
List
<
DeviceDiscovery
>
_deviceDiscoverers
=
<
DeviceDiscovery
>[];
/// A user-specified device ID.
/// A user-specified device ID.
String
specifiedDeviceId
;
String
specifiedDeviceId
;
...
...
packages/flutter_tools/lib/src/vmservice.dart
View file @
4c530d5e
...
@@ -96,7 +96,7 @@ class VMService {
...
@@ -96,7 +96,7 @@ class VMService {
final
Map
<
String
,
StreamController
<
ServiceEvent
>>
_eventControllers
=
final
Map
<
String
,
StreamController
<
ServiceEvent
>>
_eventControllers
=
<
String
,
StreamController
<
ServiceEvent
>>{};
<
String
,
StreamController
<
ServiceEvent
>>{};
Set
<
String
>
_listeningFor
=
new
Set
<
String
>();
final
Set
<
String
>
_listeningFor
=
new
Set
<
String
>();
/// Whether our connection to the VM service has been closed;
/// Whether our connection to the VM service has been closed;
bool
get
isClosed
=>
_peer
.
isClosed
;
bool
get
isClosed
=>
_peer
.
isClosed
;
...
...
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