mirror of
https://github.com/RxReader/tencent_kit.git
synced 2025-06-16 23:58:46 +08:00
toString
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'tencent_api_resp.g.dart';
|
||||
@ -19,6 +21,11 @@ abstract class TencentApiResp {
|
||||
final String? msg;
|
||||
|
||||
bool get isSuccessful => ret == RET_SUCCESS;
|
||||
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
@override
|
||||
String toString() => const JsonEncoder.withIndent(' ').convert(toJson());
|
||||
}
|
||||
|
||||
@JsonSerializable(
|
||||
@ -111,5 +118,6 @@ class TencentUserInfoResp extends TencentApiResp {
|
||||
return figureurl;
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() => _$TencentUserInfoRespToJson(this);
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'tencent_unionid_resp.g.dart';
|
||||
@ -32,4 +34,7 @@ class TencentUnionidResp {
|
||||
bool get isSuccessful => error == ERROR_SUCCESS;
|
||||
|
||||
Map<String, dynamic> toJson() => _$TencentUnionidRespToJson(this);
|
||||
|
||||
@override
|
||||
String toString() => const JsonEncoder.withIndent(' ').convert(toJson());
|
||||
}
|
||||
|
Reference in New Issue
Block a user