Move Point to Offset (#9277)
* Manually fix every use of Point.x and Point.y
Some of these were moved to dx/dy, but not all.
* Manually convert uses of the old gradient API
* Remove old reference to Point.
* Mechanical changes
I applied the following at the root of the Flutter repository:
git ls-files -z | xargs -0 sed -i 's/\bPoint[.]origin\b/Offset.zero/g'
git ls-files -z | xargs -0 sed -i 's/\bPoint[.]lerp\b/Offset.lerp/g'
git ls-files -z | xargs -0 sed -i 's/\bnew Point\b/new Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bconst Point\b/const Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bstatic Point /static Offset /g'
git ls-files -z | xargs -0 sed -i 's/\bfinal Point /final Offset /g'
git ls-files -z | xargs -0 sed -i 's/^\( *\)Point /\1Offset /g'
git ls-files -z | xargs -0 sed -i 's/ui[.]Point\b/ui.Offset/g'
git ls-files -z | xargs -0 sed -i 's/(Point\b/(Offset/g'
git ls-files -z | xargs -0 sed -i 's/\([[{,]\) Point\b/\1 Offset/g'
git ls-files -z | xargs -0 sed -i 's/@required Point\b/@required Offset/g'
git ls-files -z | xargs -0 sed -i 's/<Point>/<Offset>/g'
git ls-files -z | xargs -0 sed -i 's/[.]toOffset()//g'
git ls-files -z | xargs -0 sed -i 's/[.]toPoint()//g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point, /show /g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point;/show Offset;/g'
* Mechanical changes - dartdocs
I applied the following at the root of the Flutter repository:
git ls-files -z | xargs -0 sed -i 's/\ba \[Point\]/an [Offset]/g'
git ls-files -z | xargs -0 sed -i 's/\[Point\]/[Offset]/g'
* Further improvements and a test
* Fix minor errors from rebasing...
* Roll engine
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -53,12 +53,12 @@ Future<Null> main() async {
|
||||
while (wallClockWatch.elapsed < kBenchmarkTime) {
|
||||
cpuWatch.reset();
|
||||
if (drawerIsOpen) {
|
||||
await tester.tapAt(const Point(780.0, 250.0)); // Close drawer
|
||||
await tester.tapAt(const Offset(780.0, 250.0)); // Close drawer
|
||||
await tester.pump();
|
||||
totalCloseIterationCount += 1;
|
||||
totalCloseFrameElapsedMicroseconds += cpuWatch.elapsedMicroseconds;
|
||||
} else {
|
||||
await tester.tapAt(const Point(20.0, 50.0)); // Open drawer
|
||||
await tester.tapAt(const Offset(20.0, 50.0)); // Open drawer
|
||||
await tester.pump();
|
||||
totalOpenIterationCount += 1;
|
||||
totalOpenFrameElapsedMicroseconds += cpuWatch.elapsedMicroseconds;
|
||||
|
||||
@@ -31,7 +31,7 @@ Future<Null> main() async {
|
||||
stocks.main();
|
||||
await tester.pump(); // Start startup animation
|
||||
await tester.pump(const Duration(seconds: 1)); // Complete startup animation
|
||||
await tester.tapAt(const Point(20.0, 40.0)); // Open drawer
|
||||
await tester.tapAt(const Offset(20.0, 40.0)); // Open drawer
|
||||
await tester.pump(); // Start drawer animation
|
||||
await tester.pump(const Duration(seconds: 1)); // Complete drawer animation
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ Future<Null> main() async {
|
||||
stocks.main();
|
||||
await tester.pump(); // Start startup animation
|
||||
await tester.pump(const Duration(seconds: 1)); // Complete startup animation
|
||||
await tester.tapAt(const Point(20.0, 40.0)); // Open drawer
|
||||
await tester.tapAt(const Offset(20.0, 40.0)); // Open drawer
|
||||
await tester.pump(); // Start drawer animation
|
||||
await tester.pump(const Duration(seconds: 1)); // Complete drawer animation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user