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

🔀 :: 3.7.1 배포 #259

Merged
merged 13 commits into from
May 30, 2024
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
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 = '26'
flutterVersionCode = '27'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '3.7.0'
flutterVersionName = '3.7.1'
}

def keystoreProperties = new Properties()
Expand Down
12 changes: 6 additions & 6 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 22;
CURRENT_PROJECT_VERSION = 23;
DEVELOPMENT_TEAM = Z25H7B85Z8;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
Expand All @@ -376,7 +376,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.7.0;
MARKETING_VERSION = 3.7.1;
PRODUCT_BUNDLE_IDENTIFIER = com.osj.lotura;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down Expand Up @@ -507,7 +507,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 22;
CURRENT_PROJECT_VERSION = 23;
DEVELOPMENT_TEAM = Z25H7B85Z8;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
Expand All @@ -516,7 +516,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.7.0;
MARKETING_VERSION = 3.7.1;
PRODUCT_BUNDLE_IDENTIFIER = com.osj.lotura;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand All @@ -537,7 +537,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 22;
CURRENT_PROJECT_VERSION = 23;
DEVELOPMENT_TEAM = Z25H7B85Z8;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
Expand All @@ -546,7 +546,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.7.0;
MARKETING_VERSION = 3.7.1;
PRODUCT_BUNDLE_IDENTIFIER = com.osj.lotura;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down
31 changes: 31 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ enum CurrentState {
deviceIconColor: LoturaColors.red400,
text: "고장");

bool get isWorking => this == CurrentState.working;
bool get isNotWorking => this != CurrentState.working;

bool get isAvailable => this == CurrentState.available;

bool get isDisconnected => this == CurrentState.disconnected;

bool get isBreakdown => this == CurrentState.breakdown;

final IconData icon;
final Color color, deepColor, deviceIconColor;
final String text;
Expand Down Expand Up @@ -115,6 +124,12 @@ enum DeviceType {
imagePath: "",
);

bool get isWash => this == DeviceType.wash;

bool get isDry => this == DeviceType.dry;

bool get isEmpty => this == DeviceType.empty;

final String text, imagePath;
final IconData icon;

Expand All @@ -129,6 +144,10 @@ enum Gender {
boy(text: "남자 세탁실"),
girl(text: "여자 세탁실");

bool get isBoy => this == Gender.boy;

bool get isGirl => this == Gender.girl;

const Gender({required this.text});

final String text;
Expand All @@ -139,6 +158,14 @@ enum RoomLocation {
dormitorySide(roomName: "남자 기숙사측 세탁실"),
schoolGirlSide(roomName: "여자 기숙사측 세탁실");

bool get isSchoolSide => this == RoomLocation.schoolSide;

bool get isDormitorySide => this == RoomLocation.dormitorySide;

bool get isSchoolGirlSide => this == RoomLocation.schoolGirlSide;

bool get isNotSchoolGirlSide => this != RoomLocation.schoolGirlSide;

const RoomLocation({required this.roomName});

final String roomName;
Expand All @@ -148,6 +175,10 @@ enum LaundryRoomLayer {
first(icon: Icons.looks_one_outlined),
second(icon: Icons.looks_two_outlined);

bool get isFirst => this == LaundryRoomLayer.first;

bool get isSecond => this == LaundryRoomLayer.second;

const LaundryRoomLayer({required this.icon});

final IconData icon;
Expand Down
5 changes: 2 additions & 3 deletions lib/presentation/apply_page/ui/widget/machine_card.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart' as s;
import 'package:lotura/main.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:lotura/presentation/utils/machine_widget.dart';

class MachineCard extends MachineWidget {
Expand All @@ -14,7 +13,7 @@ class MachineCard extends MachineWidget {

@override
Widget build(BuildContext context) {
return deviceType == DeviceType.empty
return deviceType.isEmpty
? Container(
width: 170.0.r,
padding: EdgeInsets.only(top: 10.0.r),
Expand Down
35 changes: 16 additions & 19 deletions lib/presentation/laundry_room_page/ui/view/laundry_room_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ class LaundryRoomPage extends StatelessWidget {
SingleChildScrollView(
scrollDirection: Axis.horizontal,
padding: EdgeInsets.symmetric(vertical: 12.0.h),
child: roomBlocState.data.roomLocation !=
RoomLocation.schoolGirlSide
child: roomBlocState.data.roomLocation.isNotSchoolGirlSide
? Row(
children: [
OSJTextButton(
Expand All @@ -137,12 +136,12 @@ class LaundryRoomPage extends StatelessWidget {
roomLocation:
RoomLocation.schoolSide)),
fontSize: 18.0.sp,
color: roomBlocState.value.roomLocation ==
RoomLocation.schoolSide
color: roomBlocState
.value.roomLocation.isSchoolSide
? LoturaColors.white
: LoturaColors.gray100,
fontColor: roomBlocState.value.roomLocation ==
RoomLocation.schoolSide
fontColor: roomBlocState
.value.roomLocation.isSchoolSide
? LoturaColors.primary700
: LoturaColors.gray300,
text: "남자 학교측",
Expand All @@ -157,12 +156,12 @@ class LaundryRoomPage extends StatelessWidget {
roomLocation:
RoomLocation.dormitorySide)),
fontSize: 18.0.sp,
color: roomBlocState.value.roomLocation ==
RoomLocation.dormitorySide
color: roomBlocState
.value.roomLocation.isDormitorySide
? LoturaColors.white
: LoturaColors.gray100,
fontColor: roomBlocState.value.roomLocation ==
RoomLocation.dormitorySide
fontColor: roomBlocState
.value.roomLocation.isDormitorySide
? LoturaColors.primary700
: LoturaColors.gray300,
text: "남자 기숙사측",
Expand Down Expand Up @@ -199,8 +198,8 @@ class LaundryRoomPage extends StatelessWidget {
const Center(child: CircularProgressIndicator()),
Error() =>
const Center(child: Text("인터넷 연결을 확인해주세요")),
Loaded() => roomBlocState.data.roomLocation !=
RoomLocation.schoolGirlSide
Loaded() => roomBlocState
.data.roomLocation.isNotSchoolGirlSide
? LaundryList(
list: state.data.laundryList,
laundryRoomModel: roomBlocState.value,
Expand Down Expand Up @@ -244,13 +243,13 @@ class LaundryRoomLayerFilter extends StatelessWidget {
"1층",
style: TextStyle(
fontSize: 18.0.sp,
color: laundryRoomLayer == LaundryRoomLayer.first
color: laundryRoomLayer.isFirst
? LoturaColors.black
: LoturaColors.gray300,
),
),
),
if (currentRoomLocation != RoomLocation.schoolGirlSide)
if (currentRoomLocation.isNotSchoolGirlSide)
TextButton(
onPressed: () => context.read<RoomBloc>().add(
ModifyLaundryRoomLayerEvent(
Expand All @@ -259,7 +258,7 @@ class LaundryRoomLayerFilter extends StatelessWidget {
"2층",
style: TextStyle(
fontSize: 18.0.sp,
color: laundryRoomLayer == LaundryRoomLayer.second
color: laundryRoomLayer.isSecond
? LoturaColors.black
: LoturaColors.gray300,
),
Expand Down Expand Up @@ -323,8 +322,7 @@ class LaundryList extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
MachineButton(
laundryEntity: laundryRoomModel.laundryRoomLayer ==
LaundryRoomLayer.first
laundryEntity: laundryRoomModel.laundryRoomLayer.isFirst
? list[
placeIndex[laundryRoomModel.roomLocation.index]! +
index]
Expand All @@ -336,8 +334,7 @@ class LaundryList extends StatelessWidget {
),
const Icon(LoturaIcons.triangleUp, color: Colors.grey),
MachineButton(
laundryEntity: laundryRoomModel.laundryRoomLayer ==
LaundryRoomLayer.first
laundryEntity: laundryRoomModel.laundryRoomLayer.isFirst
? list[
placeIndex[laundryRoomModel.roomLocation.index]! +
index +
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart' as s;
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:lotura/domain/laundry/entity/laundry_entity.dart';
import 'package:lotura/main.dart';
import 'package:lotura/presentation/utils/lotura_colors.dart';
import 'package:lotura/presentation/utils/lotura_icons.dart';
import 'package:lotura/presentation/utils/machine_widget.dart';
Expand All @@ -21,7 +20,7 @@ class MachineButton extends MachineWidget {

@override
Widget build(BuildContext context) {
return laundryEntity.deviceType == DeviceType.empty
return laundryEntity.deviceType.isEmpty
? Container(
padding: EdgeInsets.all(12.0.r),
constraints: BoxConstraints(
Expand Down
58 changes: 44 additions & 14 deletions lib/presentation/utils/bottom_navi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ class _BottomNaviState extends State<BottomNavi>
int selectedIndex = 1;
bool isChange = false;

final Map<int, int> placeIndex = {0: 0, 1: 16, 2: 31, 3: 44};

@override
void initState() {
super.initState();
Expand Down Expand Up @@ -96,12 +94,29 @@ class _BottomNaviState extends State<BottomNavi>
);
}
if (widget.nfcTagData != -1) {
for (var i in placeIndex.entries) {
if (i.value > widget.nfcTagData - 1) {
context.read<RoomBloc>().add(ModifyRoomIndexEvent(
roomLocation: RoomLocation.values.elementAt(i.key - 1)));
break;
}
int d = widget.nfcTagData;
if (d <= 16) {
context
.read<RoomBloc>()
.add(ModifyRoomIndexEvent(roomLocation: RoomLocation.schoolSide));
context.read<RoomBloc>().add(ModifyLaundryRoomLayerEvent(
laundryRoomLayer: LaundryRoomLayer.first));
} else if (d <= 32) {
context.read<RoomBloc>().add(
ModifyRoomIndexEvent(roomLocation: RoomLocation.dormitorySide));
context.read<RoomBloc>().add(ModifyLaundryRoomLayerEvent(
laundryRoomLayer: LaundryRoomLayer.first));
} else if (d <= 48) {
context
.read<RoomBloc>()
.add(ModifyRoomIndexEvent(roomLocation: RoomLocation.schoolSide));
context.read<RoomBloc>().add(ModifyLaundryRoomLayerEvent(
laundryRoomLayer: LaundryRoomLayer.second));
} else if (d <= 64) {
context.read<RoomBloc>().add(
ModifyRoomIndexEvent(roomLocation: RoomLocation.dormitorySide));
context.read<RoomBloc>().add(ModifyLaundryRoomLayerEvent(
laundryRoomLayer: LaundryRoomLayer.second));
}
} else {
context.read<RoomBloc>().add(GetRoomIndexEvent());
Expand Down Expand Up @@ -159,12 +174,27 @@ class _BottomNaviState extends State<BottomNavi>
if (widget.nfcTagData != -1) {
selectedIndex = 1;
controller.index = 1;
for (var i in placeIndex.entries) {
if (i.value > widget.nfcTagData - 1) {
context.read<RoomBloc>().add(ModifyRoomIndexEvent(
roomLocation: RoomLocation.values.elementAt(i.key - 1)));
break;
}
int d = widget.nfcTagData;
if (d <= 16) {
context.read<RoomBloc>().add(
ModifyRoomIndexEvent(roomLocation: RoomLocation.schoolSide));
context.read<RoomBloc>().add(ModifyLaundryRoomLayerEvent(
laundryRoomLayer: LaundryRoomLayer.first));
} else if (d <= 32) {
context.read<RoomBloc>().add(ModifyRoomIndexEvent(
roomLocation: RoomLocation.dormitorySide));
context.read<RoomBloc>().add(ModifyLaundryRoomLayerEvent(
laundryRoomLayer: LaundryRoomLayer.first));
} else if (d <= 48) {
context.read<RoomBloc>().add(
ModifyRoomIndexEvent(roomLocation: RoomLocation.schoolSide));
context.read<RoomBloc>().add(ModifyLaundryRoomLayerEvent(
laundryRoomLayer: LaundryRoomLayer.second));
} else if (d <= 64) {
context.read<RoomBloc>().add(ModifyRoomIndexEvent(
roomLocation: RoomLocation.dormitorySide));
context.read<RoomBloc>().add(ModifyLaundryRoomLayerEvent(
laundryRoomLayer: LaundryRoomLayer.second));
}
BlocProvider.of<RoomBloc>(context)
.add(InitialShowBottomSheetEvent());
Expand Down
8 changes: 4 additions & 4 deletions lib/presentation/utils/osj_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ class _OSJBottomSheetState extends State<OSJBottomSheet> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (widget.state != CurrentState.working)
if (widget.state.isNotWorking)
Icon(
widget.state.icon,
size: 24.0.r,
color: widget.state == CurrentState.available
color: widget.state.isAvailable
? LoturaColors.green700
: widget.state == CurrentState.disconnected
: widget.state.isDisconnected
? LoturaColors.black
: LoturaColors.red700,
),
Expand All @@ -97,7 +97,7 @@ class _OSJBottomSheetState extends State<OSJBottomSheet> {
),
),
),
widget.state == CurrentState.working
widget.state.isWorking
? Row(
children: [
Expanded(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 3.7.0+26
version: 3.7.1+27

environment:
sdk: '>=3.1.3 <4.0.0'
Expand Down