GPayParams.fromJson constructor
Factory method to create a GPayParams from a JSON map.
Implementation
factory GPayParams.fromJson(Map<String, dynamic> json) {
return GPayParams(
buttonType: json['buttonType'] != null
? GPayButtonType.values
.firstWhere((e) => e.name.toUpperCase() == json['buttonType'])
: null,
buttonStyle: json['buttonStyle'] != null
? GPayButtonStyle.fromJson(json['buttonStyle'])
: null,
);
}