From c96ccedae95b57c643232a15305a7614e3fc36d9 Mon Sep 17 00:00:00 2001 From: Kyoichi Date: Thu, 26 Aug 2021 16:16:32 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B37?= =?UTF-8?q?=E3=81=AE=E5=AE=9F=E8=A3=85(=E9=80=94=E4=B8=AD=E7=B5=8C?= =?UTF-8?q?=E9=81=8E)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fonts/WebIconApp.ttf | Bin 2980 -> 3516 bytes fonts/config.json | 28 ++++++ lib/addIcon/web_icon_app_icons.dart | 2 + lib/pages/home_menu.dart | 48 +--------- lib/pages/mainmenu_selectedbutton.dart | 42 ++++++++ lib/pages/mainmenuserch.dart | 83 +++++++++++----- lib/pages/mandala_algorithm_page.dart | 7 +- lib/pages/selectchangebutton.dart | 9 ++ lib/pages/userinfo.dart | 128 ++++++++++++++++++++++--- 9 files changed, 261 insertions(+), 86 deletions(-) create mode 100644 lib/pages/mainmenu_selectedbutton.dart diff --git a/fonts/WebIconApp.ttf b/fonts/WebIconApp.ttf index 793dc3aaf0bb24e4f7278f65585ec086417d6e03..28ee54a6dabe9ff625160c02efaa0b31252a780a 100644 GIT binary patch delta 1068 zcmYjPU1$_n6h3EWc6PIq{mJg$ana1g%rrZVi81W#&QeknK|#@%qRfme2fSYK}5>h)DodSWGK7+W_G2$!*|a;Ki_xGota;^ zt?pR1>jn{DC!%jp)~X91pWHZ4B&7lU%2;U;75NZvbxw zf!J~73eKy*7c;d>iz8$07WCf1ADx{)S&fdx*1`W0e!f;+T;Kt^jC>yc&beys)T3S7 z=k5~46(TvmFn{sV{P#mll;}snt(8@KzeaEayvh82^M};epGcFNh|udJw_bj>?RNWI zM3s-hkC7Bau>zh(HHtSZuJMP)G9Mf~M!$43Fo8~pN0<u$X4R*_YwwU0uDVHLD2Olu_59AN{ z4~EI312l_aZEH*__mw6YGn`Kx(?$T)Kv?gh>ajv$Sz{DjTVcDAkm34;AAq4gN_fdu@Xh) zg01@yb}Ne&3tu(P>_N7rTVnKvh$ z2~+%5581Es9JS3{n#$47_ne3NlxbTBt<|ZYK=_3ps7yQ4SvPvV3lv6Ku)djZ{A_@@ zWqz2?Gh-#a|4=9{d4uDsi}C-}b=~=pCO+}3L-DqJJfDFc2-!e3oyrXws2al7`wbT_ z$L9c$kJQ$(;(LH)2)}FRTEIaoP%+GgVn1EGB>6?@sQZB6^88sr!3JT0-kINFhNgg-D|?>10p=N~f&3amUQW%uL3ajXAR^J?=R1q}9 { //画面サイズを取得 final Size size = MediaQuery.of(context).size; const sharecheck = true; //共有しているかしていないかのチェック - //タグの管理 final List menugenre = ['ジャンル1', 'ジャンル2']; return Scaffold( @@ -35,7 +34,7 @@ class _HomePageState extends State { children: [ Column( children: [ - const Userinfo(), + const UserInfo(), const Notemenu(), ], ), @@ -65,7 +64,7 @@ class _HomePageState extends State { //アイデア追加ボタン const Padding( padding: EdgeInsets.only(right: 120), - child: Tidybutton(), + child: TidyButton(), ), ], ), @@ -118,43 +117,8 @@ class _HomePageState extends State { BorderRadius.circular( 5), ), - child: InkWell( - //クリックイベント - onTap: () {}, - child: Row( - mainAxisAlignment: - MainAxisAlignment - .spaceEvenly, - children: [ - const Padding( - padding: - EdgeInsets.only( - bottom: 5), - child: Text( - '保留', - style: TextStyle( - color: Palette - .titleTextColor, - fontSize: 16), - textAlign: - TextAlign - .center, - ), - ), - const Padding( - padding: - EdgeInsets.only( - top: 4), - child: Icon( - WebIconApp - .keyboardarrowdown, - color: Palette - .mainTextColor, - ), - ), - ], - ), - ), + child: + const Mystatefullwidget(), ), ], ), @@ -276,5 +240,3 @@ class _HomePageState extends State { noteName.add('ノート'); } } - -class Fruits {} diff --git a/lib/pages/mainmenu_selectedbutton.dart b/lib/pages/mainmenu_selectedbutton.dart new file mode 100644 index 0000000..fc323df --- /dev/null +++ b/lib/pages/mainmenu_selectedbutton.dart @@ -0,0 +1,42 @@ +import 'package:alexander/addIcon/web_icon_app_icons.dart'; +import 'package:alexander/pages/theme/palette.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +//採用・保留選択ドロップボタン +class Mystatefullwidget extends StatefulWidget { + const Mystatefullwidget({Key? key}) : super(key: key); + + @override + _MystatefullwidgetState createState() => _MystatefullwidgetState(); +} + +class _MystatefullwidgetState extends State { + String dropdownValue = '保留'; + @override + Widget build(BuildContext context) { + return DropdownButton( + value: dropdownValue, + icon: const Icon(WebIconApp.keyboardarrowdown), + iconEnabledColor: Palette.mainTextColor, + style: const TextStyle(color: Palette.titleTextColor), + underline: Container( + height: 2, + color: Palette.bgContentsLightColor, + ), + onChanged: (String? newValue) { + setState(() { + //各ボタンのクリックイベント + dropdownValue = newValue!; + }); + }, + items: ['採用', '保留', 'ボツ案', '無し'] + .map>((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ); + } +} diff --git a/lib/pages/mainmenuserch.dart b/lib/pages/mainmenuserch.dart index 059b3b5..703b93c 100644 --- a/lib/pages/mainmenuserch.dart +++ b/lib/pages/mainmenuserch.dart @@ -61,9 +61,14 @@ class Exitteambutton extends StatelessWidget { } //整理整頓ボタン表示 -class Tidybutton extends StatelessWidget { - const Tidybutton({Key? key}) : super(key: key); +class TidyButton extends StatefulWidget { + const TidyButton({Key? key}) : super(key: key); + @override + _TidyButtonState createState() => _TidyButtonState(); +} + +class _TidyButtonState extends State { @override Widget build(BuildContext context) { return Container( @@ -75,30 +80,60 @@ class Tidybutton extends StatelessWidget { // 角丸 borderRadius: BorderRadius.circular(5), ), - child: InkWell( - //ボタンのクリックイベント - onTap: () {}, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - const Padding( - padding: EdgeInsets.only(bottom: 5), - child: Text( - '整理整頓をする', - style: TextStyle( - color: Palette.bgContentsLightColor, fontSize: 16), - textAlign: TextAlign.center, - ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Padding( + padding: EdgeInsets.only(bottom: 5), + child: Text( + '整理整頓をする', + style: + TextStyle(color: Palette.bgContentsLightColor, fontSize: 16), + textAlign: TextAlign.center, ), - const Padding( - padding: EdgeInsets.only(top: 4), - child: Icon( - WebIconApp.keyboardarrowdown, - color: Palette.bgContentsLightColor, - ), + ), + PopupMenuButton( + icon: const Icon( + WebIconApp.keyboardarrowdown, + color: Palette.bgContentsLightColor, ), - ], - ), + onSelected: (aaaa) { + setState(() { + showDialog( + context: context, + builder: (_) { + return AlertDialog( + title: const Text('何を選択したかの表示'), + content: Text('$aaaaが選択されました'), + ); + }); + }); + }, + itemBuilder: (context) => [ + const PopupMenuItem( + value: 1, + child: Text( + '1:採用を先頭にする', + style: + TextStyle(fontSize: 12, color: Palette.titleTextColor), + )), + const PopupMenuItem( + value: 2, + child: Text( + '2:保留を先頭にする', + style: + TextStyle(fontSize: 12, color: Palette.titleTextColor), + )), + const PopupMenuItem( + value: 3, + child: Text( + '3:ボツ案を先頭にする', + style: + TextStyle(fontSize: 12, color: Palette.titleTextColor), + )), + ], + ), + ], ), ); } diff --git a/lib/pages/mandala_algorithm_page.dart b/lib/pages/mandala_algorithm_page.dart index d0fb536..23a636a 100644 --- a/lib/pages/mandala_algorithm_page.dart +++ b/lib/pages/mandala_algorithm_page.dart @@ -1,5 +1,3 @@ -import 'dart:math'; - import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; @@ -45,7 +43,8 @@ class MandalaAlgorithmPage extends HookWidget { } // 後 - if ( (i - hasi) % (3 * size) == 0 && (i - hasi - 3 * size) % (9 * size) == 0) { + if ((i - hasi) % (3 * size) == 0 && + (i - hasi - 3 * size) % (9 * size) == 0) { // print( ); array[i] = true; } @@ -63,7 +62,7 @@ class MandalaAlgorithmPage extends HookWidget { if (array[i] == null) { tmp += '×'; - } else if (array[i] ?? false){ + } else if (array[i] ?? false) { tmp += '■'; } else { tmp += '□'; diff --git a/lib/pages/selectchangebutton.dart b/lib/pages/selectchangebutton.dart index 8bc45e9..f52bda1 100644 --- a/lib/pages/selectchangebutton.dart +++ b/lib/pages/selectchangebutton.dart @@ -1,3 +1,4 @@ +import 'package:alexander/addIcon/web_icon_app_icons.dart'; import 'package:alexander/pages/theme/palette.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -26,6 +27,10 @@ class SelectChangeButton extends StatelessWidget { child: InkWell( //マンダラボタンクリックイベント onTap: () {}, + child: const Icon( + WebIconApp.mandara, + color: Palette.accentTextColor, + ), ), ), const Padding( @@ -86,6 +91,10 @@ class SelectChangeButton extends StatelessWidget { child: InkWell( //ミックスボタンクリックイベント onTap: () {}, + child: const Icon( + WebIconApp.mix, + color: Palette.accentTextColor, + ), ), ), const Padding( diff --git a/lib/pages/userinfo.dart b/lib/pages/userinfo.dart index 969a32e..5fee944 100644 --- a/lib/pages/userinfo.dart +++ b/lib/pages/userinfo.dart @@ -3,12 +3,18 @@ import 'package:alexander/pages/theme/palette.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -class Userinfo extends StatelessWidget { - const Userinfo({Key? key}) : super(key: key); +class UserInfo extends StatefulWidget { + const UserInfo({Key? key}) : super(key: key); @override + _UserInfoState createState() => _UserInfoState(); +} + +class _UserInfoState extends State { + String username = 'ユーザー名サンプルあああああああああああああああああああああああああああああああああ'; + @override + //ホームメニューの左上(ユーザー情報が記載されているウィジェット) Widget build(BuildContext context) { - //ホームメニューの左上(ユーザー情報が記載されているウィジェット) return SizedBox( width: 280, height: 80, @@ -26,28 +32,120 @@ class Userinfo extends StatelessWidget { color: Palette.loginleft, ), ), - const Expanded( + Expanded( child: SingleChildScrollView( child: Padding( - padding: EdgeInsets.all(20), + padding: const EdgeInsets.all(20), child: Text( - 'ユーザー名サンプルあああああ', - style: TextStyle(fontSize: 12), + username, + style: const TextStyle(fontSize: 12), overflow: TextOverflow.ellipsis, ), ), ), ), //押したらメニューが出るアイコンボックス - Container( - margin: const EdgeInsets.only(right: 24), - child: InkWell( - onTap: () {}, - child: const Icon( - WebIconApp.keyboardarrowdown, - color: Palette.mainTextColor, - ), + PopupMenuButton( + icon: const Icon( + WebIconApp.keyboardarrowdown, + color: Palette.mainTextColor, ), + onSelected: (aaaa) { + setState(() { + showDialog( + context: context, + builder: (_) { + return AlertDialog( + title: const Text('何を選択したかの表示'), + content: Text('$aaaaが選択されました'), + ); + }); + }); + }, + itemBuilder: (context) => [ + //ユーザー名 + PopupMenuItem( + value: 1, + child: Row( + children: [ + Container( + margin: const EdgeInsets.only(left: 10), + width: 32, + height: 32, + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Palette.loginleft, + ), + ), + Flexible( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(20), + child: Text( + username, + style: const TextStyle(fontSize: 12), + overflow: TextOverflow.ellipsis, + maxLines: 3, + ), + ), + ), + ), + ], + ), + ), + //名前の変更 + PopupMenuItem( + value: 1, + child: Row( + children: [ + Container( + margin: const EdgeInsets.only(left: 10), + width: 32, + height: 32, + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Palette.loginleft, + ), + ), + const Padding( + padding: EdgeInsets.all(20), + child: Text( + '名前の変更', + style: TextStyle(fontSize: 12), + overflow: TextOverflow.ellipsis, + maxLines: 3, + ), + ), + ], + ), + ), + //ログアウト + PopupMenuItem( + value: 1, + child: Row( + children: [ + Container( + margin: const EdgeInsets.only(left: 10), + width: 32, + height: 32, + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Palette.loginleft, + ), + ), + const Padding( + padding: EdgeInsets.all(20), + child: Text( + 'ログアウト', + style: TextStyle(fontSize: 12), + overflow: TextOverflow.ellipsis, + maxLines: 3, + ), + ), + ], + ), + ), + ], ), ], ), From 9a9cdfc6256cb3f0650ee0a3bee8f9c4f8f6fbff Mon Sep 17 00:00:00 2001 From: Kyoichi Date: Tue, 31 Aug 2021 02:30:17 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=E3=81=A8=E3=82=8A=E3=81=82=E3=81=88?= =?UTF-8?q?=E3=81=9A=E5=AE=8C=E6=88=90=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/accordion_button.dart | 104 ++++++++++++++++++++++++++++++++ lib/pages/home_menu.dart | 97 ++++++++++++++++++----------- lib/pages/notemenuinfo.dart | 4 +- lib/pages/shareuserinfo.dart | 50 +++++++-------- 4 files changed, 192 insertions(+), 63 deletions(-) create mode 100644 lib/pages/accordion_button.dart diff --git a/lib/pages/accordion_button.dart b/lib/pages/accordion_button.dart new file mode 100644 index 0000000..50cc893 --- /dev/null +++ b/lib/pages/accordion_button.dart @@ -0,0 +1,104 @@ +import 'package:alexander/pages/theme/palette.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class AccordionIconButton extends StatefulWidget { + final IconData _iconData; + final double _iconSize; + final String _label; + final double _maxWidth; + + const AccordionIconButton( + {Key? key, + required IconData iconData, + required double iconSize, + required String label, + required double maxWidth}) + : _iconData = iconData, + _iconSize = iconSize, + _label = label, + _maxWidth = maxWidth, + super(key: key); + + @override + // ignore: no_logic_in_create_state + State createState() => _State(width: _iconSize); +} + +class _State extends State { + // ignore: constant_identifier_names + static const double INITIAL_OPACITY = 0.0; + bool check = false; + + double opacity; + double width; + + _State({ + required this.width, + }) : opacity = INITIAL_OPACITY, + super(); + + @override + Widget build(BuildContext context) { + const Duration duration = Duration(milliseconds: 2); + final Widget iconWidget = Icon( + widget._iconData, + size: widget._iconSize, + ); + + return AnimatedContainer( + constraints: BoxConstraints(maxWidth: widget._maxWidth), + width: width, + curve: Curves.easeIn, + duration: duration, + child: InkWell( + borderRadius: const BorderRadius.all(Radius.circular(10.0)), + onHover: (isHover) { + setState(() { + if (isHover) { + opacity = 1.0; + width = 100; + } else { + opacity = INITIAL_OPACITY; + width = widget._iconSize; + } + }); + }, + onTap: () {}, + child: Wrap( + children: [ + Container( + width: 32, + height: 32, + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Palette.loginleft, + ), + ), + Flexible( + child: AnimatedOpacity( + curve: Curves.easeIn, + duration: duration, + opacity: opacity, + child: Container( + width: 150, + height: 32, + decoration: BoxDecoration( + border: Border.all(color: Palette.borderColor, width: 3), + color: Palette.bgContentsLightColor), + child: Text( + widget._label, + softWrap: false, + overflow: TextOverflow.fade, + textAlign: TextAlign.center, + style: const TextStyle(color: Palette.mainTextColor), + ), + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/home_menu.dart b/lib/pages/home_menu.dart index c2d62fe..50366f7 100644 --- a/lib/pages/home_menu.dart +++ b/lib/pages/home_menu.dart @@ -26,7 +26,26 @@ class _HomePageState extends State { final Size size = MediaQuery.of(context).size; const sharecheck = true; //共有しているかしていないかのチェック //タグの管理 - final List menugenre = ['ジャンル1', 'ジャンル2']; + final List menugenre = [ + 'ジャンル1', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + ]; return Scaffold( body: SingleChildScrollView( child: Row( @@ -47,7 +66,7 @@ class _HomePageState extends State { //メインメニューのウィジェット Container( width: 1160, - height: size.height - 100, + height: size.height - 80, color: Palette.bgContentsNormalColor, child: Column( children: [ @@ -84,7 +103,7 @@ class _HomePageState extends State { children: [ Container( width: 1000, - height: 276, + height: 372, decoration: const BoxDecoration( color: Palette.bgContentsLightColor), @@ -130,15 +149,13 @@ class _HomePageState extends State { CrossAxisAlignment.start, children: [ //タグ一覧 - Row( - children: [ - Padding( - padding: - const EdgeInsets - .only( - left: 56, - top: 25), - child: SizedBox( + Padding( + padding: + const EdgeInsets.only( + top: 10, left: 50), + child: Row( + children: [ + SizedBox( width: 880, height: 24, child: @@ -166,41 +183,53 @@ class _HomePageState extends State { .loginleft, ), ), - Padding( - padding: const EdgeInsets - .only( - left: 7, - right: - 7, - bottom: - 5), - child: Text( - menugenre[ - index], - style: const TextStyle( - fontSize: - 12, - color: - Palette.titleTextColor), - ), + Text( + menugenre[ + index], + style: const TextStyle( + fontSize: + 12, + color: Palette + .titleTextColor), ), ], ); }, ), ), - ), - //下記にタグ追加のプラスボタンを配置 - ], + //下記にタグ追加のプラスボタンを配置 + InkWell( + onTap: () {}, + child: Container( + height: 24, + width: 24, + decoration: BoxDecoration( + border: Border.all( + color: Palette + .titleTextColor), + shape: BoxShape + .circle), + child: const Icon( + Icons.add, + color: Palette + .titleTextColor, + size: 20, + ), + ), + ), + ], + ), ), //テキスト文 const Padding( padding: EdgeInsets.only( - left: 56, top: 25), + left: 56, + top: 25, + right: 40), child: SingleChildScrollView( child: Text( - 'サンプルサンプルサンプルサンプルサンプル', + 'サンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプル', softWrap: true, maxLines: 4, overflow: TextOverflow diff --git a/lib/pages/notemenuinfo.dart b/lib/pages/notemenuinfo.dart index c809053..e46280c 100644 --- a/lib/pages/notemenuinfo.dart +++ b/lib/pages/notemenuinfo.dart @@ -9,10 +9,12 @@ class Notemenu extends StatelessWidget { Widget build(BuildContext context) { //ノート名を格納する変数 final List noteName = ['ノートサンプル', 'ノートサンプル2', 'ノートサンプル3']; + //画面サイズを取得 + final Size size = MediaQuery.of(context).size; return //ノート追加の部分のウィジェット Container( width: 280, - height: 788, + height: size.height - 80, color: Palette.bgContentsLightColor, child: Column( children: [ diff --git a/lib/pages/shareuserinfo.dart b/lib/pages/shareuserinfo.dart index e7ccd5b..ab53178 100644 --- a/lib/pages/shareuserinfo.dart +++ b/lib/pages/shareuserinfo.dart @@ -1,6 +1,7 @@ import 'package:alexander/pages/theme/palette.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'accordion_button.dart'; //共有状態の時に呼ばれるウィジェット class Shareuserinfo extends StatelessWidget { @@ -9,9 +10,8 @@ class Shareuserinfo extends StatelessWidget { @override Widget build(BuildContext context) { //共有ユーザー - final List shereuser = [ - 'user1', - ]; + final List shereuser = ['user1', 'isss']; + return SizedBox( width: 1160, height: 80, @@ -30,28 +30,24 @@ class Shareuserinfo extends StatelessWidget { horizontal: 3, vertical: 3, ), - height: 30, + height: 40, + //共有ユーザー名の表示 child: ListView.builder( scrollDirection: Axis.horizontal, itemCount: shereuser.length, itemBuilder: (context, index) { - return Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - width: 32, - height: 32, - decoration: const BoxDecoration( - shape: BoxShape.circle, - color: Palette.loginleft, + return Padding( + padding: const EdgeInsets.only(right: 10), + child: Row( + children: [ + AccordionIconButton( + iconData: Icons.search, + iconSize: 30, + maxWidth: 100, + label: shereuser[index], ), - ), - Text( - shereuser[index], - style: const TextStyle( - fontSize: 20, color: Palette.titleTextColor), - ), - ], + ], + ), ); }, ), @@ -105,6 +101,7 @@ class Notshareuserinfo extends StatelessWidget { @override Widget build(BuildContext context) { + const String user = 'user1'; //非共有時のユーザー名 return SizedBox( width: 1160, height: 80, @@ -115,14 +112,11 @@ class Notshareuserinfo extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Container( - margin: const EdgeInsets.only(left: 24), - width: 32, - height: 32, - decoration: const BoxDecoration( - shape: BoxShape.circle, - color: Palette.loginleft, - ), + const AccordionIconButton( + iconData: Icons.search, + iconSize: 30, + maxWidth: 100, + label: user, ), //非共有中表示 Container( From b17091ec2711b1c856407bd8e3a95adb472a1679 Mon Sep 17 00:00:00 2001 From: Kyoichi Date: Tue, 31 Aug 2021 03:30:35 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=81=AE?= =?UTF-8?q?=E7=B4=B0=E5=88=86=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/accordion_button.dart | 9 +- lib/pages/home_menu.dart | 271 ------------------ lib/pages/homemenu/home_menu.dart | 86 ++++++ lib/pages/homemenu/mainhome.dart | 71 +++++ .../mainmenu_selectedbutton.dart | 0 lib/pages/{ => homemenu}/mainmenuserch.dart | 0 lib/pages/homemenu/maintext.dart | 106 +++++++ lib/pages/{ => homemenu}/notemenuinfo.dart | 0 .../{ => homemenu}/selectchangebutton.dart | 0 lib/pages/{ => homemenu}/shareuserinfo.dart | 4 +- lib/pages/{ => homemenu}/userinfo.dart | 0 lib/pages/route/app_route.dart | 2 +- lib/pages/sign_up_page.dart | 2 +- 13 files changed, 267 insertions(+), 284 deletions(-) delete mode 100644 lib/pages/home_menu.dart create mode 100644 lib/pages/homemenu/home_menu.dart create mode 100644 lib/pages/homemenu/mainhome.dart rename lib/pages/{ => homemenu}/mainmenu_selectedbutton.dart (100%) rename lib/pages/{ => homemenu}/mainmenuserch.dart (100%) create mode 100644 lib/pages/homemenu/maintext.dart rename lib/pages/{ => homemenu}/notemenuinfo.dart (100%) rename lib/pages/{ => homemenu}/selectchangebutton.dart (100%) rename lib/pages/{ => homemenu}/shareuserinfo.dart (97%) rename lib/pages/{ => homemenu}/userinfo.dart (100%) diff --git a/lib/pages/accordion_button.dart b/lib/pages/accordion_button.dart index 50cc893..8c97986 100644 --- a/lib/pages/accordion_button.dart +++ b/lib/pages/accordion_button.dart @@ -3,19 +3,16 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class AccordionIconButton extends StatefulWidget { - final IconData _iconData; final double _iconSize; final String _label; final double _maxWidth; const AccordionIconButton( {Key? key, - required IconData iconData, required double iconSize, required String label, required double maxWidth}) - : _iconData = iconData, - _iconSize = iconSize, + : _iconSize = iconSize, _label = label, _maxWidth = maxWidth, super(key: key); @@ -41,10 +38,6 @@ class _State extends State { @override Widget build(BuildContext context) { const Duration duration = Duration(milliseconds: 2); - final Widget iconWidget = Icon( - widget._iconData, - size: widget._iconSize, - ); return AnimatedContainer( constraints: BoxConstraints(maxWidth: widget._maxWidth), diff --git a/lib/pages/home_menu.dart b/lib/pages/home_menu.dart deleted file mode 100644 index 50366f7..0000000 --- a/lib/pages/home_menu.dart +++ /dev/null @@ -1,271 +0,0 @@ -import 'dart:ui'; -import 'package:alexander/pages/mainmenu_selectedbutton.dart'; -import 'package:alexander/pages/mainmenuserch.dart'; -import 'package:alexander/pages/notemenuinfo.dart'; -import 'package:alexander/pages/selectchangebutton.dart'; -import 'package:alexander/pages/shareuserinfo.dart'; -import 'package:alexander/pages/theme/palette.dart'; -import 'package:alexander/pages/userinfo.dart'; -import 'package:flutter/material.dart'; - -class HomePage extends StatefulWidget { - const HomePage({Key? key}) : super(key: key); - - @override - _HomePageState createState() => _HomePageState(); -} - -class _HomePageState extends State { - //ノート名を格納する変数 - List noteName = []; - - String radioItem = ''; - @override - Widget build(BuildContext context) { - //画面サイズを取得 - final Size size = MediaQuery.of(context).size; - const sharecheck = true; //共有しているかしていないかのチェック - //タグの管理 - final List menugenre = [ - 'ジャンル1', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - 'ジャンル2', - ]; - return Scaffold( - body: SingleChildScrollView( - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Column( - children: [ - const UserInfo(), - const Notemenu(), - ], - ), - Column( - children: [ - //共有状態の時の処理 - if (sharecheck == true) const Shareuserinfo(), - //共有状態じゃない時の処理 - if (sharecheck == false) const Notshareuserinfo(), - //メインメニューのウィジェット - Container( - width: 1160, - height: size.height - 80, - color: Palette.bgContentsNormalColor, - child: Column( - children: [ - Padding( - padding: const EdgeInsets.only(top: 50), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - //検索バー - const Padding( - padding: EdgeInsets.only(left: 80), - child: Mainmenuserch(), - ), - //アイデア追加ボタン - const Padding( - padding: EdgeInsets.only(right: 120), - child: TidyButton(), - ), - ], - ), - ), - Expanded( - child: SingleChildScrollView( - child: Container( - color: Palette.bgContentsNormalColor, - child: Column( - children: [ - //メインタグの処理 - Padding( - padding: const EdgeInsets.only( - top: 20, left: 80, right: 80), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - width: 1000, - height: 372, - decoration: const BoxDecoration( - color: - Palette.bgContentsLightColor), - child: Column( - children: [ - //タイトル - Padding( - padding: const EdgeInsets.only( - left: 56, right: 40, top: 30), - child: Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - const Text( - 'タイトルサンプル', - style: - TextStyle(fontSize: 24), - ), - //保留ボタン - Container( - alignment: Alignment.center, - width: 91, - height: 32, - decoration: BoxDecoration( - border: Border.all( - color: Palette - .mainTextColor), - borderRadius: - BorderRadius.circular( - 5), - ), - child: - const Mystatefullwidget(), - ), - ], - ), - ), - //メインテキスト - Flexible( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - //タグ一覧 - Padding( - padding: - const EdgeInsets.only( - top: 10, left: 50), - child: Row( - children: [ - SizedBox( - width: 880, - height: 24, - child: - ListView.builder( - scrollDirection: - Axis.horizontal, - itemCount: menugenre - .length, - itemBuilder: - (context, - index) { - return Row( - mainAxisAlignment: - MainAxisAlignment - .center, - children: [ - Container( - width: 8, - height: 8, - decoration: - const BoxDecoration( - shape: BoxShape - .circle, - color: Palette - .loginleft, - ), - ), - Text( - menugenre[ - index], - style: const TextStyle( - fontSize: - 12, - color: Palette - .titleTextColor), - ), - ], - ); - }, - ), - ), - //下記にタグ追加のプラスボタンを配置 - InkWell( - onTap: () {}, - child: Container( - height: 24, - width: 24, - decoration: BoxDecoration( - border: Border.all( - color: Palette - .titleTextColor), - shape: BoxShape - .circle), - child: const Icon( - Icons.add, - color: Palette - .titleTextColor, - size: 20, - ), - ), - ), - ], - ), - ), - //テキスト文 - const Padding( - padding: EdgeInsets.only( - left: 56, - top: 25, - right: 40), - child: - SingleChildScrollView( - child: Text( - 'サンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプル', - softWrap: true, - maxLines: 4, - overflow: TextOverflow - .ellipsis, - ), - ), - ), - //マンダラボタンなどの表示 - const SelectChangeButton(), - ], - ), - ), - ], - ), - ), - ], - ), - ), - ], - ), - ), - ), - ), - ], - ), - ), - ], - ), - ], - ), - ), - ); - } - - //ノート追加ボタンクリックイベント - void noteAdd() { - noteName.add('ノート'); - } -} diff --git a/lib/pages/homemenu/home_menu.dart b/lib/pages/homemenu/home_menu.dart new file mode 100644 index 0000000..75e85b2 --- /dev/null +++ b/lib/pages/homemenu/home_menu.dart @@ -0,0 +1,86 @@ +import 'dart:ui'; +import 'package:alexander/pages/homemenu/mainhome.dart'; +import 'package:alexander/pages/homemenu/mainmenuserch.dart'; +import 'package:alexander/pages/homemenu/notemenuinfo.dart'; +import 'package:alexander/pages/homemenu/shareuserinfo.dart'; +import 'package:alexander/pages/theme/palette.dart'; +import 'package:alexander/pages/homemenu/userinfo.dart'; +import 'package:flutter/material.dart'; + +class HomePage extends StatefulWidget { + const HomePage({Key? key}) : super(key: key); + + @override + _HomePageState createState() => _HomePageState(); +} + +class _HomePageState extends State { + //ノート名を格納する変数 + List noteName = []; + + String radioItem = ''; + @override + Widget build(BuildContext context) { + //画面サイズを取得 + final Size size = MediaQuery.of(context).size; + const sharecheck = true; //共有しているかしていないかのチェック + return Scaffold( + body: SingleChildScrollView( + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + children: [ + const UserInfo(), + const Notemenu(), + ], + ), + Column( + children: [ + //共有状態の時の処理 + if (sharecheck == true) const Shareuserinfo(), + //共有状態じゃない時の処理 + if (sharecheck == false) const Notshareuserinfo(), + //メインメニューのウィジェット + Container( + width: 1160, + height: size.height - 80, + color: Palette.bgContentsNormalColor, + child: Column( + children: [ + Padding( + padding: const EdgeInsets.only(top: 50), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + //検索バー + const Padding( + padding: EdgeInsets.only(left: 80), + child: Mainmenuserch(), + ), + //アイデア追加ボタン + const Padding( + padding: EdgeInsets.only(right: 120), + child: TidyButton(), + ), + ], + ), + ), + //メインホーム + const Mainhome(), + ], + ), + ), + ], + ), + ], + ), + ), + ); + } + + //ノート追加ボタンクリックイベント + void noteAdd() { + noteName.add('ノート'); + } +} diff --git a/lib/pages/homemenu/mainhome.dart b/lib/pages/homemenu/mainhome.dart new file mode 100644 index 0000000..e3befc8 --- /dev/null +++ b/lib/pages/homemenu/mainhome.dart @@ -0,0 +1,71 @@ +import 'package:alexander/pages/theme/palette.dart'; +import 'package:flutter/cupertino.dart'; + +import 'mainmenu_selectedbutton.dart'; +import 'maintext.dart'; + +class Mainhome extends StatelessWidget { + const Mainhome({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Expanded( + child: SingleChildScrollView( + child: Container( + color: Palette.bgContentsNormalColor, + child: Column( + children: [ + //メインタグの処理 + Padding( + padding: const EdgeInsets.only(top: 20, left: 80, right: 80), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: 1000, + height: 372, + decoration: const BoxDecoration( + color: Palette.bgContentsLightColor), + child: Column( + children: [ + //タイトル + Padding( + padding: const EdgeInsets.only( + left: 56, right: 40, top: 30), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + 'タイトルサンプル', + style: TextStyle(fontSize: 24), + ), + //保留ボタン + Container( + alignment: Alignment.center, + width: 91, + height: 32, + decoration: BoxDecoration( + border: Border.all( + color: Palette.mainTextColor), + borderRadius: BorderRadius.circular(5), + ), + child: const Mystatefullwidget(), + ), + ], + ), + ), + //メインテキスト + const Maintext(), + ], + ), + ), + ], + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/mainmenu_selectedbutton.dart b/lib/pages/homemenu/mainmenu_selectedbutton.dart similarity index 100% rename from lib/pages/mainmenu_selectedbutton.dart rename to lib/pages/homemenu/mainmenu_selectedbutton.dart diff --git a/lib/pages/mainmenuserch.dart b/lib/pages/homemenu/mainmenuserch.dart similarity index 100% rename from lib/pages/mainmenuserch.dart rename to lib/pages/homemenu/mainmenuserch.dart diff --git a/lib/pages/homemenu/maintext.dart b/lib/pages/homemenu/maintext.dart new file mode 100644 index 0000000..aaeea38 --- /dev/null +++ b/lib/pages/homemenu/maintext.dart @@ -0,0 +1,106 @@ +import 'package:alexander/pages/homemenu/selectchangebutton.dart'; +import 'package:alexander/pages/theme/palette.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class Maintext extends StatelessWidget { + const Maintext({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + //タグの管理 + final List menugenre = [ + 'ジャンル1', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + 'ジャンル2', + ]; + return Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + //タグ一覧 + Padding( + padding: const EdgeInsets.only(top: 10, left: 50), + child: Row( + children: [ + SizedBox( + width: 880, + height: 24, + child: ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: menugenre.length, + itemBuilder: (context, index) { + return Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: 8, + height: 8, + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Palette.loginleft, + ), + ), + Text( + menugenre[index], + style: const TextStyle( + fontSize: 12, color: Palette.titleTextColor), + ), + ], + ); + }, + ), + ), + //下記にタグ追加のプラスボタンを配置 + InkWell( + onTap: () {}, + child: Container( + height: 24, + width: 24, + decoration: BoxDecoration( + border: Border.all(color: Palette.titleTextColor), + shape: BoxShape.circle), + child: const Icon( + Icons.add, + color: Palette.titleTextColor, + size: 20, + ), + ), + ), + ], + ), + ), + //テキスト文 + const Padding( + padding: EdgeInsets.only(left: 56, top: 25, right: 40), + child: SingleChildScrollView( + child: Text( + 'サンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルプルサンプルサンプルサンプルサンプルサンプルサンプルサンプルサンプル', + softWrap: true, + maxLines: 4, + overflow: TextOverflow.ellipsis, + ), + ), + ), + //マンダラボタンなどの表示 + const SelectChangeButton(), + ], + ), + ); + } +} diff --git a/lib/pages/notemenuinfo.dart b/lib/pages/homemenu/notemenuinfo.dart similarity index 100% rename from lib/pages/notemenuinfo.dart rename to lib/pages/homemenu/notemenuinfo.dart diff --git a/lib/pages/selectchangebutton.dart b/lib/pages/homemenu/selectchangebutton.dart similarity index 100% rename from lib/pages/selectchangebutton.dart rename to lib/pages/homemenu/selectchangebutton.dart diff --git a/lib/pages/shareuserinfo.dart b/lib/pages/homemenu/shareuserinfo.dart similarity index 97% rename from lib/pages/shareuserinfo.dart rename to lib/pages/homemenu/shareuserinfo.dart index ab53178..c4c89c5 100644 --- a/lib/pages/shareuserinfo.dart +++ b/lib/pages/homemenu/shareuserinfo.dart @@ -1,7 +1,7 @@ import 'package:alexander/pages/theme/palette.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'accordion_button.dart'; +import '../accordion_button.dart'; //共有状態の時に呼ばれるウィジェット class Shareuserinfo extends StatelessWidget { @@ -41,7 +41,6 @@ class Shareuserinfo extends StatelessWidget { child: Row( children: [ AccordionIconButton( - iconData: Icons.search, iconSize: 30, maxWidth: 100, label: shereuser[index], @@ -113,7 +112,6 @@ class Notshareuserinfo extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ const AccordionIconButton( - iconData: Icons.search, iconSize: 30, maxWidth: 100, label: user, diff --git a/lib/pages/userinfo.dart b/lib/pages/homemenu/userinfo.dart similarity index 100% rename from lib/pages/userinfo.dart rename to lib/pages/homemenu/userinfo.dart diff --git a/lib/pages/route/app_route.dart b/lib/pages/route/app_route.dart index f72c50b..12f53de 100644 --- a/lib/pages/route/app_route.dart +++ b/lib/pages/route/app_route.dart @@ -1,7 +1,7 @@ import 'package:alexander/pages/auth_sample_page.dart'; import 'package:alexander/pages/counter_page.dart'; import 'package:alexander/pages/default_page.dart'; -import 'package:alexander/pages/home_menu.dart'; +import 'package:alexander/pages/homemenu/home_menu.dart'; import 'package:alexander/pages/home_sample_page.dart'; import 'package:alexander/pages/index_page.dart'; import 'package:alexander/pages/infinity_scroll_page.dart'; diff --git a/lib/pages/sign_up_page.dart b/lib/pages/sign_up_page.dart index e46f19d..6b61852 100644 --- a/lib/pages/sign_up_page.dart +++ b/lib/pages/sign_up_page.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:gap/gap.dart'; import 'common/alexander_text_field.dart'; import 'common/sign_button.dart'; -import 'home_menu.dart'; +import 'homemenu/home_menu.dart'; class SignUpPage extends StatefulWidget { const SignUpPage({Key? key}) : super(key: key); From fc3ef097f14a1d7eb2bf1f8102a2661f7371315c Mon Sep 17 00:00:00 2001 From: Kyoichi Date: Tue, 31 Aug 2021 11:43:59 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/{homemenu => }/home_menu.dart | 0 lib/pages/route/app_route.dart | 2 +- lib/pages/sign_up_page.dart | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename lib/pages/{homemenu => }/home_menu.dart (100%) diff --git a/lib/pages/homemenu/home_menu.dart b/lib/pages/home_menu.dart similarity index 100% rename from lib/pages/homemenu/home_menu.dart rename to lib/pages/home_menu.dart diff --git a/lib/pages/route/app_route.dart b/lib/pages/route/app_route.dart index 12f53de..f72c50b 100644 --- a/lib/pages/route/app_route.dart +++ b/lib/pages/route/app_route.dart @@ -1,7 +1,7 @@ import 'package:alexander/pages/auth_sample_page.dart'; import 'package:alexander/pages/counter_page.dart'; import 'package:alexander/pages/default_page.dart'; -import 'package:alexander/pages/homemenu/home_menu.dart'; +import 'package:alexander/pages/home_menu.dart'; import 'package:alexander/pages/home_sample_page.dart'; import 'package:alexander/pages/index_page.dart'; import 'package:alexander/pages/infinity_scroll_page.dart'; diff --git a/lib/pages/sign_up_page.dart b/lib/pages/sign_up_page.dart index 6b61852..e46f19d 100644 --- a/lib/pages/sign_up_page.dart +++ b/lib/pages/sign_up_page.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:gap/gap.dart'; import 'common/alexander_text_field.dart'; import 'common/sign_button.dart'; -import 'homemenu/home_menu.dart'; +import 'home_menu.dart'; class SignUpPage extends StatefulWidget { const SignUpPage({Key? key}) : super(key: key);