diff --git a/fonts/WebIconApp.ttf b/fonts/WebIconApp.ttf index 793dc3a..28ee54a 100644 Binary files a/fonts/WebIconApp.ttf and b/fonts/WebIconApp.ttf differ diff --git a/fonts/config.json b/fonts/config.json index d42b3bb..0963841 100644 --- a/fonts/config.json +++ b/fonts/config.json @@ -53,6 +53,34 @@ "css": "google-1", "code": 59393, "src": "fontawesome5" + }, + { + "uid": "566920198e655519b389880458f4a939", + "css": "mandara", + "code": 59394, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M52.6 93.7A93.7 93.7 0 0 1 146.3 0H957.9A93.7 93.7 0 0 1 1051.6 93.7V905.3A93.7 93.7 0 0 1 957.9 998.9H146.3A93.7 93.7 0 0 1 52.6 905.3ZM146.3 62.5A31.2 31.2 0 0 0 115.1 93.7V312.2H364.8V62.4ZM364.8 374.7H115.1V624.5H364.8ZM427.3 624.5V374.7H677.1V624.5ZM364.8 686.9H115.1V905.3A31.2 31.2 0 0 0 146.3 936.5H364.8ZM427.3 686.9H677.1V936.8H427.3ZM739.5 686.9V936.8H957.9A31.2 31.2 0 0 0 989.5 905.3V686.9ZM739.5 624.5H989.5V374.7H739.5ZM739.5 312.3H989.5V93.7A31.2 31.2 0 0 0 958.3 62.5H739.5ZM677.1 312.3H427.3V62.4H677.1Z", + "width": 1053 + }, + "search": [ + "mandara" + ] + }, + { + "uid": "ac26eb40cae0a9602c05fa62fa6cb5b5", + "css": "mix", + "code": 59395, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M139.7 521.6H105.2A105.3 105.3 0 0 1 0 416.3V105.2A105.3 105.3 0 0 1 105.2 0H416.3A105.3 105.3 0 0 1 521.6 105.2V139.7A36 36 0 0 1 449.5 139.7V105.2A33.1 33.1 0 0 0 416.4 72H105.2A33.1 33.1 0 0 0 72 105.2V416.3A33.1 33.1 0 0 0 105.2 449.4H139.7A36 36 0 0 1 139.7 521.5ZM454.6 621.1A35.9 35.9 0 0 1 429.2 610.6 36 36 0 0 1 429.2 559.6L573.3 415.4A36 36 0 0 1 624.2 415.4 36 36 0 0 1 624.2 466.4L480.1 610.5A35.9 35.9 0 0 1 454.6 621.1ZM598.8 621.1A35.9 35.9 0 0 1 573.3 610.6L429.2 466.4A36 36 0 0 1 429.2 415.4 36 36 0 0 1 480.1 415.4L624.3 559.5A36 36 0 0 1 598.8 621ZM865.6 478.6H900.2A105.3 105.3 0 0 1 1005.4 583.7V894.8A105.3 105.3 0 0 1 900.2 1000H589.1A105.3 105.3 0 0 1 484 894.8L484 860.3A36 36 0 1 1 556.1 860.3V894.8A33.1 33.1 0 0 0 589.2 928H900.2A33.1 33.1 0 0 0 933.4 894.8L933.4 583.7A33.1 33.1 0 0 0 900.2 550.6L865.7 550.6A36 36 0 1 1 865.7 478.5Z", + "width": 1048 + }, + "search": [ + "mix-(1)" + ] } ] } \ No newline at end of file diff --git a/lib/addIcon/web_icon_app_icons.dart b/lib/addIcon/web_icon_app_icons.dart index 0153d38..4534db9 100644 --- a/lib/addIcon/web_icon_app_icons.dart +++ b/lib/addIcon/web_icon_app_icons.dart @@ -35,6 +35,8 @@ class WebIconApp { static const IconData keyboardarrowdown = IconData(0xe800, fontFamily: _kFontFam); static const IconData google_1 = IconData(0xe801, fontFamily: _kFontFam); + static const IconData mandara = IconData(0xe802, fontFamily: _kFontFam); + static const IconData mix = IconData(0xe803, fontFamily: _kFontFam); static const IconData favoriteborder = IconData(0xe91e, fontFamily: _kFontFam); static const IconData share = IconData(0xeaee, fontFamily: _kFontFam); diff --git a/lib/pages/accordion_button.dart b/lib/pages/accordion_button.dart new file mode 100644 index 0000000..8c97986 --- /dev/null +++ b/lib/pages/accordion_button.dart @@ -0,0 +1,97 @@ +import 'package:alexander/pages/theme/palette.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class AccordionIconButton extends StatefulWidget { + final double _iconSize; + final String _label; + final double _maxWidth; + + const AccordionIconButton( + {Key? key, + required double iconSize, + required String label, + required double maxWidth}) + : _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); + + 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 448e039..75e85b2 100644 --- a/lib/pages/home_menu.dart +++ b/lib/pages/home_menu.dart @@ -1,11 +1,10 @@ import 'dart:ui'; -import 'package:alexander/addIcon/web_icon_app_icons.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/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/userinfo.dart'; +import 'package:alexander/pages/homemenu/userinfo.dart'; import 'package:flutter/material.dart'; class HomePage extends StatefulWidget { @@ -25,9 +24,6 @@ class _HomePageState extends State { //画面サイズを取得 final Size size = MediaQuery.of(context).size; const sharecheck = true; //共有しているかしていないかのチェック - - //タグの管理 - final List menugenre = ['ジャンル1', 'ジャンル2']; return Scaffold( body: SingleChildScrollView( child: Row( @@ -35,7 +31,7 @@ class _HomePageState extends State { children: [ Column( children: [ - const Userinfo(), + const UserInfo(), const Notemenu(), ], ), @@ -48,7 +44,7 @@ class _HomePageState extends State { //メインメニューのウィジェット Container( width: 1160, - height: size.height - 100, + height: size.height - 80, color: Palette.bgContentsNormalColor, child: Column( children: [ @@ -65,201 +61,13 @@ class _HomePageState extends State { //アイデア追加ボタン const Padding( padding: EdgeInsets.only(right: 120), - child: Tidybutton(), + 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: 276, - 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: 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, - ), - ), - ], - ), - ), - ), - ], - ), - ), - //メインテキスト - Flexible( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - //タグ一覧 - Row( - children: [ - Padding( - padding: - const EdgeInsets - .only( - left: 56, - top: 25), - child: 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, - ), - ), - Padding( - padding: const EdgeInsets - .only( - left: 7, - right: - 7, - bottom: - 5), - child: Text( - menugenre[ - index], - style: const TextStyle( - fontSize: - 12, - color: - Palette.titleTextColor), - ), - ), - ], - ); - }, - ), - ), - ), - //下記にタグ追加のプラスボタンを配置 - ], - ), - //テキスト文 - const Padding( - padding: EdgeInsets.only( - left: 56, top: 25), - child: - SingleChildScrollView( - child: Text( - 'サンプルサンプルサンプルサンプルサンプル', - softWrap: true, - maxLines: 4, - overflow: TextOverflow - .ellipsis, - ), - ), - ), - //マンダラボタンなどの表示 - const SelectChangeButton(), - ], - ), - ), - ], - ), - ), - ], - ), - ), - ], - ), - ), - ), - ), + //メインホーム + const Mainhome(), ], ), ), @@ -276,5 +84,3 @@ class _HomePageState extends State { noteName.add('ノート'); } } - -class Fruits {} 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/homemenu/mainmenu_selectedbutton.dart b/lib/pages/homemenu/mainmenu_selectedbutton.dart new file mode 100644 index 0000000..fc323df --- /dev/null +++ b/lib/pages/homemenu/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/homemenu/mainmenuserch.dart b/lib/pages/homemenu/mainmenuserch.dart new file mode 100644 index 0000000..703b93c --- /dev/null +++ b/lib/pages/homemenu/mainmenuserch.dart @@ -0,0 +1,140 @@ +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 Mainmenuserch extends StatelessWidget { + const Mainmenuserch({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return const SizedBox( + width: 437, + height: 32, + child: TextField( + textAlignVertical: TextAlignVertical.center, + decoration: InputDecoration( + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(20)), + borderSide: BorderSide( + color: Palette.borderColor, + ), + ), + prefixIcon: Icon(Icons.search), + hintText: '検索', + ), + ), + ); + } +} + +//チームを抜けるボタン +class Exitteambutton extends StatelessWidget { + const Exitteambutton({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(15), + child: Container( + alignment: Alignment.center, + width: 121, + height: 32, + decoration: BoxDecoration( + color: Palette.bgContentsColor, + // 角丸 + borderRadius: BorderRadius.circular(5), + ), + child: InkWell( + //ボタンのクリックイベント + onTap: () {}, + child: const Text( + 'チームを抜ける', + style: TextStyle(color: Palette.mainTextColor), + textAlign: TextAlign.center, + ), + ), + ), + ); + } +} + +//整理整頓ボタン表示 +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( + alignment: Alignment.center, + width: 178, + height: 32, + decoration: BoxDecoration( + color: Palette.inviteandborder, + // 角丸 + borderRadius: BorderRadius.circular(5), + ), + 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, + ), + ), + 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/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 96% rename from lib/pages/notemenuinfo.dart rename to lib/pages/homemenu/notemenuinfo.dart index c809053..e46280c 100644 --- a/lib/pages/notemenuinfo.dart +++ b/lib/pages/homemenu/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/selectchangebutton.dart b/lib/pages/homemenu/selectchangebutton.dart similarity index 92% rename from lib/pages/selectchangebutton.dart rename to lib/pages/homemenu/selectchangebutton.dart index 8bc45e9..f52bda1 100644 --- a/lib/pages/selectchangebutton.dart +++ b/lib/pages/homemenu/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/shareuserinfo.dart b/lib/pages/homemenu/shareuserinfo.dart similarity index 80% rename from lib/pages/shareuserinfo.dart rename to lib/pages/homemenu/shareuserinfo.dart index e7ccd5b..c4c89c5 100644 --- a/lib/pages/shareuserinfo.dart +++ b/lib/pages/homemenu/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,23 @@ 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( + iconSize: 30, + maxWidth: 100, + label: shereuser[index], ), - ), - Text( - shereuser[index], - style: const TextStyle( - fontSize: 20, color: Palette.titleTextColor), - ), - ], + ], + ), ); }, ), @@ -105,6 +100,7 @@ class Notshareuserinfo extends StatelessWidget { @override Widget build(BuildContext context) { + const String user = 'user1'; //非共有時のユーザー名 return SizedBox( width: 1160, height: 80, @@ -115,14 +111,10 @@ 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( + iconSize: 30, + maxWidth: 100, + label: user, ), //非共有中表示 Container( diff --git a/lib/pages/homemenu/userinfo.dart b/lib/pages/homemenu/userinfo.dart new file mode 100644 index 0000000..5fee944 --- /dev/null +++ b/lib/pages/homemenu/userinfo.dart @@ -0,0 +1,155 @@ +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 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, + child: Container( + color: Palette.bgContentsDarkColor, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + margin: const EdgeInsets.only(left: 24), + width: 32, + height: 32, + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Palette.loginleft, + ), + ), + Expanded( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(20), + child: Text( + username, + style: const TextStyle(fontSize: 12), + overflow: TextOverflow.ellipsis, + ), + ), + ), + ), + //押したらメニューが出るアイコンボックス + 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, + ), + ), + ], + ), + ), + ], + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/mainmenuserch.dart b/lib/pages/mainmenuserch.dart deleted file mode 100644 index 059b3b5..0000000 --- a/lib/pages/mainmenuserch.dart +++ /dev/null @@ -1,105 +0,0 @@ -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 Mainmenuserch extends StatelessWidget { - const Mainmenuserch({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return const SizedBox( - width: 437, - height: 32, - child: TextField( - textAlignVertical: TextAlignVertical.center, - decoration: InputDecoration( - border: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(20)), - borderSide: BorderSide( - color: Palette.borderColor, - ), - ), - prefixIcon: Icon(Icons.search), - hintText: '検索', - ), - ), - ); - } -} - -//チームを抜けるボタン -class Exitteambutton extends StatelessWidget { - const Exitteambutton({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.all(15), - child: Container( - alignment: Alignment.center, - width: 121, - height: 32, - decoration: BoxDecoration( - color: Palette.bgContentsColor, - // 角丸 - borderRadius: BorderRadius.circular(5), - ), - child: InkWell( - //ボタンのクリックイベント - onTap: () {}, - child: const Text( - 'チームを抜ける', - style: TextStyle(color: Palette.mainTextColor), - textAlign: TextAlign.center, - ), - ), - ), - ); - } -} - -//整理整頓ボタン表示 -class Tidybutton extends StatelessWidget { - const Tidybutton({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Container( - alignment: Alignment.center, - width: 178, - height: 32, - decoration: BoxDecoration( - color: Palette.inviteandborder, - // 角丸 - 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, - ), - ), - const Padding( - padding: EdgeInsets.only(top: 4), - child: Icon( - WebIconApp.keyboardarrowdown, - color: Palette.bgContentsLightColor, - ), - ), - ], - ), - ), - ); - } -} 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/userinfo.dart b/lib/pages/userinfo.dart deleted file mode 100644 index 969a32e..0000000 --- a/lib/pages/userinfo.dart +++ /dev/null @@ -1,57 +0,0 @@ -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 Userinfo extends StatelessWidget { - const Userinfo({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - //ホームメニューの左上(ユーザー情報が記載されているウィジェット) - return SizedBox( - width: 280, - height: 80, - child: Container( - color: Palette.bgContentsDarkColor, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - margin: const EdgeInsets.only(left: 24), - width: 32, - height: 32, - decoration: const BoxDecoration( - shape: BoxShape.circle, - color: Palette.loginleft, - ), - ), - const Expanded( - child: SingleChildScrollView( - child: Padding( - padding: EdgeInsets.all(20), - child: Text( - 'ユーザー名サンプルあああああ', - style: TextStyle(fontSize: 12), - overflow: TextOverflow.ellipsis, - ), - ), - ), - ), - //押したらメニューが出るアイコンボックス - Container( - margin: const EdgeInsets.only(right: 24), - child: InkWell( - onTap: () {}, - child: const Icon( - WebIconApp.keyboardarrowdown, - color: Palette.mainTextColor, - ), - ), - ), - ], - ), - ), - ); - } -}