Initial scaffold: FocusFlow shared Dart package
Models (Task, Streak, StreakEntry, Reward, User, TimeEstimate, CoworkingRoom, ApiResponse), enums (EnergyLevel, TaskStatus, RewardType, RewardStyle), constants (ApiConstants, ErrorCodes, AppLimits), validators, and generated .g.dart files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
71
lib/src/models/api_response.g.dart
Normal file
71
lib/src/models/api_response.g.dart
Normal file
@@ -0,0 +1,71 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'api_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ApiResponse<T> _$ApiResponseFromJson<T>(
|
||||
Map<String, dynamic> json,
|
||||
T Function(Object? json) fromJsonT,
|
||||
) => ApiResponse<T>(
|
||||
status: json['status'] as String,
|
||||
data: _$nullableGenericFromJson(json['data'], fromJsonT),
|
||||
error:
|
||||
json['error'] == null
|
||||
? null
|
||||
: ApiError.fromJson(json['error'] as Map<String, dynamic>),
|
||||
meta:
|
||||
json['meta'] == null
|
||||
? null
|
||||
: PaginationMeta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ApiResponseToJson<T>(
|
||||
ApiResponse<T> instance,
|
||||
Object? Function(T value) toJsonT,
|
||||
) => <String, dynamic>{
|
||||
'status': instance.status,
|
||||
'data': _$nullableGenericToJson(instance.data, toJsonT),
|
||||
'error': instance.error,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
T? _$nullableGenericFromJson<T>(
|
||||
Object? input,
|
||||
T Function(Object? json) fromJson,
|
||||
) => input == null ? null : fromJson(input);
|
||||
|
||||
Object? _$nullableGenericToJson<T>(
|
||||
T? input,
|
||||
Object? Function(T value) toJson,
|
||||
) => input == null ? null : toJson(input);
|
||||
|
||||
ApiError _$ApiErrorFromJson(Map<String, dynamic> json) => ApiError(
|
||||
code: json['code'] as String,
|
||||
message: json['message'] as String,
|
||||
details: json['details'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ApiErrorToJson(ApiError instance) => <String, dynamic>{
|
||||
'code': instance.code,
|
||||
'message': instance.message,
|
||||
'details': instance.details,
|
||||
};
|
||||
|
||||
PaginationMeta _$PaginationMetaFromJson(Map<String, dynamic> json) =>
|
||||
PaginationMeta(
|
||||
page: (json['page'] as num).toInt(),
|
||||
limit: (json['limit'] as num).toInt(),
|
||||
total: (json['total'] as num).toInt(),
|
||||
hasMore: json['hasMore'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PaginationMetaToJson(PaginationMeta instance) =>
|
||||
<String, dynamic>{
|
||||
'page': instance.page,
|
||||
'limit': instance.limit,
|
||||
'total': instance.total,
|
||||
'hasMore': instance.hasMore,
|
||||
};
|
||||
Reference in New Issue
Block a user