-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4bc56a8
commit 47177e2
Showing
6 changed files
with
108 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,4 @@ app.*.symbols | |
|
||
# Obfuscation related | ||
app.*.map.json | ||
/lib/build_timestamp.dart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/rendering.dart'; | ||
import 'package:scroll_test/render_paint_measure.dart'; | ||
|
||
class PaintMeasure extends SingleChildRenderObjectWidget { | ||
/// Creates a widget that insets its child. | ||
/// | ||
/// The [measurePaint] argument must not be null. | ||
const PaintMeasure({ | ||
Key? key, | ||
this.measurePaint = true, | ||
Widget? child, | ||
}) : super(key: key, child: child); | ||
|
||
/// The amount of space by which to inset the child. | ||
final bool measurePaint; | ||
|
||
@override | ||
RenderPaintMeasure createRenderObject(BuildContext context) { | ||
return RenderPaintMeasure( | ||
measurePaint: measurePaint, | ||
); | ||
} | ||
|
||
@override | ||
void updateRenderObject(BuildContext context, RenderPaintMeasure renderObject) { | ||
renderObject..measurePaint = measurePaint; | ||
} | ||
|
||
@override | ||
void debugFillProperties(DiagnosticPropertiesBuilder properties) { | ||
super.debugFillProperties(properties); | ||
properties.add(DiagnosticsProperty<bool>('measurePaint', measurePaint)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:flutter/rendering.dart'; | ||
|
||
class RenderPaintMeasure extends RenderBox { | ||
RenderPaintMeasure({ | ||
this.measurePaint = true, | ||
RenderBox? child, | ||
}); | ||
|
||
bool measurePaint; | ||
|
||
@override | ||
void performLayout() { | ||
return; | ||
} | ||
|
||
@override | ||
void debugFillProperties(DiagnosticPropertiesBuilder properties) { | ||
super.debugFillProperties(properties); | ||
properties.add(DiagnosticsProperty<bool>('MeasurePaint', measurePaint)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters