Commit 9935b307 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Use boolean json representation for obscureText (#9927)

Corrects type from string introduced in
21712a49.
parent d780c4b2
...@@ -66,7 +66,7 @@ class TextInputConfiguration { ...@@ -66,7 +66,7 @@ class TextInputConfiguration {
Map<String, dynamic> toJSON() { Map<String, dynamic> toJSON() {
return <String, dynamic>{ return <String, dynamic>{
'inputType': inputType.toString(), 'inputType': inputType.toString(),
'obscureText': obscureText.toString(), 'obscureText': obscureText,
'actionLabel': actionLabel, 'actionLabel': actionLabel,
}; };
} }
......
...@@ -22,7 +22,7 @@ void main() { ...@@ -22,7 +22,7 @@ void main() {
); );
final Map<String, dynamic> json = configuration.toJSON(); final Map<String, dynamic> json = configuration.toJSON();
expect(json['inputType'], 'TextInputType.number'); expect(json['inputType'], 'TextInputType.number');
expect(json['obscureText'], 'true'); expect(json['obscureText'], true);
expect(json['actionLabel'], 'xyzzy'); expect(json['actionLabel'], 'xyzzy');
}); });
}); });
......
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