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
80849ade
Unverified
Commit
80849ade
authored
Apr 28, 2022
by
Phil Quitslund
Committed by
GitHub
Apr 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev, bots, examples] rename local functions with `_`s (#102703)
parent
6a443138
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
31 deletions
+31
-31
picture_cache_perf_e2e.dart
...nchmarks/macrobenchmarks/test/picture_cache_perf_e2e.dart
+5
-5
picture_cache_complexity_scoring_perf_test.dart
...st_driver/picture_cache_complexity_scoring_perf_test.dart
+3
-3
picture_cache_perf_test.dart
.../macrobenchmarks/test_driver/picture_cache_perf_test.dart
+5
-5
matrix_utils_transform_bench.dart
...benchmarks/lib/geometry/matrix_utils_transform_bench.dart
+4
-4
analyze.dart
dev/bots/analyze.dart
+4
-4
home.dart
...ration_tests/flutter_gallery/lib/demo/animation/home.dart
+6
-6
reorderable_list_view.1.dart
...ib/material/reorderable_list/reorderable_list_view.1.dart
+2
-2
cupertino_slider.0_test.dart
...es/api/test/cupertino/slider/cupertino_slider.0_test.dart
+2
-2
No files found.
dev/benchmarks/macrobenchmarks/test/picture_cache_perf_e2e.dart
View file @
80849ade
...
...
@@ -16,7 +16,7 @@ void main() {
body:
(
WidgetController
controller
)
async
{
final
Finder
nestedScroll
=
find
.
byKey
(
const
ValueKey
<
String
>(
'tabbar_view'
));
expect
(
nestedScroll
,
findsOneWidget
);
Future
<
void
>
_
scrollOnce
(
double
offset
)
async
{
Future
<
void
>
scrollOnce
(
double
offset
)
async
{
await
controller
.
timedDrag
(
nestedScroll
,
Offset
(-
offset
,
0.0
),
...
...
@@ -25,10 +25,10 @@ void main() {
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
500
));
}
for
(
int
i
=
0
;
i
<
3
;
i
+=
1
)
{
await
_
scrollOnce
(-
300.0
);
await
_
scrollOnce
(-
300.0
);
await
_
scrollOnce
(
300.0
);
await
_
scrollOnce
(
300.0
);
await
scrollOnce
(-
300.0
);
await
scrollOnce
(-
300.0
);
await
scrollOnce
(
300.0
);
await
scrollOnce
(
300.0
);
}
},
);
...
...
dev/benchmarks/macrobenchmarks/test_driver/picture_cache_complexity_scoring_perf_test.dart
View file @
80849ade
...
...
@@ -14,7 +14,7 @@ void main() {
pageDelay:
const
Duration
(
seconds:
1
),
driverOps:
(
FlutterDriver
driver
)
async
{
final
SerializableFinder
tabBarView
=
find
.
byValueKey
(
'tabbar_view_complexity'
);
Future
<
void
>
_
scrollOnce
(
double
offset
)
async
{
Future
<
void
>
scrollOnce
(
double
offset
)
async
{
// Technically it's not scrolling but moving
await
driver
.
scroll
(
tabBarView
,
offset
,
0.0
,
const
Duration
(
milliseconds:
300
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
500
));
...
...
@@ -22,8 +22,8 @@ void main() {
// When we eventually add more test panes we will want to tweak these
// to go through all the panes
for
(
int
i
=
0
;
i
<
6
;
i
+=
1
)
{
await
_
scrollOnce
(-
300.0
);
await
_
scrollOnce
(
300.0
);
await
scrollOnce
(-
300.0
);
await
scrollOnce
(
300.0
);
}
},
);
...
...
dev/benchmarks/macrobenchmarks/test_driver/picture_cache_perf_test.dart
View file @
80849ade
...
...
@@ -14,16 +14,16 @@ void main() {
pageDelay:
const
Duration
(
seconds:
1
),
driverOps:
(
FlutterDriver
driver
)
async
{
final
SerializableFinder
tabBarView
=
find
.
byValueKey
(
'tabbar_view'
);
Future
<
void
>
_
scrollOnce
(
double
offset
)
async
{
Future
<
void
>
scrollOnce
(
double
offset
)
async
{
// Technically it's not scrolling but moving
await
driver
.
scroll
(
tabBarView
,
offset
,
0.0
,
const
Duration
(
milliseconds:
300
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
500
));
}
for
(
int
i
=
0
;
i
<
3
;
i
+=
1
)
{
await
_
scrollOnce
(-
300.0
);
await
_
scrollOnce
(-
300.0
);
await
_
scrollOnce
(
300.0
);
await
_
scrollOnce
(
300.0
);
await
scrollOnce
(-
300.0
);
await
scrollOnce
(-
300.0
);
await
scrollOnce
(
300.0
);
await
scrollOnce
(
300.0
);
}
},
);
...
...
dev/benchmarks/microbenchmarks/lib/geometry/matrix_utils_transform_bench.dart
View file @
80849ade
...
...
@@ -15,7 +15,7 @@ void main() {
assert
(
false
,
"Don't run benchmarks in checked mode! Use 'flutter run --release'."
);
print
(
'MatrixUtils.transformRect and .transformPoint benchmark...'
);
Matrix4
_
makePerspective
(
double
radius
,
double
angle
,
double
perspective
)
{
Matrix4
makePerspective
(
double
radius
,
double
angle
,
double
perspective
)
{
return
MatrixUtils
.
createCylindricalProjectionTransform
(
radius:
radius
,
angle:
angle
,
...
...
@@ -29,9 +29,9 @@ void main() {
Matrix4
.
identity
()..
scale
(
1.2
,
1.3
,
1.0
)..
translate
(
12.0
,
13.0
,
10.0
),
];
final
List
<
Matrix4
>
perspectiveTransforms
=
<
Matrix4
>[
_
makePerspective
(
10.0
,
math
.
pi
/
8.0
,
0.3
),
_
makePerspective
(
8.0
,
math
.
pi
/
8.0
,
0.2
),
_
makePerspective
(
1.0
,
math
.
pi
/
4.0
,
0.1
)..
rotateX
(
0.1
),
makePerspective
(
10.0
,
math
.
pi
/
8.0
,
0.3
),
makePerspective
(
8.0
,
math
.
pi
/
8.0
,
0.2
),
makePerspective
(
1.0
,
math
.
pi
/
4.0
,
0.1
)..
rotateX
(
0.1
),
];
final
List
<
Rect
>
rectangles
=
<
Rect
>[
const
Rect
.
fromLTRB
(
1.1
,
1.2
,
1.5
,
1.8
),
...
...
dev/bots/analyze.dart
View file @
80849ade
...
...
@@ -822,21 +822,21 @@ Future<void> verifyNoRuntimeTypeInToString(String workingDirectory) async {
for (int index = 0; index < lines.length; index++) {
if (toStringRegExp.hasMatch(lines[index])) {
final int sourceLine = index + 1;
bool
_
checkForRuntimeType(String line) {
bool checkForRuntimeType(String line) {
if (line.contains(r'
$runtimeType
') || line.contains('runtimeType.toString()')) {
problems.add('
${file.path}
:
$sourceLine
}: toString calls runtimeType.toString');
return true;
}
return false;
}
if (
_
checkForRuntimeType(lines[index])) {
if (checkForRuntimeType(lines[index])) {
continue;
}
if (lines[index].contains('=>')) {
while (!lines[index].contains(';')) {
index++;
assert(index < lines.length, 'Source file
$file
has unterminated toString method.');
if (
_
checkForRuntimeType(lines[index])) {
if (checkForRuntimeType(lines[index])) {
break;
}
}
...
...
@@ -845,7 +845,7 @@ Future<void> verifyNoRuntimeTypeInToString(String workingDirectory) async {
while (!lines[index].contains('}') && openBraceCount > 0) {
index++;
assert(index < lines.length, 'Source file
$file
has unbalanced braces in a toString method.');
if (
_
checkForRuntimeType(lines[index])) {
if (checkForRuntimeType(lines[index])) {
break;
}
openBraceCount += '{'.allMatches(lines[index]).length;
...
...
dev/integration_tests/flutter_gallery/lib/demo/animation/home.dart
View file @
80849ade
...
...
@@ -300,15 +300,15 @@ class _AllSectionsView extends AnimatedWidget {
1.0
-
((
size
.
height
-
minHeight
!)
/
(
midHeight
!
-
minHeight
!)).
clamp
(
0.0
,
1.0
);
double
_
indicatorOpacity
(
int
index
)
{
double
indicatorOpacity
(
int
index
)
{
return
1.0
-
_selectedIndexDelta
(
index
)
*
0.5
;
}
double
_
titleOpacity
(
int
index
)
{
double
titleOpacity
(
int
index
)
{
return
1.0
-
_selectedIndexDelta
(
index
)
*
tColumnToRow
*
0.5
;
}
double
_
titleScale
(
int
index
)
{
double
titleScale
(
int
index
)
{
return
1.0
-
_selectedIndexDelta
(
index
)
*
tColumnToRow
*
0.15
;
}
...
...
@@ -320,8 +320,8 @@ class _AllSectionsView extends AnimatedWidget {
id:
'title
$index
'
,
child:
SectionTitle
(
section:
section
,
scale:
_
titleScale
(
index
),
opacity:
_
titleOpacity
(
index
),
scale:
titleScale
(
index
),
opacity:
titleOpacity
(
index
),
),
));
}
...
...
@@ -330,7 +330,7 @@ class _AllSectionsView extends AnimatedWidget {
children
.
add
(
LayoutId
(
id:
'indicator
$index
'
,
child:
SectionIndicator
(
opacity:
_
indicatorOpacity
(
index
),
opacity:
indicatorOpacity
(
index
),
),
));
}
...
...
examples/api/lib/material/reorderable_list/reorderable_list_view.1.dart
View file @
80849ade
...
...
@@ -40,7 +40,7 @@ class _ReorderableExampleState extends State<ReorderableExample> {
final
Color
evenItemColor
=
colorScheme
.
secondary
.
withOpacity
(
0.15
);
final
Color
draggableItemColor
=
colorScheme
.
secondary
;
Widget
_
proxyDecorator
(
Widget
child
,
int
index
,
Animation
<
double
>
animation
)
{
Widget
proxyDecorator
(
Widget
child
,
int
index
,
Animation
<
double
>
animation
)
{
return
AnimatedBuilder
(
animation:
animation
,
builder:
(
BuildContext
context
,
Widget
?
child
)
{
...
...
@@ -59,7 +59,7 @@ class _ReorderableExampleState extends State<ReorderableExample> {
return
ReorderableListView
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
40
),
proxyDecorator:
_
proxyDecorator
,
proxyDecorator:
proxyDecorator
,
children:
<
Widget
>[
for
(
int
index
=
0
;
index
<
_items
.
length
;
index
+=
1
)
ListTile
(
...
...
examples/api/test/cupertino/slider/cupertino_slider.0_test.dart
View file @
80849ade
...
...
@@ -7,7 +7,7 @@ import 'package:flutter_api_samples/cupertino/slider/cupertino_slider.0.dart' as
import
'package:flutter_test/flutter_test.dart'
;
void
main
(
)
{
Future
<
void
>
_
dragSlider
(
WidgetTester
tester
,
Key
sliderKey
)
{
Future
<
void
>
dragSlider
(
WidgetTester
tester
,
Key
sliderKey
)
{
final
Offset
topLeft
=
tester
.
getTopLeft
(
find
.
byKey
(
sliderKey
));
const
double
unit
=
CupertinoThumbPainter
.
radius
;
const
double
delta
=
3.0
*
unit
;
...
...
@@ -22,7 +22,7 @@ void main() {
// Check for the initial slider value.
expect
(
find
.
text
(
'0.0'
),
findsOneWidget
);
await
_
dragSlider
(
tester
,
const
Key
(
'slider'
));
await
dragSlider
(
tester
,
const
Key
(
'slider'
));
await
tester
.
pumpAndSettle
();
// Check for the updated slider value.
...
...
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