Skip to content

Commit

Permalink
🔀 :: 3.4.0 배포
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoochanhong authored Apr 23, 2024
2 parents b6b58e6 + 2049821 commit d51c1b2
Show file tree
Hide file tree
Showing 70 changed files with 997 additions and 354 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ if (flutterRoot == null) {

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '21'
flutterVersionCode = '22'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '3.3.7'
flutterVersionName = '3.4.0'
}

def keystoreProperties = new Properties()
Expand Down
Binary file modified assets/fonts/Lotura.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 3765b805c03121794c6d132546df9366f592bc4d

COCOAPODS: 1.13.0
COCOAPODS: 1.15.2
6 changes: 3 additions & 3 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.3.7;
MARKETING_VERSION = 3.4.0;
PRODUCT_BUNDLE_IDENTIFIER = com.osj.lotura;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down Expand Up @@ -516,7 +516,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.3.7;
MARKETING_VERSION = 3.4.0;
PRODUCT_BUNDLE_IDENTIFIER = com.osj.lotura;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down Expand Up @@ -546,7 +546,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.3.7;
MARKETING_VERSION = 3.4.0;
PRODUCT_BUNDLE_IDENTIFIER = com.osj.lotura;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import 'dart:convert';

import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:http/http.dart' as http;
import 'package:lotura/data/dto/request/apply_cancel_request.dart';
import 'package:lotura/data/dto/request/send_fcm_info_request.dart';
import 'package:lotura/data/dto/response/apply_response.dart';
import 'package:lotura/domain/entity/apply_entity.dart';
import 'package:lotura/data/apply/dto/request/apply_cancel_request.dart';
import 'package:lotura/data/apply/dto/request/send_fcm_info_request.dart';
import 'package:lotura/data/apply/dto/response/apply_response.dart';
import 'package:lotura/domain/apply/entity/apply_entity.dart';
import 'package:lotura/secret.dart';

class RemoteApplyDataSource {
Expand All @@ -26,20 +26,19 @@ class RemoteApplyDataSource {
{required SendFCMInfoRequest sendFCMInfoRequest}) async {
sendFCMInfoRequest.token = await _getToken();
final response = await http.post(Uri.parse("$baseurl/push_request"),
body: sendFCMInfoRequest.toJson());
headers: {"Content-Type": "application/json"},
body: json.encode(sendFCMInfoRequest.toJson()));
if (response.statusCode != 200 && response.statusCode != 304) {
throw Exception(response.body);
}
}

Future<List<ApplyEntity>> applyCancel(
Future<void> applyCancel(
{required ApplyCancelRequest applyCancelRequest}) async {
applyCancelRequest.token = await _getToken();
final response = await http.post(Uri.parse("$baseurl/push_cancel"),
body: applyCancelRequest.toJson());
headers: {"Content-Type": "application/json"},
body: json.encode(applyCancelRequest.toJson()));
if (response.statusCode != 200) throw Exception(response.body);
return (jsonDecode(response.body) as List<dynamic>)
.map((i) => ApplyResponse.fromJson(i).toEntity())
.toList();
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class ApplyCancelRequest {
String? token;
String deviceId;
int deviceId;

ApplyCancelRequest({this.token, required this.deviceId});

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class SendFCMInfoRequest {
String? token;
String deviceId;
String expectState;
int deviceId;
int expectState;

SendFCMInfoRequest(
{this.token, required this.deviceId, required this.expectState});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:lotura/domain/entity/apply_entity.dart';
import 'package:lotura/domain/apply/entity/apply_entity.dart';
import 'package:lotura/main.dart';

class ApplyResponse {
final int deviceId;
Expand All @@ -13,6 +14,7 @@ class ApplyResponse {
);
}

ApplyEntity toEntity() =>
ApplyEntity(deviceId: deviceId, deviceType: deviceType);
ApplyEntity toEntity() => ApplyEntity(
deviceId: deviceId,
deviceType: deviceType == "WASH" ? DeviceType.wash : DeviceType.dry);
}
28 changes: 28 additions & 0 deletions lib/data/apply/repository/apply_repository_impl.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import 'dart:async';

import 'package:lotura/data/apply/data_source/remote/remote_apply_data_source.dart';
import 'package:lotura/data/apply/dto/request/apply_cancel_request.dart';
import 'package:lotura/data/apply/dto/request/send_fcm_info_request.dart';
import 'package:lotura/domain/apply/entity/apply_entity.dart';
import 'package:lotura/domain/apply/repository/apply_repository.dart';

class ApplyRepositoryImpl implements ApplyRepository {
final RemoteApplyDataSource _remoteApplyDataSource;

ApplyRepositoryImpl({required RemoteApplyDataSource remoteApplyDataSource})
: _remoteApplyDataSource = remoteApplyDataSource;

@override
Future<List<ApplyEntity>> getApplyList() =>
_remoteApplyDataSource.getApplyList();

@override
Future<void> sendFCMInfo({required SendFCMInfoRequest sendFCMInfoRequest}) =>
_remoteApplyDataSource.sendFCMInfo(
sendFCMInfoRequest: sendFCMInfoRequest);

@override
Future<void> applyCancel({required ApplyCancelRequest applyCancelRequest}) =>
_remoteApplyDataSource.applyCancel(
applyCancelRequest: applyCancelRequest);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'dart:async';
import 'dart:convert';

import 'package:http/http.dart' as http;
import 'package:lotura/data/dto/response/laundry_response.dart';
import 'package:lotura/domain/entity/laundry_entity.dart';
import 'package:lotura/data/laundry/dto/response/laundry_response.dart';
import 'package:lotura/domain/laundry/entity/laundry_entity.dart';
import 'package:lotura/secret.dart';
import 'package:web_socket_channel/web_socket_channel.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import 'package:lotura/domain/entity/laundry_entity.dart';
import 'package:lotura/domain/laundry/entity/laundry_entity.dart';
import 'package:lotura/main.dart';

class LaundryResponse {
final int id;
final int state;
final String deviceType;

LaundryResponse(
{required this.id, required this.state, required this.deviceType});
const LaundryResponse({
required this.id,
required this.state,
required this.deviceType,
});

factory LaundryResponse.fromJson(Map<String, dynamic> json) {
return LaundryResponse(
Expand All @@ -19,8 +23,8 @@ class LaundryResponse {
LaundryEntity toEntity() {
return LaundryEntity(
id: id,
state: state,
deviceType: deviceType,
state: CurrentState.values.elementAt(state),
deviceType: deviceType == "WASH" ? DeviceType.wash : DeviceType.dry,
);
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'dart:async';

import 'package:lotura/data/data_source/laundry/local/local_laundry_data_source.dart';
import 'package:lotura/data/data_source/laundry/remote/remote_laundry_data_source.dart';
import 'package:lotura/domain/entity/laundry_entity.dart';
import 'package:lotura/domain/repository/laundry_repository.dart';
import 'package:lotura/data/laundry/data_source/local/local_laundry_data_source.dart';
import 'package:lotura/data/laundry/data_source/remote/remote_laundry_data_source.dart';
import 'package:lotura/domain/laundry/entity/laundry_entity.dart';
import 'package:lotura/domain/laundry/repository/laundry_repository.dart';

class LaundryRepositoryImpl implements LaundryRepository {
final LocalLaundryDataSource _localLaundryDataSource;
Expand Down
12 changes: 12 additions & 0 deletions lib/data/notice/data_source/local/local_notice_data_source.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'package:hive/hive.dart';

class LocalNoticeDataSource {
final Box<int> _box;

const LocalNoticeDataSource({required Box<int> box}) : _box = box;

Future<void> setValue({required String key, required int value}) =>
_box.put(key, value);

int? getValue({required String key}) => _box.get(key);
}
19 changes: 19 additions & 0 deletions lib/data/notice/data_source/remote/remote_notice_data_source.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'dart:async';
import 'dart:convert';

import 'package:http/http.dart' as http;
import 'package:lotura/data/notice/dto/response/notice_response.dart';
import 'package:lotura/domain/notice/entity/notice_entity.dart';
import 'package:lotura/secret.dart';

class RemoteNoticeDataSource {
Future<List<NoticeEntity>> getNotice() async {
final response = await http.get(Uri.parse("$baseurl/notice"));
if (response.statusCode != 200) {
throw Exception(response.body);
}
return (jsonDecode(utf8.decode(response.bodyBytes)) as List<dynamic>)
.map((i) => NoticeResponse.fromJson(i).toEntity())
.toList();
}
}
33 changes: 33 additions & 0 deletions lib/data/notice/dto/response/notice_response.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import 'package:lotura/domain/notice/entity/notice_entity.dart';

class NoticeResponse {
final int id;
final String title;
final String contents;
final String date;

NoticeResponse({
required this.id,
required this.title,
required this.contents,
required this.date,
});

factory NoticeResponse.fromJson(Map<String, dynamic> json) {
return NoticeResponse(
id: json['id'],
title: json['title'],
contents: json['contents'],
date: json['date'],
);
}

NoticeEntity toEntity() {
return NoticeEntity(
noticeId: id,
title: title,
contents: contents,
date: date,
);
}
}
26 changes: 26 additions & 0 deletions lib/data/notice/repository/notice_repository_impl.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import 'package:lotura/data/notice/data_source/local/local_notice_data_source.dart';
import 'package:lotura/data/notice/data_source/remote/remote_notice_data_source.dart';
import 'package:lotura/domain/notice/entity/notice_entity.dart';
import 'package:lotura/domain/notice/repository/notice_repository.dart';

class NoticeRepositoryImpl implements NoticeRepository {
final RemoteNoticeDataSource _remoteNoticeDataSource;
final LocalNoticeDataSource _localNoticeDataSource;

const NoticeRepositoryImpl({
required RemoteNoticeDataSource remoteNoticeDataSource,
required LocalNoticeDataSource localNoticeDataSource,
}) : _remoteNoticeDataSource = remoteNoticeDataSource,
_localNoticeDataSource = localNoticeDataSource;

@override
Future<List<NoticeEntity>> getNotice() => _remoteNoticeDataSource.getNotice();

@override
int? getLastNoticeId({required String key}) =>
_localNoticeDataSource.getValue(key: key);

@override
Future<void> setLastNoticeId({required String key, required int value}) =>
_localNoticeDataSource.setValue(key: key, value: value);
}
30 changes: 0 additions & 30 deletions lib/data/repository/apply_repository_impl.dart

This file was deleted.

Loading

0 comments on commit d51c1b2

Please sign in to comment.