AppUserList.fromJson constructor

AppUserList.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory AppUserList.fromJson(Map<String, dynamic> json) {
  return AppUserList(
    data: (json['data'] as List<dynamic>?)
            ?.map((user) => AppUser.fromJson(user as Map<String, dynamic>))
            .toList() ??
        [],
    total: json['total'] as int? ?? 0,
    limit: json['limit'] as int? ?? 0,
    offset: json['offset'] as int? ?? 0,
    hasMore: json['has_more'] as bool? ?? false,
  );
}