Skip to content

Commit

Permalink
dashboard home page
Browse files Browse the repository at this point in the history
  • Loading branch information
CoderNamedHendrick committed Sep 10, 2024
1 parent b6d190d commit 4507c53
Show file tree
Hide file tree
Showing 21 changed files with 707 additions and 36 deletions.
1 change: 1 addition & 0 deletions packages/cave/lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ abstract class Constants {

static const horizontalMargin = 24.0;
static const horizontalGutter = 8.0;
static const largeHorizontalGutter = 16.0;
static const largeVerticalGutter = 24.0;
static const verticalGutter = 16.0;
static const smallVerticalGutter = 8.0;
Expand Down
3 changes: 3 additions & 0 deletions packages/cave/lib/themes/colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ abstract class DevfestColors {
static const gradientGradient =
LinearGradient(colors: [Color(0xffc471ed), Color(0xff12c2e9)]);

static const inverseGradientGradient =
LinearGradient(colors: [Color(0xff12c2e9), Color(0xffc471ed)]);

static const Color grey10 = Color(0xff0a0a0a);

static const Color grey20 = Color(0xff1d1d1d);
Expand Down
8 changes: 8 additions & 0 deletions packages/conferenceapp/assets/svgs/Google.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion packages/conferenceapp/lib/conference_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ class _ConferenceAppState extends ConsumerState<ConferenceApp> {
return MaterialApp.router(
title: 'Devfest24 Conference App',
routerConfig: Devfest2024Router.instance.router,
builder: (context, child) => AccessibilityTools(child: child),
builder: (context, child) => AccessibilityTools(
minimumTapAreas: const MinimumTapAreas(mobile: 30, desktop: 44),
checkFontOverflows: true,
child: child,
),
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.deepPurple,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,23 @@ class _ViewState extends State<_View> {
items: const [
DevfestBottomNavItem(
label: 'Home',
icon: Icon(Icons.home),
icon: Icon(IconsaxOutline.home_2),
),
DevfestBottomNavItem(
label: 'Schedule',
icon: Icon(Icons.home),
icon: Icon(IconsaxOutline.calendar_1),
),
DevfestBottomNavItem(
label: 'Speakers',
icon: Icon(Icons.home),
icon: Icon(IconsaxOutline.microphone),
),
DevfestBottomNavItem(
label: 'Reserve',
icon: Icon(Icons.home),
icon: Icon(IconsaxOutline.ticket),
),
DevfestBottomNavItem(
label: 'More',
icon: Icon(Icons.home),
icon: Icon(IconsaxOutline.more_square),
),
],
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,37 @@ class _HomeScreenState extends State<HomeScreen> {
onFilterSelected: () {},
),
),
SliverList.separated(
itemCount: 2,
itemBuilder: (context, index) => AgendaScheduleTile(
onTap: () {},
),
separatorBuilder: (context, _) =>
Constants.smallVerticalGutter.verticalSpace,
),
SliverToBoxAdapter(
child: Container(
color: Colors.green,
height: 500,
child: Padding(
padding:
const EdgeInsets.only(top: Constants.verticalGutter).h,
child: InkWell(
onTap: () {},
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: Constants.smallVerticalGutter)
.r,
child: const Center(
child: IconText(
Icons.arrow_forward,
'View All Schedules',
alignment: IconTextAlignment.right,
),
),
),
),
),
),
SliverToBoxAdapter(
child: Constants.verticalGutter.verticalSpace),
],
),
SliverMainAxisGroup(
Expand All @@ -61,12 +86,55 @@ class _HomeScreenState extends State<HomeScreen> {
onEventDayChanged: (day) {},
),
),
SliverList.separated(
itemCount: 2,
itemBuilder: (context, index) => AgentTalkTile(
onTap: () {},
),
separatorBuilder: (context, _) =>
Constants.smallVerticalGutter.verticalSpace,
),
SliverToBoxAdapter(
child: Container(
color: Colors.pink,
height: 800,
child: Padding(
padding:
const EdgeInsets.only(top: Constants.verticalGutter).h,
child: InkWell(
onTap: () {},
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: Constants.smallVerticalGutter)
.r,
child: const Center(
child: IconText(
Icons.arrow_forward,
'View All Talks',
alignment: IconTextAlignment.right,
),
),
),
),
),
),
SliverToBoxAdapter(
child: Constants.verticalGutter.verticalSpace),
],
),
SliverMainAxisGroup(
slivers: [
const PinnedHeaderSliver(
child: HomeAgendaHeader(
title: Text('🥺 Sponsors'),
),
),
SliverList.separated(
itemCount: 4,
itemBuilder: (context, index) =>
const ConferenceSponsorTile(),
separatorBuilder: (context, _) =>
Constants.smallVerticalGutter.verticalSpace,
),
SliverToBoxAdapter(
child: Constants.verticalGutter.verticalSpace),
],
),
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
import 'package:cave/cave.dart';
import 'package:cave/constants.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:intl/intl.dart';

import '../../../../shared/shared.dart';

class AgentTalkTile extends StatelessWidget {
const AgentTalkTile({super.key, this.onTap});

final VoidCallback? onTap;

@override
Widget build(BuildContext context) {
final dateFormat = DateFormat('hh:mm a');
return Material(
shape: RoundedRectangleBorder(
borderRadius: const BorderRadius.all(
Radius.circular(Constants.verticalGutter),
),
side: BorderSide(
color: DevfestColors.grey70.possibleDarkVariant,
width: 2,
),
),
child: InkWell(
onTap: onTap,
customBorder: RoundedRectangleBorder(
borderRadius: const BorderRadius.all(
Radius.circular(Constants.verticalGutter),
),
side: BorderSide(
color: DevfestColors.grey70.possibleDarkVariant,
width: 2,
),
),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: Constants.largeHorizontalGutter, vertical: 14)
.r,
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'mobile development'.toUpperCase(),
style: DevfestTheme.of(context)
.textTheme
?.bodyBody3Medium
?.medium
.applyColor(DevfestColors.grey60.possibleDarkVariant),
),
FavouriteIcon(
onTap: () {},
),
],
),
Constants.verticalGutter.verticalSpace,
Text(
'Appreciating the usefulness of football memes in decoding intent',
style: DevfestTheme.of(context)
.textTheme
?.bodyBody1Semibold
?.semi
.applyColor(DevfestColors.grey10.possibleDarkVariant),
),
Constants.smallVerticalGutter.verticalSpace,
Text(
'Celebrate the women tech makers at their annual breakfast',
style: DevfestTheme.of(context)
.textTheme
?.bodyBody2Medium
?.semi
.applyColor(DevfestColors.grey50.possibleDarkVariant),
),
Constants.verticalGutter.verticalSpace,
const SpeakerInfo(
name: 'Samuel Abada',
shortBio: 'Flutter Engineer, Tesla',
avatarUrl: '',
),
Constants.verticalGutter.verticalSpace,
Row(
children: [
IconText(
IconsaxOutline.clock,
dateFormat.format(DateTime.now()),
),
Constants.largeHorizontalGutter.horizontalSpace,
const IconText(IconsaxOutline.location, 'Hall A')
],
),
],
),
),
),
);
}
}

class SpeakerInfo extends StatelessWidget {
const SpeakerInfo({
super.key,
this.avatarUrl = '',
required this.name,
required this.shortBio,
});

final String name;
final String shortBio;
final String avatarUrl;

@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
const Material(
color: DevfestColors.primariesGreen80,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(Constants.smallVerticalGutter),
),
side: BorderSide(color: DevfestColors.primariesBlue50, width: 2),
),
child: Padding(
padding: EdgeInsets.all(2),
child: FlutterLogo(size: 48),
),
),
Constants.horizontalGutter.horizontalSpace,
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
name,
style:
DevfestTheme.of(context).textTheme?.bodyBody1Semibold?.semi,
),
(Constants.smallVerticalGutter / 2).verticalSpace,
Text(
shortBio,
style: DevfestTheme.of(context)
.textTheme
?.bodyBody3Medium
?.medium
.applyColor(DevfestColors.grey50.possibleDarkVariant),
),
],
),
),
],
);
}
}

class FavouriteIcon extends StatelessWidget {
const FavouriteIcon({super.key, this.isFavourite = false, this.onTap});

final bool isFavourite;
final VoidCallback? onTap;

@override
Widget build(BuildContext context) {
return Semantics.fromProperties(
properties: SemanticsProperties(
label: isFavourite ? 'Remove from favourites' : 'Add to favourites',
),
child: Material(
borderRadius: const BorderRadius.all(
Radius.circular(Constants.smallVerticalGutter)),
color: DevfestColors.primariesYellow90.possibleDarkVariant,
child: InkWell(
onTap: onTap,
borderRadius: const BorderRadius.all(
Radius.circular(Constants.smallVerticalGutter)),
child: Padding(
padding: const EdgeInsets.all(Constants.largeVerticalGutter / 4).r,
child: Icon(
isFavourite ? IconsaxBold.star : IconsaxOutline.star,
color: DevfestColors.grey50.possibleDarkVariant,
),
),
),
),
);
}
}
Loading

0 comments on commit 4507c53

Please sign in to comment.