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