Skip to content

Commit

Permalink
Merge pull request #212 from FlutterKaigi/feature/finish_10_27
Browse files Browse the repository at this point in the history
10/27以降の開催終了後の設計・実装
  • Loading branch information
blendthink authored Oct 26, 2023
2 parents 7cc758c + 1d67136 commit 5ccbe61
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 67 deletions.
16 changes: 0 additions & 16 deletions lib/app/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import 'package:confwebsite2023/features/news/ui/news_section.dart';
import 'package:confwebsite2023/features/sponsor/ui/list/sponsors_section.dart';
import 'package:confwebsite2023/features/staff/ui/staff_header.dart';
import 'package:confwebsite2023/features/staff/ui/staff_table.dart';
import 'package:confwebsite2023/features/ticket/ui/ticket_section.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
Expand All @@ -33,7 +32,6 @@ class MainPage extends HookWidget {
const sectionKeys = (
access: GlobalObjectKey('accessSectionKey'),
event: GlobalObjectKey('eventSectionKey'),
ticket: GlobalObjectKey('ticketSectionKey'),
session: GlobalObjectKey('sessionSectionKey'),
announcement: GlobalObjectKey('announcementSectionKey'),
sponsor: GlobalObjectKey('sponsorSectionKey'),
Expand All @@ -59,10 +57,6 @@ class MainPage extends HookWidget {
title: 'Access',
onPressed: () async => scrollToSection(sectionKeys.access),
),
HeaderItemButtonData(
title: 'Ticket',
onPressed: () async => scrollToSection(sectionKeys.ticket),
),
HeaderItemButtonData(
title: 'Event',
onPressed: () async => scrollToSection(sectionKeys.event),
Expand Down Expand Up @@ -117,7 +111,6 @@ class _MainPageBody extends StatelessWidget {
final ({
GlobalObjectKey access,
GlobalObjectKey event,
GlobalObjectKey ticket,
GlobalObjectKey session,
GlobalObjectKey announcement,
GlobalObjectKey sponsor,
Expand Down Expand Up @@ -208,15 +201,6 @@ class _MainPageBody extends StatelessWidget {
const SliverToBoxAdapter(
child: Spaces.vertical_200,
),
_Sliver(
padding: padding,
child: TicketSection(
key: sectionKeys.ticket,
),
),
const SliverToBoxAdapter(
child: Spaces.vertical_200,
),
_Sliver(
padding: padding,
child: HandsOnEvent(
Expand Down
3 changes: 3 additions & 0 deletions lib/core/components/left_filled_icon_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,22 @@ class LeftFilledIconButton extends StatelessWidget {
required this.onPressed,
required this.buttonTitle,
required this.icon,
this.width,
super.key,
});

final void Function() onPressed;
final String buttonTitle;
final IconData icon;
final double? width;

@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final textTheme = theme.textTheme;
final colorScheme = theme.colorScheme;
return SizedBox(
width: width,
height: 40,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
Expand Down
80 changes: 58 additions & 22 deletions lib/core/components/wanted.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ class WantedWidget extends StatelessWidget {
const WantedWidget({
required this.title,
required this.content,
required this.buttonTitle,
required this.onPressed,
required this.ticketButtonTitle,
required this.ticketOnPressed,
required this.archiveButtonTitle,
required this.archiveOnPressed,
this.child,
this.image,
this.subContent,
Expand All @@ -22,9 +24,11 @@ class WantedWidget extends StatelessWidget {
final String content;
final String? subContent;
final Widget? child;
final String buttonTitle;
final String ticketButtonTitle;
final VoidCallback ticketOnPressed;
final String archiveButtonTitle;
final VoidCallback archiveOnPressed;
final String? image;
final VoidCallback onPressed;

@override
Widget build(BuildContext context) {
Expand All @@ -33,18 +37,22 @@ class WantedWidget extends StatelessWidget {
title: title,
content: content,
subContent: subContent,
buttonTitle: buttonTitle,
image: image,
onPressed: onPressed,
ticketButtonTitle: ticketButtonTitle,
ticketOnPressed: ticketOnPressed,
archiveButtonTitle: archiveButtonTitle,
archiveOnPressed: archiveOnPressed,
child: child,
),
smallWidget: _WantedMobile(
title: title,
content: content,
subContent: subContent,
buttonTitle: buttonTitle,
image: image,
onPressed: onPressed,
ticketButtonTitle: ticketButtonTitle,
ticketOnPressed: ticketOnPressed,
archiveButtonTitle: archiveButtonTitle,
archiveOnPressed: archiveOnPressed,
child: child,
),
);
Expand All @@ -56,19 +64,23 @@ class _WantedDesktop extends StatelessWidget {
required this.title,
required this.content,
required this.subContent,
required this.buttonTitle,
required this.image,
required this.onPressed,
required this.ticketButtonTitle,
required this.ticketOnPressed,
required this.archiveButtonTitle,
required this.archiveOnPressed,
this.child,
});

final String title;
final String content;
final String? subContent;
final String buttonTitle;
final Widget? child;
final String? image;
final VoidCallback onPressed;
final String ticketButtonTitle;
final VoidCallback ticketOnPressed;
final String archiveButtonTitle;
final VoidCallback archiveOnPressed;

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -117,10 +129,22 @@ class _WantedDesktop extends StatelessWidget {
child!,
Spaces.vertical_24,
],
LeftFilledIconButton(
onPressed: onPressed,
buttonTitle: buttonTitle,
icon: Icons.arrow_forward_ios,
FittedBox(
child: Row(
children: [
LeftFilledIconButton(
onPressed: ticketOnPressed,
buttonTitle: ticketButtonTitle,
icon: Icons.arrow_forward_ios,
),
Spaces.horizontal_40,
LeftFilledIconButton(
onPressed: archiveOnPressed,
buttonTitle: archiveButtonTitle,
icon: Icons.arrow_forward_ios,
),
],
),
),
],
),
Expand All @@ -147,19 +171,23 @@ class _WantedMobile extends StatelessWidget {
required this.title,
required this.content,
required this.subContent,
required this.buttonTitle,
required this.image,
required this.onPressed,
required this.ticketButtonTitle,
required this.ticketOnPressed,
required this.archiveButtonTitle,
required this.archiveOnPressed,
this.child,
});

final String title;
final String content;
final String? subContent;
final String buttonTitle;
final String? image;
final Widget? child;
final VoidCallback onPressed;
final String ticketButtonTitle;
final VoidCallback ticketOnPressed;
final String archiveButtonTitle;
final VoidCallback archiveOnPressed;

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -204,8 +232,16 @@ class _WantedMobile extends StatelessWidget {
Spaces.vertical_24,
],
LeftFilledIconButton(
onPressed: onPressed,
buttonTitle: buttonTitle,
width: double.infinity,
onPressed: ticketOnPressed,
buttonTitle: ticketButtonTitle,
icon: Icons.arrow_forward_ios,
),
Spaces.vertical_24,
LeftFilledIconButton(
width: double.infinity,
onPressed: archiveOnPressed,
buttonTitle: archiveButtonTitle,
icon: Icons.arrow_forward_ios,
),
],
Expand Down
14 changes: 9 additions & 5 deletions lib/features/event/hands-on/ui/hands_on_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,20 @@ class HandsOnEvent extends StatelessWidget {
Widget build(BuildContext context) {
const text =
// ignore: lines_longer_than_80_chars
'今年のハンズオンでは、三目並べの制作を通してriverpodを学べることを目指します。また、そのチャレンジ企画として Firebase を利用したリアルタイム対戦機能も計画しています。現在、スタッフ一丸となってその準備に励んでおりますので、開催当日まで暫しお待ちいただければと思います。\n'
'なお、開催日は昨年と違い本編とは別日の10/26に開催予定ですので、こちらも合わせてご留意ください。';
'今年のハンズオンは10月26日をもって終了しました。多くの皆様にご参加いただき誠にありがとうございました。FlutterKaigi本編にもご参加される方には先着15名の限定ノベルティを用意しております。ノベルティの配布は、受付とは別に会場内に設置した専用のコーナーで行いますのでご注意ください。';
return WantedWidget(
title: 'Join the hands-on event!',
buttonTitle: 'イベント詳細',
title: 'Have a blast!',
ticketButtonTitle: 'イベント詳細ページ',
content: text,
onPressed: () async => launchUrlString(
ticketOnPressed: () async => launchUrlString(
'https://flutterkaigi.connpass.com/event/293847/',
mode: LaunchMode.externalApplication,
),
archiveButtonTitle: 'アーカイブはこちら',
archiveOnPressed: () async => launchUrlString(
'https://www.youtube.com/watch?v=Kj-3UcIZc4Y',
mode: LaunchMode.externalApplication,
),
image: Assets.illustrationConference,
child: const _HandsOnStaffsIcon(),
);
Expand Down
24 changes: 0 additions & 24 deletions lib/features/ticket/ui/ticket_section.dart

This file was deleted.

0 comments on commit 5ccbe61

Please sign in to comment.