MockTemplates class
Mock 模板生成器
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
error(
{required String message, int code = 500, dynamic data}) → Map< String, dynamic> - 生成错误响应模板
-
list(
List items) → Map< String, dynamic> - 生成列表模板
-
object(
Map< String, dynamic> obj) → Map<String, dynamic> - 生成对象模板
-
paginatedList(
{required List list, int page = 1, int pageSize = 10, int? total}) → Map< String, dynamic> - 生成分页列表模板
-
success(
{required dynamic data, String message = '成功', int code = 200}) → Map< String, dynamic> - 生成成功响应模板