From 2f6b6adc2ca68a4e206cc5be898fc6caa1bea877 Mon Sep 17 00:00:00 2001 From: bannzai Date: Wed, 27 Oct 2021 02:12:30 +0900 Subject: [PATCH] :recycle: remove unnecessary widget --- .../calendar/components/calendar_help.dart | 126 ------------------ 1 file changed, 126 deletions(-) delete mode 100644 lib/domain/calendar/components/calendar_help.dart 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(); - }, - ), - ], - ); - } -}