Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

スポンサープランヘッダー関連の変更 #168

Merged
merged 4 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/features/sponsor/data/sponsor.dart
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down