mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +00:00
pass style
argument to super of IntProperty
(#85414)
This commit is contained in:
parent
4d9a3753a4
commit
de36e51155
|
@ -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));
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue