-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6d190d
commit 4507c53
Showing
21 changed files
with
707 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
193 changes: 193 additions & 0 deletions
193
packages/conferenceapp/lib/src/features/home/presentation/widgets/agent_talk_tile.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.