Use boolean json representation for obscureText (#9927)

Corrects type from string introduced in
21712a49a7.
This commit is contained in:
Chris Bracken
2017-05-09 13:48:11 -07:00
committed by GitHub
parent d780c4b205
commit 9935b3075c
2 changed files with 2 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ class TextInputConfiguration {
Map<String, dynamic> toJSON() {
return <String, dynamic>{
'inputType': inputType.toString(),
'obscureText': obscureText.toString(),
'obscureText': obscureText,
'actionLabel': actionLabel,
};
}

View File

@@ -22,7 +22,7 @@ void main() {
);
final Map<String, dynamic> json = configuration.toJSON();
expect(json['inputType'], 'TextInputType.number');
expect(json['obscureText'], 'true');
expect(json['obscureText'], true);
expect(json['actionLabel'], 'xyzzy');
});
});