Skip to content

Commit

Permalink
feat: Implement screen transition to Session Details
Browse files Browse the repository at this point in the history
  • Loading branch information
blendthink committed Oct 3, 2023
1 parent 46ad962 commit 69ab973
Showing 1 changed file with 51 additions and 34 deletions.
85 changes: 51 additions & 34 deletions lib/features/session/ui/list/sessions_table_card.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import 'package:confwebsite2023/app/router/router.dart';
import 'package:confwebsite2023/core/theme.dart';
import 'package:confwebsite2023/features/session/data/session.dart';
import 'package:confwebsite2023/features/session/data/speaker.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

const _cartPadding = EdgeInsets.all(16);
final _cardBorderRadius = BorderRadius.circular(12);
const _circleAvatarRadius = 16.0;

final class SessionsTableCard extends StatelessWidget {
const SessionsTableCard(this._session, {super.key});

Expand All @@ -28,13 +33,10 @@ final class SessionsTableCard extends StatelessWidget {
elevation: 0,
margin: EdgeInsets.zero,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
borderRadius: _cardBorderRadius,
),
color: theme.colorScheme.secondaryContainer,
child: Padding(
padding: const EdgeInsets.all(16),
child: content,
),
child: content,
);
}
}
Expand Down Expand Up @@ -65,7 +67,7 @@ final class _TimeslotCardContent extends StatelessWidget {
Row(
children: [
CircleAvatar(
radius: 16,
radius: _circleAvatarRadius,
backgroundImage: NetworkImage(speaker.avatarUrl),
),
Spaces.horizontal_8,
Expand Down Expand Up @@ -94,14 +96,17 @@ final class _TimeslotCardContent extends StatelessWidget {
),
);

return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
title,
profileBody,
Spaces.vertical_16,
timeText,
],
return Padding(
padding: _cartPadding,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
title,
profileBody,
Spaces.vertical_16,
timeText,
],
),
);
}
}
Expand Down Expand Up @@ -149,7 +154,7 @@ final class _TalkCardContent extends StatelessWidget {
final profileBody = Row(
children: [
CircleAvatar(
radius: 16,
radius: _circleAvatarRadius,
backgroundImage: NetworkImage(_talk.speaker.avatarUrl),
),
Spaces.horizontal_8,
Expand All @@ -173,17 +178,26 @@ final class _TalkCardContent extends StatelessWidget {
),
);

return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
trackChip,
Spaces.vertical_8,
title,
Spaces.vertical_8,
profileBody,
Spaces.vertical_16,
timeText,
],
return InkWell(
borderRadius: _cardBorderRadius,
onTap: () {
SessionPageRoute(id: _talk.uuid).go(context);
},
child: Padding(
padding: _cartPadding,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
trackChip,
Spaces.vertical_8,
title,
Spaces.vertical_8,
profileBody,
Spaces.vertical_16,
timeText,
],
),
),
);
}
}
Expand All @@ -193,14 +207,17 @@ final class _LunchCardContent extends StatelessWidget {

@override
Widget build(BuildContext context) {
return Center(
child: Text(
'Lunch Time',
style: GoogleFonts.poppins(
fontSize: 36,
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w600,
height: 1.22,
return Padding(
padding: _cartPadding,
child: Center(
child: Text(
'Lunch Time',
style: GoogleFonts.poppins(
fontSize: 36,
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w600,
height: 1.22,
),
),
),
);
Expand Down

0 comments on commit 69ab973

Please sign in to comment.