import 'package:dartboard_resume/models/dartboard_data.dart'; import 'package:dartboard_resume/models/experience.dart'; import 'package:dartboard_resume/widgets/annotated_text.dart'; import 'package:pdf/pdf.dart'; import 'package:pdf/widgets.dart'; class ExperienceEntry extends StatelessWidget { ExperienceEntry({required this.dartboardData, required this.exp}); final DartboardData dartboardData; final Experience exp; @override Widget build(Context context) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Padding( padding: const EdgeInsets.only(left: 4.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(exp.title, style: dartboardData.subheaderTextStyle.apply(color: const PdfColorGrey(0.3))), Container(height: 1, width: 60, color: const PdfColorGrey(0.75)), ], ), ), Column( crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( exp.range.toString(), style: dartboardData.defaultTextStyle.copyWith(color: const PdfColorGrey(0.42), fontSize: 8.0), ), if (exp.location != null) Text( exp.location!, style: dartboardData.defaultTextStyle.copyWith(color: const PdfColorGrey(0.42), fontSize: 8.0), ), ], ), ], ), SizedBox(height: 6), ...exp.attributes.map( (a) => Padding( child: AnnotatedText( stringSections: a.toTextLinkList(), bulletString: dartboardData.dartboardTheme.bulletPoint, style: dartboardData.defaultTextStyle.apply( color: const PdfColorGrey(0.55), ), ), padding: const EdgeInsets.only(left: 8.0, bottom: 4.0), ), ), SizedBox(height: 12), ], ); } }