Files
superport/lib/data/models/common/pagination_params.freezed.dart
JiWoong Sul 162fe08618
Some checks failed
Flutter Test & Quality Check / Test on macos-latest (push) Has been cancelled
Flutter Test & Quality Check / Test on ubuntu-latest (push) Has been cancelled
Flutter Test & Quality Check / Build APK (push) Has been cancelled
refactor: Clean Architecture 적용 및 코드베이스 전면 리팩토링
## 주요 변경사항

### 아키텍처 개선
- Clean Architecture 패턴 적용 (Domain, Data, Presentation 레이어 분리)
- Use Case 패턴 도입으로 비즈니스 로직 캡슐화
- Repository 패턴으로 데이터 접근 추상화
- 의존성 주입 구조 개선

### 상태 관리 최적화
- 모든 Controller에서 불필요한 상태 관리 로직 제거
- 페이지네이션 로직 통일 및 간소화
- 에러 처리 로직 개선 (에러 메시지 한글화)
- 로딩 상태 관리 최적화

### Mock 서비스 제거
- MockDataService 완전 제거
- 모든 화면을 실제 API 전용으로 전환
- 불필요한 Mock 관련 코드 정리

### UI/UX 개선
- Overview 화면 대시보드 기능 강화
- 라이선스 만료 알림 위젯 추가
- 사이드바 네비게이션 개선
- 일관된 UI 컴포넌트 사용

### 코드 품질
- 중복 코드 제거 및 함수 추출
- 파일별 책임 분리 명확화
- 테스트 코드 업데이트

## 영향 범위
- 모든 화면의 Controller 리팩토링
- API 통신 레이어 구조 개선
- 에러 처리 및 로깅 시스템 개선

## 향후 계획
- 단위 테스트 커버리지 확대
- 통합 테스트 시나리오 추가
- 성능 모니터링 도구 통합
2025-08-11 00:04:28 +09:00

734 lines
23 KiB
Dart

// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'pagination_params.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
PaginationParams _$PaginationParamsFromJson(Map<String, dynamic> json) {
return _PaginationParams.fromJson(json);
}
/// @nodoc
mixin _$PaginationParams {
int get page => throw _privateConstructorUsedError;
int get perPage => throw _privateConstructorUsedError;
String? get search => throw _privateConstructorUsedError;
String? get sortBy => throw _privateConstructorUsedError;
String get sortOrder => throw _privateConstructorUsedError;
Map<String, dynamic>? get filters => throw _privateConstructorUsedError;
/// Serializes this PaginationParams to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of PaginationParams
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PaginationParamsCopyWith<PaginationParams> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PaginationParamsCopyWith<$Res> {
factory $PaginationParamsCopyWith(
PaginationParams value, $Res Function(PaginationParams) then) =
_$PaginationParamsCopyWithImpl<$Res, PaginationParams>;
@useResult
$Res call(
{int page,
int perPage,
String? search,
String? sortBy,
String sortOrder,
Map<String, dynamic>? filters});
}
/// @nodoc
class _$PaginationParamsCopyWithImpl<$Res, $Val extends PaginationParams>
implements $PaginationParamsCopyWith<$Res> {
_$PaginationParamsCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of PaginationParams
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? page = null,
Object? perPage = null,
Object? search = freezed,
Object? sortBy = freezed,
Object? sortOrder = null,
Object? filters = freezed,
}) {
return _then(_value.copyWith(
page: null == page
? _value.page
: page // ignore: cast_nullable_to_non_nullable
as int,
perPage: null == perPage
? _value.perPage
: perPage // ignore: cast_nullable_to_non_nullable
as int,
search: freezed == search
? _value.search
: search // ignore: cast_nullable_to_non_nullable
as String?,
sortBy: freezed == sortBy
? _value.sortBy
: sortBy // ignore: cast_nullable_to_non_nullable
as String?,
sortOrder: null == sortOrder
? _value.sortOrder
: sortOrder // ignore: cast_nullable_to_non_nullable
as String,
filters: freezed == filters
? _value.filters
: filters // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,
) as $Val);
}
}
/// @nodoc
abstract class _$$PaginationParamsImplCopyWith<$Res>
implements $PaginationParamsCopyWith<$Res> {
factory _$$PaginationParamsImplCopyWith(_$PaginationParamsImpl value,
$Res Function(_$PaginationParamsImpl) then) =
__$$PaginationParamsImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int page,
int perPage,
String? search,
String? sortBy,
String sortOrder,
Map<String, dynamic>? filters});
}
/// @nodoc
class __$$PaginationParamsImplCopyWithImpl<$Res>
extends _$PaginationParamsCopyWithImpl<$Res, _$PaginationParamsImpl>
implements _$$PaginationParamsImplCopyWith<$Res> {
__$$PaginationParamsImplCopyWithImpl(_$PaginationParamsImpl _value,
$Res Function(_$PaginationParamsImpl) _then)
: super(_value, _then);
/// Create a copy of PaginationParams
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? page = null,
Object? perPage = null,
Object? search = freezed,
Object? sortBy = freezed,
Object? sortOrder = null,
Object? filters = freezed,
}) {
return _then(_$PaginationParamsImpl(
page: null == page
? _value.page
: page // ignore: cast_nullable_to_non_nullable
as int,
perPage: null == perPage
? _value.perPage
: perPage // ignore: cast_nullable_to_non_nullable
as int,
search: freezed == search
? _value.search
: search // ignore: cast_nullable_to_non_nullable
as String?,
sortBy: freezed == sortBy
? _value.sortBy
: sortBy // ignore: cast_nullable_to_non_nullable
as String?,
sortOrder: null == sortOrder
? _value.sortOrder
: sortOrder // ignore: cast_nullable_to_non_nullable
as String,
filters: freezed == filters
? _value._filters
: filters // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$PaginationParamsImpl implements _PaginationParams {
const _$PaginationParamsImpl(
{this.page = 1,
this.perPage = AppConstants.defaultPageSize,
this.search,
this.sortBy,
this.sortOrder = 'asc',
final Map<String, dynamic>? filters})
: _filters = filters;
factory _$PaginationParamsImpl.fromJson(Map<String, dynamic> json) =>
_$$PaginationParamsImplFromJson(json);
@override
@JsonKey()
final int page;
@override
@JsonKey()
final int perPage;
@override
final String? search;
@override
final String? sortBy;
@override
@JsonKey()
final String sortOrder;
final Map<String, dynamic>? _filters;
@override
Map<String, dynamic>? get filters {
final value = _filters;
if (value == null) return null;
if (_filters is EqualUnmodifiableMapView) return _filters;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(value);
}
@override
String toString() {
return 'PaginationParams(page: $page, perPage: $perPage, search: $search, sortBy: $sortBy, sortOrder: $sortOrder, filters: $filters)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$PaginationParamsImpl &&
(identical(other.page, page) || other.page == page) &&
(identical(other.perPage, perPage) || other.perPage == perPage) &&
(identical(other.search, search) || other.search == search) &&
(identical(other.sortBy, sortBy) || other.sortBy == sortBy) &&
(identical(other.sortOrder, sortOrder) ||
other.sortOrder == sortOrder) &&
const DeepCollectionEquality().equals(other._filters, _filters));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, page, perPage, search, sortBy,
sortOrder, const DeepCollectionEquality().hash(_filters));
/// Create a copy of PaginationParams
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PaginationParamsImplCopyWith<_$PaginationParamsImpl> get copyWith =>
__$$PaginationParamsImplCopyWithImpl<_$PaginationParamsImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$PaginationParamsImplToJson(
this,
);
}
}
abstract class _PaginationParams implements PaginationParams {
const factory _PaginationParams(
{final int page,
final int perPage,
final String? search,
final String? sortBy,
final String sortOrder,
final Map<String, dynamic>? filters}) = _$PaginationParamsImpl;
factory _PaginationParams.fromJson(Map<String, dynamic> json) =
_$PaginationParamsImpl.fromJson;
@override
int get page;
@override
int get perPage;
@override
String? get search;
@override
String? get sortBy;
@override
String get sortOrder;
@override
Map<String, dynamic>? get filters;
/// Create a copy of PaginationParams
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PaginationParamsImplCopyWith<_$PaginationParamsImpl> get copyWith =>
throw _privateConstructorUsedError;
}
PaginationMeta _$PaginationMetaFromJson(Map<String, dynamic> json) {
return _PaginationMeta.fromJson(json);
}
/// @nodoc
mixin _$PaginationMeta {
int get currentPage => throw _privateConstructorUsedError;
int get perPage => throw _privateConstructorUsedError;
int get total => throw _privateConstructorUsedError;
int get totalPages => throw _privateConstructorUsedError;
bool get hasNext => throw _privateConstructorUsedError;
bool get hasPrevious => throw _privateConstructorUsedError;
/// Serializes this PaginationMeta to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of PaginationMeta
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PaginationMetaCopyWith<PaginationMeta> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PaginationMetaCopyWith<$Res> {
factory $PaginationMetaCopyWith(
PaginationMeta value, $Res Function(PaginationMeta) then) =
_$PaginationMetaCopyWithImpl<$Res, PaginationMeta>;
@useResult
$Res call(
{int currentPage,
int perPage,
int total,
int totalPages,
bool hasNext,
bool hasPrevious});
}
/// @nodoc
class _$PaginationMetaCopyWithImpl<$Res, $Val extends PaginationMeta>
implements $PaginationMetaCopyWith<$Res> {
_$PaginationMetaCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of PaginationMeta
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? currentPage = null,
Object? perPage = null,
Object? total = null,
Object? totalPages = null,
Object? hasNext = null,
Object? hasPrevious = null,
}) {
return _then(_value.copyWith(
currentPage: null == currentPage
? _value.currentPage
: currentPage // ignore: cast_nullable_to_non_nullable
as int,
perPage: null == perPage
? _value.perPage
: perPage // ignore: cast_nullable_to_non_nullable
as int,
total: null == total
? _value.total
: total // ignore: cast_nullable_to_non_nullable
as int,
totalPages: null == totalPages
? _value.totalPages
: totalPages // ignore: cast_nullable_to_non_nullable
as int,
hasNext: null == hasNext
? _value.hasNext
: hasNext // ignore: cast_nullable_to_non_nullable
as bool,
hasPrevious: null == hasPrevious
? _value.hasPrevious
: hasPrevious // ignore: cast_nullable_to_non_nullable
as bool,
) as $Val);
}
}
/// @nodoc
abstract class _$$PaginationMetaImplCopyWith<$Res>
implements $PaginationMetaCopyWith<$Res> {
factory _$$PaginationMetaImplCopyWith(_$PaginationMetaImpl value,
$Res Function(_$PaginationMetaImpl) then) =
__$$PaginationMetaImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int currentPage,
int perPage,
int total,
int totalPages,
bool hasNext,
bool hasPrevious});
}
/// @nodoc
class __$$PaginationMetaImplCopyWithImpl<$Res>
extends _$PaginationMetaCopyWithImpl<$Res, _$PaginationMetaImpl>
implements _$$PaginationMetaImplCopyWith<$Res> {
__$$PaginationMetaImplCopyWithImpl(
_$PaginationMetaImpl _value, $Res Function(_$PaginationMetaImpl) _then)
: super(_value, _then);
/// Create a copy of PaginationMeta
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? currentPage = null,
Object? perPage = null,
Object? total = null,
Object? totalPages = null,
Object? hasNext = null,
Object? hasPrevious = null,
}) {
return _then(_$PaginationMetaImpl(
currentPage: null == currentPage
? _value.currentPage
: currentPage // ignore: cast_nullable_to_non_nullable
as int,
perPage: null == perPage
? _value.perPage
: perPage // ignore: cast_nullable_to_non_nullable
as int,
total: null == total
? _value.total
: total // ignore: cast_nullable_to_non_nullable
as int,
totalPages: null == totalPages
? _value.totalPages
: totalPages // ignore: cast_nullable_to_non_nullable
as int,
hasNext: null == hasNext
? _value.hasNext
: hasNext // ignore: cast_nullable_to_non_nullable
as bool,
hasPrevious: null == hasPrevious
? _value.hasPrevious
: hasPrevious // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
@JsonSerializable()
class _$PaginationMetaImpl implements _PaginationMeta {
const _$PaginationMetaImpl(
{required this.currentPage,
required this.perPage,
required this.total,
required this.totalPages,
required this.hasNext,
required this.hasPrevious});
factory _$PaginationMetaImpl.fromJson(Map<String, dynamic> json) =>
_$$PaginationMetaImplFromJson(json);
@override
final int currentPage;
@override
final int perPage;
@override
final int total;
@override
final int totalPages;
@override
final bool hasNext;
@override
final bool hasPrevious;
@override
String toString() {
return 'PaginationMeta(currentPage: $currentPage, perPage: $perPage, total: $total, totalPages: $totalPages, hasNext: $hasNext, hasPrevious: $hasPrevious)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$PaginationMetaImpl &&
(identical(other.currentPage, currentPage) ||
other.currentPage == currentPage) &&
(identical(other.perPage, perPage) || other.perPage == perPage) &&
(identical(other.total, total) || other.total == total) &&
(identical(other.totalPages, totalPages) ||
other.totalPages == totalPages) &&
(identical(other.hasNext, hasNext) || other.hasNext == hasNext) &&
(identical(other.hasPrevious, hasPrevious) ||
other.hasPrevious == hasPrevious));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, currentPage, perPage, total,
totalPages, hasNext, hasPrevious);
/// Create a copy of PaginationMeta
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PaginationMetaImplCopyWith<_$PaginationMetaImpl> get copyWith =>
__$$PaginationMetaImplCopyWithImpl<_$PaginationMetaImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$PaginationMetaImplToJson(
this,
);
}
}
abstract class _PaginationMeta implements PaginationMeta {
const factory _PaginationMeta(
{required final int currentPage,
required final int perPage,
required final int total,
required final int totalPages,
required final bool hasNext,
required final bool hasPrevious}) = _$PaginationMetaImpl;
factory _PaginationMeta.fromJson(Map<String, dynamic> json) =
_$PaginationMetaImpl.fromJson;
@override
int get currentPage;
@override
int get perPage;
@override
int get total;
@override
int get totalPages;
@override
bool get hasNext;
@override
bool get hasPrevious;
/// Create a copy of PaginationMeta
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PaginationMetaImplCopyWith<_$PaginationMetaImpl> get copyWith =>
throw _privateConstructorUsedError;
}
PagedResult<T> _$PagedResultFromJson<T>(
Map<String, dynamic> json, T Function(Object?) fromJsonT) {
return _PagedResult<T>.fromJson(json, fromJsonT);
}
/// @nodoc
mixin _$PagedResult<T> {
List<T> get items => throw _privateConstructorUsedError;
PaginationMeta get meta => throw _privateConstructorUsedError;
/// Serializes this PagedResult to a JSON map.
Map<String, dynamic> toJson(Object? Function(T) toJsonT) =>
throw _privateConstructorUsedError;
/// Create a copy of PagedResult
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PagedResultCopyWith<T, PagedResult<T>> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PagedResultCopyWith<T, $Res> {
factory $PagedResultCopyWith(
PagedResult<T> value, $Res Function(PagedResult<T>) then) =
_$PagedResultCopyWithImpl<T, $Res, PagedResult<T>>;
@useResult
$Res call({List<T> items, PaginationMeta meta});
$PaginationMetaCopyWith<$Res> get meta;
}
/// @nodoc
class _$PagedResultCopyWithImpl<T, $Res, $Val extends PagedResult<T>>
implements $PagedResultCopyWith<T, $Res> {
_$PagedResultCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of PagedResult
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? items = null,
Object? meta = null,
}) {
return _then(_value.copyWith(
items: null == items
? _value.items
: items // ignore: cast_nullable_to_non_nullable
as List<T>,
meta: null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as PaginationMeta,
) as $Val);
}
/// Create a copy of PagedResult
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$PaginationMetaCopyWith<$Res> get meta {
return $PaginationMetaCopyWith<$Res>(_value.meta, (value) {
return _then(_value.copyWith(meta: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$PagedResultImplCopyWith<T, $Res>
implements $PagedResultCopyWith<T, $Res> {
factory _$$PagedResultImplCopyWith(_$PagedResultImpl<T> value,
$Res Function(_$PagedResultImpl<T>) then) =
__$$PagedResultImplCopyWithImpl<T, $Res>;
@override
@useResult
$Res call({List<T> items, PaginationMeta meta});
@override
$PaginationMetaCopyWith<$Res> get meta;
}
/// @nodoc
class __$$PagedResultImplCopyWithImpl<T, $Res>
extends _$PagedResultCopyWithImpl<T, $Res, _$PagedResultImpl<T>>
implements _$$PagedResultImplCopyWith<T, $Res> {
__$$PagedResultImplCopyWithImpl(
_$PagedResultImpl<T> _value, $Res Function(_$PagedResultImpl<T>) _then)
: super(_value, _then);
/// Create a copy of PagedResult
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? items = null,
Object? meta = null,
}) {
return _then(_$PagedResultImpl<T>(
items: null == items
? _value._items
: items // ignore: cast_nullable_to_non_nullable
as List<T>,
meta: null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as PaginationMeta,
));
}
}
/// @nodoc
@JsonSerializable(genericArgumentFactories: true)
class _$PagedResultImpl<T> implements _PagedResult<T> {
const _$PagedResultImpl({required final List<T> items, required this.meta})
: _items = items;
factory _$PagedResultImpl.fromJson(
Map<String, dynamic> json, T Function(Object?) fromJsonT) =>
_$$PagedResultImplFromJson(json, fromJsonT);
final List<T> _items;
@override
List<T> get items {
if (_items is EqualUnmodifiableListView) return _items;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_items);
}
@override
final PaginationMeta meta;
@override
String toString() {
return 'PagedResult<$T>(items: $items, meta: $meta)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$PagedResultImpl<T> &&
const DeepCollectionEquality().equals(other._items, _items) &&
(identical(other.meta, meta) || other.meta == meta));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_items), meta);
/// Create a copy of PagedResult
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PagedResultImplCopyWith<T, _$PagedResultImpl<T>> get copyWith =>
__$$PagedResultImplCopyWithImpl<T, _$PagedResultImpl<T>>(
this, _$identity);
@override
Map<String, dynamic> toJson(Object? Function(T) toJsonT) {
return _$$PagedResultImplToJson<T>(this, toJsonT);
}
}
abstract class _PagedResult<T> implements PagedResult<T> {
const factory _PagedResult(
{required final List<T> items,
required final PaginationMeta meta}) = _$PagedResultImpl<T>;
factory _PagedResult.fromJson(
Map<String, dynamic> json, T Function(Object?) fromJsonT) =
_$PagedResultImpl<T>.fromJson;
@override
List<T> get items;
@override
PaginationMeta get meta;
/// Create a copy of PagedResult
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PagedResultImplCopyWith<T, _$PagedResultImpl<T>> get copyWith =>
throw _privateConstructorUsedError;
}