toJson method

  1. @override
Map<String, dynamic> toJson()
override

Converts this class object into a JSON value.

Implementation

@override
Map<String, dynamic> toJson() {
  final result = <String, dynamic>{
    "flow": flow,
    ...super.toJson(),
  };

  if (authorization != null) {
    result["authorization"] = authorization;
  }

  if (token != null) {
    result["token"] = token;
  }

  if (refresh != null) {
    result["refresh"] = refresh;
  }

  if (scopes != null) {
    result["scopes"] = scopes;
  }

  return result;
}