Skip to content

Commit

Permalink
Merge pull request #168 from FlutterKaigi/improve/refactor-sponsorPla…
Browse files Browse the repository at this point in the history
…nHeader

スポンサープランヘッダー関連の変更
  • Loading branch information
tatsutakein authored Sep 22, 2023
2 parents 4201a27 + 7a669a7 commit 4c8936e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
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
File renamed without changes.
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

0 comments on commit 4c8936e

Please sign in to comment.