Fix additional @mustCallSuper indirect overrides and mixins (#30667)

This commit is contained in:
Sam Rawlins 2019-04-10 14:54:51 -07:00 committed by Michael Goderbauer
parent 499004779b
commit 83ddd98849
9 changed files with 12 additions and 2 deletions

View file

@ -2663,6 +2663,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
@protected
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties.add(DiagnosticsProperty<dynamic>('creator', debugCreator, defaultValue: null, level: DiagnosticLevel.debug));
properties.add(DiagnosticsProperty<ParentData>('parentData', parentData, tooltip: _debugCanParentUseSize == true ? 'can use size' : null, missingIfNull: true));
properties.add(DiagnosticsProperty<Constraints>('constraints', constraints, missingIfNull: true));

View file

@ -250,6 +250,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
}
@override
// ignore: MUST_CALL_SUPER
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
// call to ${super.debugFillProperties(description)} is omitted because the
// root superclasses don't include any interesting information for this

View file

@ -2048,6 +2048,7 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin {
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
bool hideOwner = true;
if (_dirty) {
final bool inDirtyNodes = owner != null && owner._dirtyNodes.contains(this);

View file

@ -35,6 +35,7 @@ class TestTree extends Object with DiagnosticableTreeMixin {
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
if (style != null)
properties.defaultDiagnosticsTreeStyle = style;

View file

@ -61,6 +61,7 @@ class AlwaysKeepAliveState extends State<AlwaysKeepAliveWidget>
@override
Widget build(BuildContext context) {
super.build(context);
return Text(AlwaysKeepAliveWidget.text);
}
}

View file

@ -20,6 +20,7 @@ class PaintingBindingSpy extends BindingBase with ServicesBinding, PaintingBindi
}
@override
// ignore: MUST_CALL_SUPER
void initLicenses() {
// Do not include any licenses, because we're a test, and the LICENSE file
// doesn't get generated for tests.

View file

@ -35,8 +35,10 @@ class AliveState extends State<Alive> with AutomaticKeepAliveClientMixin {
bool get wantKeepAlive => widget.alive;
@override
Widget build(BuildContext context) =>
Text('${widget.index}:$wantKeepAlive');
Widget build(BuildContext context) {
super.build(context);
return Text('${widget.index}:$wantKeepAlive');
}
}
typedef WhetherToKeepAlive = bool Function(int);

View file

@ -127,6 +127,7 @@ class ProblemWidget extends StatefulWidget {
class ProblemWidgetState extends State<ProblemWidget> with AutomaticKeepAliveClientMixin<ProblemWidget> {
@override
Widget build(BuildContext context) {
super.build(context);
Widget child = Semantics(
container: true,
child: Text(widget.text),

View file

@ -168,6 +168,7 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
}
@override
// ignore: MUST_CALL_SUPER
void initLicenses() {
// Do not include any licenses, because we're a test, and the LICENSE file
// doesn't get generated for tests.