Handle null values in TextInputConfiguration.actionLabel JSON (#8377)

Fixes https://github.com/flutter/flutter/issues/29798
This commit is contained in:
Jason Simmons 2019-03-29 17:15:04 -07:00 committed by GitHub
parent d0239bd834
commit ca7623eb39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -242,7 +242,7 @@ public class TextInputChannel {
TextCapitalization.fromValue(json.getString("textCapitalization")),
InputType.fromJson(json.getJSONObject("inputType")),
inputAction,
json.optString("actionLabel")
json.isNull("actionLabel") ? null : json.getString("actionLabel")
);
}