Skip to content

Commit

Permalink
1.0.0+1
Browse files Browse the repository at this point in the history
  • Loading branch information
nain93 committed Aug 27, 2023
1 parent a9889b8 commit 113fc85
Show file tree
Hide file tree
Showing 12 changed files with 324 additions and 310 deletions.
28 changes: 13 additions & 15 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ import 'package:flutter_native_splash/flutter_native_splash.dart';
import 'package:flutter_web_plugins/url_strategy.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:kakao_flutter_sdk_user/kakao_flutter_sdk_user.dart';
import 'package:moa_app/constants/app_constants.dart';
import 'package:moa_app/firebase_options.dart';
import 'package:moa_app/providers/token_provider.dart';
import 'package:moa_app/utils/config.dart';
import 'package:moa_app/utils/custom_scaffold.dart';
import 'package:moa_app/utils/router_provider.dart';
import 'package:moa_app/utils/themes.dart';

Expand Down Expand Up @@ -89,19 +87,19 @@ class MyApp extends HookConsumerWidget {
themeMode: ThemeMode.light,
routerConfig: ref.watch(routeProvider),
// 웹에서 scaffold를 사용할 때 최대 너비를 제한하기 위해 사용
builder: (context, child) {
return CustomScaffold.responsive(
builder: (context, x, y) {
return Center(
child: Container(
constraints: BoxConstraints(
maxWidth: x > Breakpoints.md ? Breakpoints.md : x),
child: child,
),
);
},
);
},
// builder: (context, child) {
// return CustomScaffold.responsive(
// builder: (context, x, y) {
// return Center(
// child: Container(
// constraints: BoxConstraints(
// maxWidth: x > Breakpoints.md ? Breakpoints.md : x),
// child: child,
// ),
// );
// },
// );
// },
),
);
}
Expand Down
147 changes: 74 additions & 73 deletions lib/screens/add_content/add_image_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -178,96 +178,97 @@ class AddImageContent extends HookConsumerWidget {
}, [hashtagAsync.isLoading]);

return Scaffold(
resizeToAvoidBottomInset: false,
appBar: const AppBarBack(
isBottomBorderDisplayed: false,
title: '취향 모으기',
),
body: Stack(
fit: StackFit.expand,
children: [
SingleChildScrollView(
physics: const ClampingScrollPhysics(),
padding: const EdgeInsets.only(
bottom: 100, top: 20, left: 20, right: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: double.infinity,
height: 135,
child: Material(
color: AppColors.textInputBackground,
borderRadius: BorderRadius.circular(15),
child: InkWell(
borderRadius: BorderRadius.circular(15),
onTap: () => pickImage(ImageSource.gallery),
child: imageFile.value != null
? Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
image: DecorationImage(
fit: BoxFit.cover,
image: FileImage(File(imageFile.value!.path)),
),
),
)
: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image(
width: 16,
height: 16,
image: Assets.circlePlus,
),
const SizedBox(height: 10),
Text(
'이미지 취향을 추가해 주세요.',
style: const InputLabelTextStyle().merge(
TextStyle(
color:
AppColors.blackColor.withOpacity(0.3),
body: Padding(
padding:
EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
child: Column(
children: [
Expanded(
child: SingleChildScrollView(
physics: const ClampingScrollPhysics(),
padding: const EdgeInsets.only(
bottom: 100, top: 20, left: 20, right: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: double.infinity,
height: 135,
child: Material(
color: AppColors.textInputBackground,
borderRadius: BorderRadius.circular(15),
child: InkWell(
borderRadius: BorderRadius.circular(15),
onTap: () => pickImage(ImageSource.gallery),
child: imageFile.value != null
? Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
image: DecorationImage(
fit: BoxFit.cover,
image: FileImage(
File(imageFile.value!.path)),
),
),
)
],
),
: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image(
width: 16,
height: 16,
image: Assets.circlePlus,
),
const SizedBox(height: 10),
Text(
'이미지 취향을 추가해 주세요.',
style: const InputLabelTextStyle().merge(
TextStyle(
color: AppColors.blackColor
.withOpacity(0.3),
),
),
)
],
),
),
),
),
ErrorText(
errorText: imageError.value,
errorValidate: imageError.value.isNotEmpty),
AddContentBottom(
padding: const EdgeInsets.symmetric(horizontal: 0),
onChangedTitle: onChangedTitle,
addHashtag: addHashtag,
hashtagController: hashtagController,
onChangedHashtag: onChangedHashtag,
onChangedMemo: onChangedMemo,
memo: memo,
tagError: tagError,
title: title,
titleError: titleError,
selectedTagList: selectedTagList,
),
),
],
),
ErrorText(
errorText: imageError.value,
errorValidate: imageError.value.isNotEmpty),
AddContentBottom(
padding: const EdgeInsets.symmetric(horizontal: 0),
onChangedTitle: onChangedTitle,
addHashtag: addHashtag,
hashtagController: hashtagController,
onChangedHashtag: onChangedHashtag,
onChangedMemo: onChangedMemo,
memo: memo,
tagError: tagError,
title: title,
titleError: titleError,
selectedTagList: selectedTagList,
)
],
),
),
),
Positioned(
bottom: 0,
width: MediaQuery.of(context).size.width,
child: Button(
Button(
loading: loading.value,
onPressed: completeAddContent,
backgroundColor: AppColors.primaryColor,
text: '완료',
height: 52 + MediaQuery.of(context).padding.bottom,
borderRadius: 0,
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).padding.bottom),
),
)
],
],
),
),
);
}
Expand Down
Loading

0 comments on commit 113fc85

Please sign in to comment.