Unverified Commit de36e511 authored by Viren Khatri's avatar Viren Khatri Committed by GitHub

pass `style` argument to super of `IntProperty` (#85414)

parent 4d9a3753
......@@ -2032,6 +2032,7 @@ class IntProperty extends _NumProperty<int> {
showName: showName,
unit: unit,
defaultValue: defaultValue,
style: style,
level: level,
);
......
......@@ -491,7 +491,8 @@ void main() {
' │ │\n'
' │ └─child node B3: TestTree#00000\n'
' │ <leaf node>\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<num> 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));
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment