diff --git a/packages/flutter/lib/src/foundation/diagnostics.dart b/packages/flutter/lib/src/foundation/diagnostics.dart index f655b0e460e..b40277fa654 100644 --- a/packages/flutter/lib/src/foundation/diagnostics.dart +++ b/packages/flutter/lib/src/foundation/diagnostics.dart @@ -2032,6 +2032,7 @@ class IntProperty extends _NumProperty { showName: showName, unit: unit, defaultValue: defaultValue, + style: style, level: level, ); diff --git a/packages/flutter/test/foundation/diagnostics_test.dart b/packages/flutter/test/foundation/diagnostics_test.dart index 4b5194a8f3d..69e3365c44c 100644 --- a/packages/flutter/test/foundation/diagnostics_test.dart +++ b/packages/flutter/test/foundation/diagnostics_test.dart @@ -491,7 +491,8 @@ void main() { ' │ │\n' ' │ └─child node B3: TestTree#00000\n' ' │ \n' - ' │ foo: 42\n' + ' │ foo:\n' + ' │ 42\n' ' │\n' ' └─child node C: TestTree#00000\n' ' foo:\n' @@ -2280,4 +2281,22 @@ void main() { expect(json['name'], 'string2'); expect(json['value'], 'world'); }); + + test('IntProperty arguments passed to super', () { + final DiagnosticsProperty property = IntProperty( + 'Example', + 0, + ifNull: 'is null', + showName: false, + defaultValue: 1, + style: DiagnosticsTreeStyle.none, + level: DiagnosticLevel.off, + ); + expect(property.value, equals(0)); + expect(property.ifNull, equals('is null')); + expect(property.showName, equals(false)); + expect(property.defaultValue, equals(1)); + expect(property.style, equals(DiagnosticsTreeStyle.none)); + expect(property.level, equals(DiagnosticLevel.off)); + }); }