diff --git a/images/help.svg b/images/help.svg deleted file mode 100644 index 91b8004391..0000000000 --- a/images/help.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/lib/domain/calendar/calendar_page.dart b/lib/domain/calendar/calendar_page.dart index 528395770e..ef8b7c2208 100644 --- a/lib/domain/calendar/calendar_page.dart +++ b/lib/domain/calendar/calendar_page.dart @@ -1,14 +1,12 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:pilll/analytics.dart'; -import 'package:pilll/components/atoms/buttons.dart'; import 'package:pilll/components/molecules/indicator.dart'; import 'package:pilll/domain/calendar/calendar_state.dart'; import 'package:pilll/domain/calendar/components/calendar_card.dart'; import 'package:pilll/components/atoms/color.dart'; import 'package:pilll/components/atoms/font.dart'; import 'package:pilll/components/atoms/text_color.dart'; -import 'package:pilll/domain/calendar/components/calendar_help.dart'; import 'package:pilll/domain/calendar/components/pill_sheet_modified_history/pill_sheet_modified_history_card.dart'; import 'package:pilll/domain/home/home_page.dart'; import 'package:pilll/domain/calendar/calendar_store.dart'; @@ -37,20 +35,6 @@ class CalendarPage extends HookWidget { return Scaffold( backgroundColor: PilllColors.background, appBar: AppBar( - leading: Container(), - actions: [ - IconButton( - icon: SvgPicture.asset("images/help.svg"), - onPressed: () { - analytics.logEvent(name: "pressed_calendar_help"); - showDialog( - context: context, - builder: (_) { - return CalendarHelpPage(); - }); - }, - ), - ], title: CalendarModifyMonth( state: state, itemScrollController: itemScrollController, diff --git a/lib/domain/calendar/components/calendar_help.dart b/lib/domain/calendar/components/calendar_help.dart deleted file mode 100644 index 64f8fd230f..0000000000 --- a/lib/domain/calendar/components/calendar_help.dart +++ /dev/null @@ -1,126 +0,0 @@ -import 'package:pilll/components/atoms/buttons.dart'; -import 'package:pilll/components/atoms/color.dart'; -import 'package:pilll/components/atoms/font.dart'; -import 'package:pilll/components/atoms/text_color.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; - -enum CalendarHelpPageRow { - menstruation, - nextPillSheet, - recordExists, - sex, - // hospital -} - -extension CalendarHelpPageRowFunctions on CalendarHelpPageRow { - SvgPicture icon() { - switch (this) { - case CalendarHelpPageRow.menstruation: - return SvgPicture.asset( - "images/rectangle.svg", - color: PilllColors.menstruation, - ); - case CalendarHelpPageRow.nextPillSheet: - return SvgPicture.asset( - "images/rectangle.svg", - color: PilllColors.duration, - ); - case CalendarHelpPageRow.recordExists: - return SvgPicture.asset( - "images/oval.svg", - ); - case CalendarHelpPageRow.sex: - return SvgPicture.asset( - "images/heart.svg", - ); - // case CalendarHelpPageRow.hospital: - // return SvgPicture.asset( - // "images/hospital.svg", - // ); - default: - throw ArgumentError.notNull(""); - } - } - - Widget title() { - switch (this) { - case CalendarHelpPageRow.menstruation: - return Text( - "生理期間", - style: FontType.helpRow.merge(TextColorStyle.lightGray2), - ); - case CalendarHelpPageRow.nextPillSheet: - return Text( - "新しいシート開始", - style: FontType.helpRow.merge(TextColorStyle.lightGray2), - ); - case CalendarHelpPageRow.recordExists: - return Text( - "記録", - style: FontType.helpRow.merge(TextColorStyle.lightGray2), - ); - case CalendarHelpPageRow.sex: - return Text( - "SEX", - style: FontType.helpRow.merge(TextColorStyle.lightGray2), - ); - // case CalendarHelpPageRow.hospital: - // return Text( - // "来院予定日", - // style: FontType.row.merge(TextColorStyle.lightGray2), - // ); - default: - throw ArgumentError.notNull(""); - } - } -} - -class CalendarHelpPage extends StatelessWidget { - @override - Widget build(BuildContext context) { - return AlertDialog( - title: Text( - "アイコンの説明", - style: FontType.subTitle.merge(TextColorStyle.black), - ), - content: Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - ...CalendarHelpPageRow.values.map((e) { - return Column( - children: [ - SizedBox(height: 16), - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - ConstrainedBox( - constraints: BoxConstraints.expand( - width: 40, - height: 12, - ), - child: Center( - child: e.icon(), - ), - ), - SizedBox(width: 16), - e.title(), - ], - ), - ], - ); - }), - ], - ), - actions: [ - SecondaryButton( - text: "閉じる", - onPressed: () { - Navigator.of(context).pop(); - }, - ), - ], - ); - } -}