Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ feat ] 홈, 후원처, 상세페이지 레이아웃 마무리 + 변경된 api 연결( pagination 적용 완료) #38

Merged
merged 17 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions android/app/src/main/kotlin/com/dev/match/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.dev.match

import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.android.FlutterFragmentActivity

class MainActivity: FlutterFragmentActivity() { //FlutterActivity
class MainActivity: FlutterActivity() { //FlutterActivity
}
4 changes: 4 additions & 0 deletions asset/image/iv_tmp_empty.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions lib/model/api/pagination.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
///* Pagination 처리에 사용되는 변수 data class
class Pagination {
bool isLast;
int totalCnt;
int currentpage;

Pagination(
{required this.isLast, required this.totalCnt, this.currentpage = 0});
}
18 changes: 18 additions & 0 deletions lib/model/banner/banners.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

part 'banners.freezed.dart';
part 'banners.g.dart';

@freezed
class Banners with _$Banners {
const factory Banners({
required int bannerId,
required String bannerType,
required String bannerImg,
int? eventId,
required String contentsUrl,
}) = _Banners;
factory Banners.fromJson(Map<String, dynamic> json) =>
_$BannersFromJson(json);
}
248 changes: 248 additions & 0 deletions lib/model/banner/banners.freezed.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
// 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 'banners.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#custom-getters-and-methods');

Banners _$BannersFromJson(Map<String, dynamic> json) {
return _Banners.fromJson(json);
}

/// @nodoc
mixin _$Banners {
int get bannerId => throw _privateConstructorUsedError;
String get bannerType => throw _privateConstructorUsedError;
String get bannerImg => throw _privateConstructorUsedError;
int? get eventId => throw _privateConstructorUsedError;
String get contentsUrl => throw _privateConstructorUsedError;

Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$BannersCopyWith<Banners> get copyWith => throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $BannersCopyWith<$Res> {
factory $BannersCopyWith(Banners value, $Res Function(Banners) then) =
_$BannersCopyWithImpl<$Res, Banners>;
@useResult
$Res call(
{int bannerId,
String bannerType,
String bannerImg,
int? eventId,
String contentsUrl});
}

/// @nodoc
class _$BannersCopyWithImpl<$Res, $Val extends Banners>
implements $BannersCopyWith<$Res> {
_$BannersCopyWithImpl(this._value, this._then);

// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;

@pragma('vm:prefer-inline')
@override
$Res call({
Object? bannerId = null,
Object? bannerType = null,
Object? bannerImg = null,
Object? eventId = freezed,
Object? contentsUrl = null,
}) {
return _then(_value.copyWith(
bannerId: null == bannerId
? _value.bannerId
: bannerId // ignore: cast_nullable_to_non_nullable
as int,
bannerType: null == bannerType
? _value.bannerType
: bannerType // ignore: cast_nullable_to_non_nullable
as String,
bannerImg: null == bannerImg
? _value.bannerImg
: bannerImg // ignore: cast_nullable_to_non_nullable
as String,
eventId: freezed == eventId
? _value.eventId
: eventId // ignore: cast_nullable_to_non_nullable
as int?,
contentsUrl: null == contentsUrl
? _value.contentsUrl
: contentsUrl // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
}
}

/// @nodoc
abstract class _$$BannersImplCopyWith<$Res> implements $BannersCopyWith<$Res> {
factory _$$BannersImplCopyWith(
_$BannersImpl value, $Res Function(_$BannersImpl) then) =
__$$BannersImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int bannerId,
String bannerType,
String bannerImg,
int? eventId,
String contentsUrl});
}

/// @nodoc
class __$$BannersImplCopyWithImpl<$Res>
extends _$BannersCopyWithImpl<$Res, _$BannersImpl>
implements _$$BannersImplCopyWith<$Res> {
__$$BannersImplCopyWithImpl(
_$BannersImpl _value, $Res Function(_$BannersImpl) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
@override
$Res call({
Object? bannerId = null,
Object? bannerType = null,
Object? bannerImg = null,
Object? eventId = freezed,
Object? contentsUrl = null,
}) {
return _then(_$BannersImpl(
bannerId: null == bannerId
? _value.bannerId
: bannerId // ignore: cast_nullable_to_non_nullable
as int,
bannerType: null == bannerType
? _value.bannerType
: bannerType // ignore: cast_nullable_to_non_nullable
as String,
bannerImg: null == bannerImg
? _value.bannerImg
: bannerImg // ignore: cast_nullable_to_non_nullable
as String,
eventId: freezed == eventId
? _value.eventId
: eventId // ignore: cast_nullable_to_non_nullable
as int?,
contentsUrl: null == contentsUrl
? _value.contentsUrl
: contentsUrl // ignore: cast_nullable_to_non_nullable
as String,
));
}
}

/// @nodoc
@JsonSerializable()
class _$BannersImpl with DiagnosticableTreeMixin implements _Banners {
const _$BannersImpl(
{required this.bannerId,
required this.bannerType,
required this.bannerImg,
this.eventId,
required this.contentsUrl});

factory _$BannersImpl.fromJson(Map<String, dynamic> json) =>
_$$BannersImplFromJson(json);

@override
final int bannerId;
@override
final String bannerType;
@override
final String bannerImg;
@override
final int? eventId;
@override
final String contentsUrl;

@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'Banners(bannerId: $bannerId, bannerType: $bannerType, bannerImg: $bannerImg, eventId: $eventId, contentsUrl: $contentsUrl)';
}

@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties
..add(DiagnosticsProperty('type', 'Banners'))
..add(DiagnosticsProperty('bannerId', bannerId))
..add(DiagnosticsProperty('bannerType', bannerType))
..add(DiagnosticsProperty('bannerImg', bannerImg))
..add(DiagnosticsProperty('eventId', eventId))
..add(DiagnosticsProperty('contentsUrl', contentsUrl));
}

@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$BannersImpl &&
(identical(other.bannerId, bannerId) ||
other.bannerId == bannerId) &&
(identical(other.bannerType, bannerType) ||
other.bannerType == bannerType) &&
(identical(other.bannerImg, bannerImg) ||
other.bannerImg == bannerImg) &&
(identical(other.eventId, eventId) || other.eventId == eventId) &&
(identical(other.contentsUrl, contentsUrl) ||
other.contentsUrl == contentsUrl));
}

@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType, bannerId, bannerType, bannerImg, eventId, contentsUrl);

@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$BannersImplCopyWith<_$BannersImpl> get copyWith =>
__$$BannersImplCopyWithImpl<_$BannersImpl>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$BannersImplToJson(
this,
);
}
}

abstract class _Banners implements Banners {
const factory _Banners(
{required final int bannerId,
required final String bannerType,
required final String bannerImg,
final int? eventId,
required final String contentsUrl}) = _$BannersImpl;

factory _Banners.fromJson(Map<String, dynamic> json) = _$BannersImpl.fromJson;

@override
int get bannerId;
@override
String get bannerType;
@override
String get bannerImg;
@override
int? get eventId;
@override
String get contentsUrl;
@override
@JsonKey(ignore: true)
_$$BannersImplCopyWith<_$BannersImpl> get copyWith =>
throw _privateConstructorUsedError;
}
25 changes: 25 additions & 0 deletions lib/model/banner/banners.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions lib/model/enum/banner_type.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
enum BannerType {
CONTENTS,
EVENT;

const BannerType();
}

Map<String, BannerType> BannerTypeMap = {
'CONTENTS': BannerType.CONTENTS,
'EVENT': BannerType.EVENT,
};
57 changes: 29 additions & 28 deletions lib/model/enum/project_type.dart
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
enum ProjectType {
CHILDREN("어린이", "children"),
YOUTH("청년", "youth"),
WOMEN("여성", "women"),
ELDER("어르신", "elder"),
DISABLED("장애인", "disabled"),
SOCIAL("우리 사회", "social"),
EARTH("지구촌", "earth"),
NEIGHBOR("어려운 이웃", "neighbor"),
ANIMAL("동물", "animal"),
ENVIRONMENT("환경", "environment");

final String stateName;
final String engName;
const ProjectType(this.stateName, this.engName);
}

Map<String, ProjectType> projectTypeMap = {
'CHILDREN': ProjectType.CHILDREN,
'YOUTH': ProjectType.YOUTH,
'WOMEN': ProjectType.WOMEN,
'DISABLED': ProjectType.DISABLED,
'SOCIAL': ProjectType.SOCIAL,
'EARTH': ProjectType.EARTH,
'NEIGHBOR': ProjectType.NEIGHBOR,
'ANIMAL': ProjectType.ANIMAL,
'ENVIRONMENT': ProjectType.ENVIRONMENT,
};
enum ProjectType {
CHILDREN("어린이", "children"),
YOUTH("청년", "youth"),
WOMEN("여성", "women"),
ELDER("어르신", "elder"),
DISABLED("장애인", "disabled"),
SOCIAL("우리 사회", "social"),
EARTH("지구촌", "earth"),
NEIGHBOR("어려운 이웃", "neighbor"),
ANIMAL("동물", "animal"),
ENVIRONMENT("환경", "environment");

final String stateName;
final String engName;
const ProjectType(this.stateName, this.engName);
}

Map<String, ProjectType> projectTypeMap = {
'CHILDREN': ProjectType.CHILDREN,
'YOUTH': ProjectType.YOUTH,
'WOMEN': ProjectType.WOMEN,
'ELDER': ProjectType.ELDER,
'DISABLED': ProjectType.DISABLED,
'SOCIAL': ProjectType.SOCIAL,
'EARTH': ProjectType.EARTH,
'NEIGHBOR': ProjectType.NEIGHBOR,
'ANIMAL': ProjectType.ANIMAL,
'ENVIRONMENT': ProjectType.ENVIRONMENT,
};
Loading