diff --git a/lib/features/sponsor/data/sponsor.dart b/lib/features/sponsor/data/sponsor.dart index 365a5d7f..8b499c6e 100644 --- a/lib/features/sponsor/data/sponsor.dart +++ b/lib/features/sponsor/data/sponsor.dart @@ -1,4 +1,4 @@ -import 'package:confwebsite2023/features/sponsor/data/sponsor_rank.dart'; +import 'package:confwebsite2023/features/sponsor/data/sponsor_plan.dart'; import 'package:confwebsite2023/features/sponsor/data/sponsor_session.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; diff --git a/lib/features/sponsor/data/sponsor_rank.dart b/lib/features/sponsor/data/sponsor_plan.dart similarity index 100% rename from lib/features/sponsor/data/sponsor_rank.dart rename to lib/features/sponsor/data/sponsor_plan.dart diff --git a/lib/features/sponsor/ui/sponsor_rank_header.dart b/lib/features/sponsor/ui/sponsor_plan_header.dart similarity index 59% rename from lib/features/sponsor/ui/sponsor_rank_header.dart rename to lib/features/sponsor/ui/sponsor_plan_header.dart index 40c4421d..1680aba2 100644 --- a/lib/features/sponsor/ui/sponsor_rank_header.dart +++ b/lib/features/sponsor/ui/sponsor_plan_header.dart @@ -1,36 +1,25 @@ import 'package:confwebsite2023/core/components/section_header.dart'; import 'package:confwebsite2023/core/theme.dart'; +import 'package:confwebsite2023/features/sponsor/data/sponsor_plan.dart'; import 'package:flutter/material.dart'; -final class SponsorRankHeader extends StatelessWidget { - SponsorRankHeader.platinum({ +/// スポンサープランのヘッダー +final class SponsorPlanHeader extends StatelessWidget { + SponsorPlanHeader({ required String text, required TextStyle style, + required SponsorPlan plan, }) : this._( text: text, style: style, - gradient: GradientConstant.sponsor.platinum, + gradient: switch (plan) { + SponsorPlan.platinum => GradientConstant.sponsor.platinum, + SponsorPlan.gold => GradientConstant.sponsor.gold, + SponsorPlan.silver => GradientConstant.sponsor.silver, + }, ); - SponsorRankHeader.gold({ - required String text, - required TextStyle style, - }) : this._( - text: text, - style: style, - gradient: GradientConstant.sponsor.gold, - ); - - SponsorRankHeader.silver({ - required String text, - required TextStyle style, - }) : this._( - text: text, - style: style, - gradient: GradientConstant.sponsor.silver, - ); - - SponsorRankHeader._({ + SponsorPlanHeader._({ required this.text, required TextStyle style, required this.gradient,