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
254c9f17
Unverified
Commit
254c9f17
authored
May 13, 2021
by
Abhishek Ghaskata
Committed by
GitHub
May 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable use_named_constants_lint (#82426)
parent
63fc778f
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
16 additions
and
24 deletions
+16
-24
analysis_options.yaml
analysis_options.yaml
+1
-1
flexible_space_bar.dart
packages/flutter/lib/src/material/flexible_space_bar.dart
+1
-1
restoration_properties.dart
packages/flutter/lib/src/widgets/restoration_properties.dart
+2
-2
gesture_binding_resample_event_on_widget_test.dart
...stures/gesture_binding_resample_event_on_widget_test.dart
+2
-2
gesture_binding_resample_event_test.dart
...er/test/gestures/gesture_binding_resample_event_test.dart
+1
-1
elevated_button_test.dart
packages/flutter/test/material/elevated_button_test.dart
+1
-1
outlined_button_test.dart
packages/flutter/test/material/outlined_button_test.dart
+1
-1
popup_menu_test.dart
packages/flutter/test/material/popup_menu_test.dart
+1
-1
text_button_test.dart
packages/flutter/test/material/text_button_test.dart
+1
-1
text_input_test.dart
packages/flutter/test/services/text_input_test.dart
+1
-1
draggable_test.dart
packages/flutter/test/widgets/draggable_test.dart
+1
-1
shape_decoration_test.dart
packages/flutter/test/widgets/shape_decoration_test.dart
+1
-1
bundle_builder_test.dart
...flutter_tools/test/general.shard/bundle_builder_test.dart
+2
-10
No files found.
analysis_options.yaml
View file @
254c9f17
...
...
@@ -222,7 +222,7 @@ linter:
-
use_is_even_rather_than_modulo
-
use_key_in_widget_constructors
-
use_late_for_private_fields_and_variables
# - use_named_constants # not yet tested
-
use_named_constants
-
use_raw_strings
-
use_rethrow_when_possible
# - use_setters_to_change_properties # not yet tested
...
...
packages/flutter/lib/src/material/flexible_space_bar.dart
View file @
254c9f17
...
...
@@ -103,7 +103,7 @@ enum StretchMode {
/// decoration: BoxDecoration(
/// gradient: LinearGradient(
/// begin: Alignment(0.0, 0.5),
/// end: Alignment
(0.0, 0.0)
,
/// end: Alignment
.center
,
/// colors: <Color>[
/// Color(0x60000000),
/// Color(0x00000000),
...
...
packages/flutter/lib/src/widgets/restoration_properties.dart
View file @
254c9f17
...
...
@@ -71,7 +71,7 @@ import 'restoration.dart';
/// ```dart
/// class RestorableDuration extends RestorableValue<Duration> {
/// @override
/// Duration createDefaultValue() =>
const Duration()
;
/// Duration createDefaultValue() =>
Duration.zero
;
///
/// @override
/// void didUpdateValue(Duration? oldValue) {
...
...
@@ -84,7 +84,7 @@ import 'restoration.dart';
/// if (data != null) {
/// return Duration(microseconds: data as int);
/// }
/// return
const Duration()
;
/// return
Duration.zero
;
/// }
///
/// @override
...
...
packages/flutter/test/gestures/gesture_binding_resample_event_on_widget_test.dart
View file @
254c9f17
...
...
@@ -45,12 +45,12 @@ void main() {
ui
.
PointerData
(
change:
ui
.
PointerChange
.
add
,
physicalX:
0.0
,
timeStamp:
epoch
+
Duration
.
zero
,
timeStamp:
epoch
,
),
ui
.
PointerData
(
change:
ui
.
PointerChange
.
down
,
physicalX:
0.0
,
timeStamp:
epoch
+
const
Duration
(
milliseconds:
0
)
,
timeStamp:
epoch
,
),
ui
.
PointerData
(
change:
ui
.
PointerChange
.
move
,
...
...
packages/flutter/test/gestures/gesture_binding_resample_event_test.dart
View file @
254c9f17
...
...
@@ -69,7 +69,7 @@ void main() {
ui
.
PointerData
(
change:
ui
.
PointerChange
.
add
,
physicalX:
0.0
,
timeStamp:
epoch
+
const
Duration
(
milliseconds:
0
)
,
timeStamp:
epoch
,
),
ui
.
PointerData
(
change:
ui
.
PointerChange
.
down
,
...
...
packages/flutter/test/material/elevated_button_test.dart
View file @
254c9f17
...
...
@@ -1142,7 +1142,7 @@ void main() {
final
Key
labelKey
=
UniqueKey
();
final
ButtonStyle
style
=
ElevatedButton
.
styleFrom
(
padding:
EdgeInsets
.
zero
,
visualDensity:
const
VisualDensity
()
,
// dx=0, dy=0
visualDensity:
VisualDensity
.
standard
,
// dx=0, dy=0
);
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/material/outlined_button_test.dart
View file @
254c9f17
...
...
@@ -1318,7 +1318,7 @@ void main() {
final
Key
labelKey
=
UniqueKey
();
final
ButtonStyle
style
=
OutlinedButton
.
styleFrom
(
padding:
EdgeInsets
.
zero
,
visualDensity:
const
VisualDensity
()
,
// dx=0, dy=0
visualDensity:
VisualDensity
.
standard
,
// dx=0, dy=0
);
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/material/popup_menu_test.dart
View file @
254c9f17
...
...
@@ -2314,7 +2314,7 @@ void main() {
onPressed:
()
{
showMenu
<
void
>(
context:
navigator
.
currentContext
!,
position:
const
RelativeRect
.
fromLTRB
(
0
,
0
,
0
,
0
)
,
position:
RelativeRect
.
fill
,
items:
const
<
PopupMenuItem
<
void
>>[
PopupMenuItem
<
void
>(
child:
Text
(
'foo'
)),
],
...
...
packages/flutter/test/material/text_button_test.dart
View file @
254c9f17
...
...
@@ -1115,7 +1115,7 @@ void main() {
final
Key
labelKey
=
UniqueKey
();
final
ButtonStyle
style
=
TextButton
.
styleFrom
(
padding:
EdgeInsets
.
zero
,
visualDensity:
const
VisualDensity
()
,
// dx=0, dy=0
visualDensity:
VisualDensity
.
standard
,
// dx=0, dy=0
);
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/services/text_input_test.dart
View file @
254c9f17
...
...
@@ -134,7 +134,7 @@ void main() {
test
(
'basic structure'
,
()
async
{
const
TextInputType
text
=
TextInputType
.
text
;
const
TextInputType
number
=
TextInputType
.
number
;
const
TextInputType
number2
=
TextInputType
.
number
WithOptions
()
;
const
TextInputType
number2
=
TextInputType
.
number
;
const
TextInputType
signed
=
TextInputType
.
numberWithOptions
(
signed:
true
);
const
TextInputType
signed2
=
TextInputType
.
numberWithOptions
(
signed:
true
);
const
TextInputType
decimal
=
TextInputType
.
numberWithOptions
(
decimal:
true
);
...
...
packages/flutter/test/widgets/draggable_test.dart
View file @
254c9f17
...
...
@@ -3036,7 +3036,7 @@ void main() {
feedback:
const
Text
(
'Feedback'
),
dragAnchorStrategy:
(
Draggable
<
Object
>
widget
,
BuildContext
context
,
Offset
position
)
{
dragAnchorStrategyCalled
=
true
;
return
const
Offset
(
0
,
0
)
;
return
Offset
.
zero
;
},
),
],
...
...
packages/flutter/test/widgets/shape_decoration_test.dart
View file @
254c9f17
...
...
@@ -123,7 +123,7 @@ Future<void> main() async {
child:
DecoratedBox
(
decoration:
ShapeDecoration
(
gradient:
RadialGradient
(
focal:
AlignmentDirectional
(
0
,
1
)
,
focal:
AlignmentDirectional
.
bottomCenter
,
focalRadius:
5
,
radius:
2
,
colors:
<
Color
>[
Colors
.
red
,
Colors
.
black
],
...
...
packages/flutter_tools/test/general.shard/bundle_builder_test.dart
View file @
254c9f17
...
...
@@ -31,11 +31,7 @@ void main() {
await
BundleBuilder
().
build
(
platform:
TargetPlatform
.
ios
,
buildInfo:
const
BuildInfo
(
BuildMode
.
debug
,
null
,
treeShakeIcons:
false
),
buildInfo:
BuildInfo
.
debug
,
project:
FlutterProject
.
fromDirectoryTest
(
globals
.
fs
.
currentDirectory
),
mainPath:
globals
.
fs
.
path
.
join
(
'lib'
,
'main.dart'
),
assetDirPath:
'example'
,
...
...
@@ -54,11 +50,7 @@ void main() {
expect
(
()
=>
BundleBuilder
().
build
(
platform:
TargetPlatform
.
ios
,
buildInfo:
const
BuildInfo
(
BuildMode
.
debug
,
null
,
treeShakeIcons:
false
),
buildInfo:
BuildInfo
.
debug
,
project:
FlutterProject
.
fromDirectoryTest
(
globals
.
fs
.
currentDirectory
),
mainPath:
'lib/main.dart'
,
assetDirPath:
'example'
,
...
...
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