From ccc182eaa874ee12f4ad2bbb43fcf259fca16d48 Mon Sep 17 00:00:00 2001 From: moukou2488 Date: Mon, 13 Dec 2021 15:20:06 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=B6=94=EA=B0=80]=20=EC=9E=91=EC=84=B1?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Views/createPage.dart | 121 ++++++++++++++++++++++++++++++-------- lib/themeData.dart | 2 +- pubspec.lock | 9 ++- pubspec.yaml | 1 + 4 files changed, 106 insertions(+), 27 deletions(-) diff --git a/lib/Views/createPage.dart b/lib/Views/createPage.dart index 0849446..2deaa04 100644 --- a/lib/Views/createPage.dart +++ b/lib/Views/createPage.dart @@ -4,8 +4,10 @@ import 'package:DiveSocialApp/Layout/commonComponent.dart'; import 'package:DiveSocialApp/themeData.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + import 'package:get/get.dart'; import 'package:image_picker/image_picker.dart'; +import 'package:switcher_button/switcher_button.dart'; class CreatePage extends StatefulWidget { // final FirebaseUser user; @@ -33,6 +35,7 @@ class _CreatePageState extends State { } File _image; + RxBool _switchValue = true.obs; // 갤러리에서 사진 가져오기 Future _getImage() async { @@ -96,14 +99,15 @@ class _CreatePageState extends State { ( children: [ - Container( + Container + ( padding: EdgeInsets.fromLTRB(15.0, 0, 15.0, 0), height: sh20+sh5+10, decoration: BoxDecoration - ( - borderRadius: BorderRadius.circular(10), - border: Border.all(color: Colors.black12,width: 1.0) - ), + ( + borderRadius: BorderRadius.circular(10), + border: Border.all(color: Colors.black12,width: 1.0) + ), child: Column( children: [ Container( @@ -126,7 +130,9 @@ class _CreatePageState extends State { Align( alignment: Alignment.bottomLeft, child: smallFillBox - (Center( + ( + Center + ( child: settingText ( '#hasTag', @@ -147,27 +153,92 @@ class _CreatePageState extends State { SizedBox(height: sh3,), smallFillBox ( - Row - ( - children: - [ - Row - ( - children: - [ - Center( - child: settingText - ( - 'GPS', - color: mainColor - ), - ) - ], + Padding( + padding: EdgeInsets.all(15.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Icon + ( + Icons.room, + color: greyColor, + size: 16, + ), + SizedBox(width: 5.0,), + settingText + ( + 'GPS', + color: greyColor, + size: 13, + weight: FontWeight.w600 + ), + ], + ), + SwitcherButton + ( + value: _switchValue.value, + offColor: greyColor, + onChange: (val)=> _switchValue.value = val + ) + ], + ), + ), + color: brightGreyColor + ), + SizedBox(height: sh3), + Container + ( + padding: EdgeInsets.fromLTRB(15.0, 0, 15.0, 0), + height: sh20+sh5+10, + decoration: BoxDecoration + ( + borderRadius: BorderRadius.circular(10), + border: Border.all(color: Colors.black12,width: 1.0) + ), + child: Column( + children: [ + Container( + height: sh20, + child: TextField + ( + maxLines: null, + controller: textEditingController, + decoration: InputDecoration + ( + border: InputBorder.none, + hintText: 'Write content', + hintStyle: TextStyle + ( + color: boxTextColor + ) + ), + ), + ), + Align( + alignment: Alignment.bottomLeft, + child: smallFillBox + ( + Center + ( + child: settingText + ( + '#hasTag', + color: greyColor, + size: 13, + weight: FontWeight.w600 + ), + ), + width: 95.0, + height: sh4, + color: brightGreyColor, + + ), ) - ], - ) + ], + ), ), - Divider(), ListTile( leading: Text('위치 추가하기'), ), diff --git a/lib/themeData.dart b/lib/themeData.dart index de687f3..8960752 100644 --- a/lib/themeData.dart +++ b/lib/themeData.dart @@ -7,7 +7,7 @@ const mainColor = Color(0xFF1D315B); //연한색 const boxTextColor = Color(0xFFD9D9D9); // 배경 main or point 사용된 박스에 들어갈 글자색 const whiteColor = Color(0xFFFFFFFF); -const brightGreyColor = Color(0xFFF0EFF0); +const brightGreyColor = Color(0xFFEEF2F5); const defaultColor = Color(0xFF000000); const greyColor = Color(0xFF7A7A7A); const lightGreyColor = Color(0xFFCECECE); diff --git a/pubspec.lock b/pubspec.lock index 6bc88d5..7a385fd 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -280,6 +280,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" + switcher_button: + dependency: "direct main" + description: + name: switcher_button + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4" term_glyph: dependency: transitive description: @@ -310,4 +317,4 @@ packages: version: "2.1.0" sdks: dart: ">=2.12.0 <3.0.0" - flutter: ">=1.12.13+hotfix.4" + flutter: ">=1.17.0" diff --git a/pubspec.yaml b/pubspec.yaml index a0341a8..d9a34d5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -29,6 +29,7 @@ dependencies: flutter_signin_button: ^0.2.8 google_fonts: ^0.1.1 get: ^4.3.8 + switcher_button: ^0.0.4 dev_dependencies: flutter_test: