Created
June 8, 2025 06:04
-
-
Save ben953/c860b63dd74ccbf6b66a5f2c5eed29eb to your computer and use it in GitHub Desktop.
Sample
This file contains hidden or 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
import 'package:flutter/material.dart'; | |
import 'package:google_fonts/google_fonts.dart'; | |
final bool includeHeadshot = true; | |
typedef EducationEntry = ({ | |
String? degree, | |
String? dates, | |
String? school, | |
String? description, | |
}); | |
typedef WorkExperienceEntry = ({ | |
String? company, | |
String? location, | |
String? dates, | |
String? position, | |
String? description, // Assumed to be a multi-line string for bullet points | |
}); | |
typedef ContactInfo = ({ | |
String? phone, | |
String? address2, | |
String? address1, | |
String? lastName, | |
String? firstName, | |
String? email, | |
String? website, | |
List<({String? type, String? url})> socialLinks, | |
}); | |
typedef SimpleEntry = ({String? itemTitle, String? itemDescription}); | |
typedef AdditionalSectionEntry = ({ | |
String? sectionTitle, | |
List<SimpleEntry> content, | |
}); | |
typedef AdditionalExperienceItemEntry = ({ | |
String? title, | |
String? subtitle, | |
String? location, | |
String? dates, | |
String? description, | |
}); | |
typedef AdditionalExperienceSectionEntry = ({ | |
String? sectionTitle, | |
List<AdditionalExperienceItemEntry> content, | |
}); | |
class ResumeData { | |
final String? professionalHeadline; | |
final String? professionalSummary; | |
final List<EducationEntry> education; | |
final List<WorkExperienceEntry> work; | |
final ContactInfo contact; | |
final List<SimpleEntry> skills; | |
final List<AdditionalSectionEntry> additionalSimpleSections; | |
final List<AdditionalExperienceSectionEntry> additionalExperiences; | |
ResumeData({ | |
required this.professionalHeadline, | |
required this.professionalSummary, | |
required this.education, | |
required this.work, | |
required this.contact, | |
required this.skills, | |
required this.additionalSimpleSections, | |
required this.additionalExperiences, | |
}); | |
} | |
final sample = ResumeData( | |
professionalHeadline: 'Senior Software Engineer & Cloud Architect', | |
professionalSummary: | |
'Innovative senior software engineer with 8+ years of experience building scalable distributed systems and cloud-native applications. Expert in microservices architecture, cloud platforms (AWS/GCP), and machine learning engineering. Strong track record of leading engineering teams, mentoring developers, and delivering high-impact projects. Passionate about solving complex technical challenges and driving engineering excellence.', | |
education: [ | |
( | |
degree: 'Ph.D. in Computer Science', | |
dates: '2022 - Present', | |
school: 'Stanford University', | |
description: | |
'Research focus on distributed systems and cloud computing. Published 3 papers in top-tier conferences. Teaching assistant for Advanced Algorithms course.', | |
), | |
( | |
degree: 'M.S. Computer Science', | |
dates: '2020 - 2022', | |
school: 'University of Washington', | |
description: | |
'Specialized in machine learning and artificial intelligence. Completed thesis on neural network optimization techniques.', | |
), | |
( | |
degree: 'B.S. Computer Science', | |
dates: '2016 - 2020', | |
school: 'University of Michigan', | |
description: | |
'Graduated summa cum laude with 3.95 GPA. Led undergraduate research project on parallel computing algorithms.', | |
), | |
], | |
work: [ | |
( | |
description: | |
'Lead architect for cloud-native microservices platform serving millions of users. Designed and implemented scalable distributed systems using Kubernetes and AWS. Reduced infrastructure costs by 40% through optimization.\n\nManaged team of 8 engineers across 3 time zones. Established agile development practices and CI/CD pipelines that increased deployment frequency by 300%. Mentored junior developers and conducted technical interviews.', | |
company: 'Amazon Web Services', | |
location: 'Seattle, WA', | |
dates: '2022 - Present', | |
position: 'Senior Software Engineer', | |
), | |
( | |
description: | |
'Developed machine learning models for fraud detection that reduced fraudulent transactions by 60%. Built real-time data processing pipeline handling 10K+ events per second.\n\nLed migration from monolithic to microservices architecture, improving system reliability and reducing deployment time by 75%. Implemented comprehensive monitoring and alerting using Prometheus and Grafana.', | |
company: 'Stripe', | |
location: 'San Francisco, CA', | |
dates: '2020 - 2022', | |
position: 'Software Engineer', | |
), | |
( | |
description: | |
'Created React/Node.js web applications for enterprise clients. Implemented responsive UI components and RESTful APIs. Optimized database queries resulting in 40% performance improvement.\n\nCollaborated with product and design teams to deliver features on schedule. Conducted code reviews and maintained documentation. Mentored 2 junior developers.', | |
company: 'Microsoft', | |
location: 'Redmond, WA', | |
dates: '2018 - 2020', | |
position: 'Software Engineer', | |
), | |
( | |
description: | |
'Built full-stack web applications using Python/Django and React. Implemented automated testing suite that achieved 90% code coverage. Optimized front-end performance reducing load times by 50%.', | |
company: 'Tech Solutions Inc.', | |
location: 'Ann Arbor, MI', | |
dates: '2016 - 2018', | |
position: 'Software Engineer', | |
), | |
], | |
contact: ( | |
phone: '555-123-4567', | |
address2: 'Apt 4B', | |
address1: '123 Main St', | |
lastName: 'Doe', | |
firstName: 'John', | |
email: 'john.doe@example.com', | |
website: 'johndoe.dev', | |
socialLinks: [ | |
(type: 'LinkedIn', url: 'linkedin.com/in/johndoe'), | |
(type: 'GitHub', url: 'github.com/johndoe'), | |
], | |
), | |
skills: [ | |
( | |
itemTitle: 'Cloud Platforms', | |
itemDescription: 'AWS, Google Cloud Platform, Azure', | |
), | |
( | |
itemTitle: 'Programming Languages', | |
itemDescription: 'Python, Java, JavaScript, Go, C++', | |
), | |
( | |
itemTitle: 'Web Technologies', | |
itemDescription: 'React, Node.js, Django, GraphQL', | |
), | |
( | |
itemTitle: 'DevOps & Infrastructure', | |
itemDescription: 'Kubernetes, Docker, Terraform, Jenkins', | |
), | |
( | |
itemTitle: 'Databases', | |
itemDescription: 'PostgreSQL, MongoDB, Redis, Elasticsearch', | |
), | |
( | |
itemTitle: 'Machine Learning', | |
itemDescription: 'TensorFlow, PyTorch, Scikit-learn', | |
), | |
( | |
itemTitle: 'System Design', | |
itemDescription: 'Microservices, Distributed Systems', | |
), | |
(itemTitle: 'Development Practices', itemDescription: 'Agile, CI/CD, TDD'), | |
( | |
itemTitle: 'Team Leadership', | |
itemDescription: 'Technical Leadership, Mentoring', | |
), | |
( | |
itemTitle: 'Problem Solving', | |
itemDescription: 'Algorithm Design, Performance Optimization', | |
), | |
], | |
additionalSimpleSections: [ | |
( | |
sectionTitle: 'Awards & Recognition', | |
content: [ | |
(itemTitle: 'Dean\'s List', itemDescription: 'Spring 2021, Fall 2021'), | |
(itemTitle: 'Innovation Award', itemDescription: null), | |
( | |
itemTitle: 'Best Technical Solution', | |
itemDescription: 'Company Hackathon 2022', | |
), | |
( | |
itemTitle: 'Distinguished Engineer', | |
itemDescription: 'Microsoft 2019', | |
), | |
( | |
itemTitle: 'Top Contributor', | |
itemDescription: 'Open Source Community 2021', | |
), | |
], | |
), | |
( | |
sectionTitle: 'Publications', | |
content: [ | |
( | |
itemTitle: 'Scalable Machine Learning Systems', | |
itemDescription: 'IEEE Conference 2022', | |
), | |
( | |
itemTitle: 'Microservices Architecture Patterns', | |
itemDescription: 'ACM Journal 2021', | |
), | |
], | |
), | |
( | |
sectionTitle: 'Certifications', | |
content: [ | |
( | |
itemTitle: 'AWS Solutions Architect Professional', | |
itemDescription: '2022', | |
), | |
( | |
itemTitle: 'Google Cloud Professional Architect', | |
itemDescription: '2021', | |
), | |
(itemTitle: 'Kubernetes Administrator (CKA)', itemDescription: '2020'), | |
], | |
), | |
], | |
additionalExperiences: [ | |
( | |
sectionTitle: 'Projects', | |
content: [ | |
( | |
title: 'Distributed Machine Learning Platform', | |
subtitle: 'Open Source Project', | |
location: 'GitHub', | |
dates: '2021 - Present', | |
description: | |
'Created open-source platform for distributed ML training. 1000+ GitHub stars, 50+ contributors.', | |
), | |
( | |
title: 'Real-time Analytics Engine', | |
subtitle: 'Personal Project', | |
location: 'Seattle, WA', | |
dates: '2020', | |
description: | |
'Built scalable analytics engine processing 1M+ events/day using Kafka and Spark.', | |
), | |
], | |
), | |
], | |
); | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
body: MyResume( | |
resumeData: sample, | |
pageMargin: 100, | |
professionalHeadshot: includeHeadshot | |
? Container(width: 100, height: 100, color: Colors.blue) | |
: null, | |
), | |
), | |
); | |
} | |
} | |
class CustomText extends StatelessWidget { | |
final String text; | |
final TextStyle style; | |
final TextAlign textAlign; | |
final bool bulletedList; | |
const CustomText( | |
this.text, { | |
super.key, | |
required this.style, | |
this.bulletedList = false, | |
this.textAlign = TextAlign.left, | |
}); | |
@override | |
Widget build(BuildContext context) { | |
return Text(text, style: style, textAlign: textAlign); | |
} | |
} | |
class CustomTextWithDescription extends StatelessWidget { | |
final String? itemTitle; | |
final String? itemDescription; | |
final TextStyle? itemTitleStyle; | |
final TextStyle? itemDescriptionStyle; | |
final bool showBullet; | |
final bool oneLine; | |
final TextAlign textAlign; | |
const CustomTextWithDescription({ | |
super.key, | |
this.itemTitle, | |
this.itemDescription, | |
this.itemTitleStyle, | |
this.itemDescriptionStyle, | |
this.showBullet = false, | |
this.oneLine = false, | |
this.textAlign = TextAlign.left, | |
}); | |
@override | |
Widget build(BuildContext context) { | |
return Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
if (itemTitle != null) | |
Text(itemTitle!, style: itemTitleStyle, textAlign: textAlign), | |
if (itemDescription != null) | |
Text( | |
itemDescription!, | |
style: itemDescriptionStyle, | |
textAlign: textAlign, | |
), | |
], | |
); | |
} | |
} | |
final Map<String, String> myResumeContent = { | |
'professionalSummary': 'Professional Summary', | |
'professionalExperience': 'Professional Experience', | |
'education': 'Education', | |
'skills': 'Skills', | |
}; | |
final Map<String, Color> myResumeColors = { | |
'primaryBlue': Color(0xFF3C79F5), | |
'headingBlack': Color(0xFF000000), | |
'bodyText': Color(0xFF4A4A4A), | |
'lightGray': Color(0xFF888888), | |
'divider': Color(0xFFD0D0D0), | |
}; | |
final Map<String, TextStyle> myResumeTextStyles = { | |
'firstNameStyle': GoogleFonts.montserrat( | |
color: myResumeColors['primaryBlue']!, | |
fontSize: 42, | |
fontWeight: FontWeight.bold, | |
), | |
'lastNameStyle': GoogleFonts.montserrat( | |
color: myResumeColors['headingBlack']!, | |
fontSize: 42, | |
fontWeight: FontWeight.bold, | |
), | |
'headlineStyle': GoogleFonts.montserrat( | |
color: myResumeColors['lightGray']!, | |
fontSize: 16, | |
fontWeight: FontWeight.w500, | |
letterSpacing: 2.5, | |
), | |
'contactInfoStyle': GoogleFonts.lato( | |
color: myResumeColors['bodyText']!, | |
fontSize: 14, | |
), | |
'sectionTitleStyle': GoogleFonts.montserrat( | |
color: myResumeColors['primaryBlue']!, | |
fontSize: 18, | |
fontWeight: FontWeight.bold, | |
letterSpacing: 1.5, | |
), | |
'entryTitleStyle': GoogleFonts.montserrat( | |
color: myResumeColors['headingBlack']!, | |
fontSize: 16, | |
fontWeight: FontWeight.bold, | |
), | |
'entrySubtitleStyle': GoogleFonts.lato( | |
color: myResumeColors['bodyText']!, | |
fontSize: 15, | |
fontWeight: FontWeight.bold, | |
), | |
'entryDateStyle': GoogleFonts.lato( | |
color: myResumeColors['headingBlack']!, | |
fontSize: 14, | |
fontWeight: FontWeight.bold, | |
), | |
'bodyStyle': GoogleFonts.lato( | |
color: myResumeColors['bodyText']!, | |
fontSize: 14, | |
height: 1.4, | |
), | |
'descriptionStyle': GoogleFonts.lato( | |
color: myResumeColors['bodyText']!, | |
fontSize: 13, | |
fontStyle: FontStyle.italic, | |
), | |
'simpleEntryTitleStyle': GoogleFonts.lato( | |
color: myResumeColors['headingBlack']!, | |
fontSize: 14, | |
fontWeight: FontWeight.bold, | |
), | |
'simpleEntryDescriptionStyle': GoogleFonts.lato( | |
color: myResumeColors['bodyText']!, | |
fontSize: 14, | |
), | |
}; | |
class MyResume extends StatelessWidget { | |
final ResumeData resumeData; | |
final double pageMargin; | |
final Widget? professionalHeadshot; | |
static final Color primaryBlue = myResumeColors['primaryBlue']!; | |
static final Color headingBlack = myResumeColors['headingBlack']!; | |
static final Color bodyText = myResumeColors['bodyText']!; | |
static final Color lightGray = myResumeColors['lightGray']!; | |
static final Color divider = myResumeColors['divider']!; | |
static final TextStyle firstNameStyle = myResumeTextStyles['firstNameStyle']!; | |
static final TextStyle lastNameStyle = myResumeTextStyles['lastNameStyle']!; | |
static final TextStyle headlineStyle = myResumeTextStyles['headlineStyle']!; | |
static final TextStyle contactInfoStyle = | |
myResumeTextStyles['contactInfoStyle']!; | |
static final TextStyle sectionTitleStyle = | |
myResumeTextStyles['sectionTitleStyle']!; | |
static final TextStyle entryTitleStyle = myResumeTextStyles['entryTitleStyle']!; | |
static final TextStyle entrySubtitleStyle = | |
myResumeTextStyles['entrySubtitleStyle']!; | |
static final TextStyle entryDateStyle = myResumeTextStyles['entryDateStyle']!; | |
static final TextStyle bodyStyle = myResumeTextStyles['bodyStyle']!; | |
static final TextStyle descriptionStyle = | |
myResumeTextStyles['descriptionStyle']!; | |
static final TextStyle simpleEntryTitleStyle = | |
myResumeTextStyles['simpleEntryTitleStyle']!; | |
static final TextStyle simpleEntryDescriptionStyle = | |
myResumeTextStyles['simpleEntryDescriptionStyle']!; | |
static final double _smallVerticalSpacing = 4.0; | |
static final double _titleContentSpacing = 8.0; | |
static final double _entryTitleSubtitleSpacing = 2.0; | |
static final double _sectionVerticalSpacing = 16.0; | |
static final double _headerContactSpacing = 24.0; | |
static final double _entryDateSpacing = 16.0; | |
static final double _skillsColumnSpacing = 20.0; | |
static final EdgeInsets _entryBottomPadding = | |
EdgeInsets.only(bottom: 16.0); | |
static final EdgeInsets _skillItemBottomPadding = | |
EdgeInsets.only(bottom: 8.0); | |
static final EdgeInsets _simpleItemBottomPadding = | |
EdgeInsets.only(bottom: 4.0); | |
MyResume({ | |
super.key, | |
required this.resumeData, | |
required this.pageMargin, | |
this.professionalHeadshot, | |
}); | |
Widget _buildHeader() { | |
return Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Row( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
if (professionalHeadshot != null) ...[ | |
professionalHeadshot!, | |
SizedBox(width: _headerContactSpacing), | |
], | |
Expanded( | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Row( | |
children: [ | |
if (resumeData.contact.firstName != null) | |
CustomText( | |
'${resumeData.contact.firstName} ', | |
style: firstNameStyle, | |
), | |
if (resumeData.contact.lastName != null) | |
CustomText( | |
resumeData.contact.lastName!, | |
style: lastNameStyle, | |
), | |
], | |
), | |
SizedBox(height: _smallVerticalSpacing), | |
if (resumeData.professionalHeadline != null) | |
CustomText( | |
resumeData.professionalHeadline!.toUpperCase(), | |
style: headlineStyle, | |
), | |
], | |
), | |
), | |
SizedBox(width: _headerContactSpacing), | |
Column( | |
crossAxisAlignment: CrossAxisAlignment.end, | |
children: [ | |
if (resumeData.contact.email != null) | |
CustomText( | |
resumeData.contact.email!, | |
style: contactInfoStyle, | |
), | |
if (resumeData.contact.website != null) | |
CustomText( | |
resumeData.contact.website!, | |
style: contactInfoStyle, | |
), | |
if (resumeData.contact.phone != null) | |
CustomText( | |
resumeData.contact.phone!, | |
style: contactInfoStyle, | |
), | |
if (resumeData.contact.address1 != null) | |
CustomText( | |
'${resumeData.contact.address1}${resumeData.contact.address2 != null ? ', ${resumeData.contact.address2}' : ''}', | |
style: contactInfoStyle, | |
textAlign: TextAlign.right, | |
), | |
...resumeData.contact.socialLinks.map( | |
(link) => link.url != null | |
? CustomText(link.url!, style: contactInfoStyle) | |
: SizedBox.shrink(), | |
), | |
], | |
), | |
], | |
), | |
SizedBox(height: _sectionVerticalSpacing), | |
Divider(color: divider, thickness: 2), | |
], | |
); | |
} | |
Widget _buildSection({required String title, required Widget child}) { | |
return Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
SizedBox(height: _sectionVerticalSpacing), | |
CustomText( | |
title.toUpperCase(), | |
style: sectionTitleStyle, | |
), | |
SizedBox(height: _titleContentSpacing), | |
child, | |
SizedBox(height: _sectionVerticalSpacing), | |
Divider(color: divider, thickness: 1), | |
], | |
); | |
} | |
Widget _buildWorkEntry(WorkExperienceEntry entry) { | |
return Padding( | |
padding: _entryBottomPadding, | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
if (entry.position != null) | |
Flexible( | |
child: CustomText( | |
entry.position!, | |
style: entryTitleStyle, | |
), | |
), | |
if (entry.dates != null) | |
CustomText( | |
entry.dates!, | |
style: entryDateStyle, | |
textAlign: TextAlign.right, | |
), | |
], | |
), | |
SizedBox(height: _entryTitleSubtitleSpacing), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
if (entry.company != null) | |
Flexible( | |
child: CustomText( | |
entry.company!, | |
style: entrySubtitleStyle, | |
), | |
), | |
if (entry.location != null) | |
CustomText( | |
entry.location!, | |
style: contactInfoStyle, | |
textAlign: TextAlign.right, | |
), | |
], | |
), | |
if (entry.description != null && entry.description!.isNotEmpty) ...[ | |
SizedBox(height: _titleContentSpacing), | |
CustomText( | |
entry.description!, | |
style: bodyStyle, | |
bulletedList: true, | |
), | |
] | |
], | |
), | |
); | |
} | |
Widget _buildAdditionalExperienceEntry(AdditionalExperienceItemEntry entry) { | |
return Padding( | |
padding: _entryBottomPadding, | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
if (entry.title != null) | |
Flexible( | |
child: CustomText( | |
entry.title!, | |
style: entryTitleStyle, | |
), | |
), | |
if (entry.dates != null) | |
CustomText( | |
entry.dates!, | |
style: entryDateStyle, | |
textAlign: TextAlign.right, | |
), | |
], | |
), | |
SizedBox(height: _entryTitleSubtitleSpacing), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
if (entry.subtitle != null) | |
Flexible( | |
child: CustomText( | |
entry.subtitle!, | |
style: entrySubtitleStyle, | |
), | |
), | |
if (entry.location != null) | |
CustomText( | |
entry.location!, | |
style: contactInfoStyle, | |
textAlign: TextAlign.right, | |
), | |
], | |
), | |
if (entry.description != null && entry.description!.isNotEmpty) ...[ | |
SizedBox(height: _titleContentSpacing), | |
CustomText( | |
entry.description!, | |
style: bodyStyle, | |
bulletedList: true, | |
), | |
] | |
], | |
), | |
); | |
} | |
Widget _buildEducationEntry(EducationEntry entry) { | |
return Padding( | |
padding: _entryBottomPadding, | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
if (entry.degree != null) | |
Flexible( | |
child: CustomText( | |
entry.degree!, | |
style: entryTitleStyle, | |
), | |
), | |
if (entry.dates != null) | |
CustomText( | |
entry.dates!, | |
style: entryDateStyle, | |
textAlign: TextAlign.right, | |
), | |
], | |
), | |
SizedBox(height: _entryTitleSubtitleSpacing), | |
if (entry.school != null) | |
CustomText( | |
entry.school!, | |
style: entrySubtitleStyle, | |
), | |
if (entry.description != null && entry.description!.isNotEmpty) ...[ | |
SizedBox(height: _smallVerticalSpacing), | |
CustomText( | |
entry.description!, | |
style: descriptionStyle, | |
), | |
] | |
], | |
), | |
); | |
} | |
Widget _buildSkillsGrid(List<SimpleEntry> skills) { | |
if (skills.isEmpty) return SizedBox.shrink(); | |
final middle = (skills.length / 2).ceil(); | |
final firstHalf = skills.sublist(0, middle); | |
final secondHalf = skills.sublist(middle); | |
return Row( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Expanded( | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: firstHalf | |
.map((skill) => Padding( | |
padding: _skillItemBottomPadding, | |
child: CustomTextWithDescription( | |
itemTitle: skill.itemTitle, | |
itemDescription: skill.itemDescription, | |
itemTitleStyle: simpleEntryTitleStyle, | |
itemDescriptionStyle: descriptionStyle, | |
oneLine: false, | |
), | |
)) | |
.toList(), | |
), | |
), | |
SizedBox(width: _skillsColumnSpacing), | |
Expanded( | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: secondHalf | |
.map((skill) => Padding( | |
padding: _skillItemBottomPadding, | |
child: CustomTextWithDescription( | |
itemTitle: skill.itemTitle, | |
itemDescription: skill.itemDescription, | |
itemTitleStyle: simpleEntryTitleStyle, | |
itemDescriptionStyle: descriptionStyle, | |
oneLine: false, | |
), | |
)) | |
.toList(), | |
), | |
), | |
], | |
); | |
} | |
Widget _buildSimpleSectionContent(List<SimpleEntry> content) { | |
return Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: content | |
.map((item) => Padding( | |
padding: _simpleItemBottomPadding, | |
child: CustomTextWithDescription( | |
itemTitle: item.itemTitle, | |
itemDescription: item.itemDescription, | |
itemTitleStyle: simpleEntryTitleStyle, | |
itemDescriptionStyle: simpleEntryDescriptionStyle, | |
oneLine: true, | |
showBullet: false, | |
), | |
)) | |
.toList(), | |
); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return Padding( | |
padding: EdgeInsets.all(pageMargin), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
_buildHeader(), | |
if (resumeData.professionalSummary?.isNotEmpty ?? false) | |
_buildSection( | |
title: myResumeContent['professionalSummary']!, | |
child: CustomText( | |
resumeData.professionalSummary!, | |
style: bodyStyle, | |
bulletedList: true, | |
), | |
), | |
if (resumeData.work.isNotEmpty) | |
_buildSection( | |
title: myResumeContent['professionalExperience']!, | |
child: Column( | |
children: resumeData.work.map(_buildWorkEntry).toList(), | |
), | |
), | |
...resumeData.additionalExperiences.map( | |
(section) { | |
if (section.sectionTitle?.isNotEmpty ?? false) { | |
return _buildSection( | |
title: section.sectionTitle!, | |
child: Column( | |
children: section.content | |
.map(_buildAdditionalExperienceEntry) | |
.toList(), | |
), | |
); | |
} | |
return SizedBox.shrink(); | |
}, | |
), | |
if (resumeData.education.isNotEmpty) | |
_buildSection( | |
title: myResumeContent['education']!, | |
child: Column( | |
children: | |
resumeData.education.map(_buildEducationEntry).toList(), | |
), | |
), | |
if (resumeData.skills.isNotEmpty) | |
_buildSection( | |
title: myResumeContent['skills']!, | |
child: _buildSkillsGrid(resumeData.skills), | |
), | |
...resumeData.additionalSimpleSections.map( | |
(section) { | |
if (section.sectionTitle?.isNotEmpty ?? false) { | |
return _buildSection( | |
title: section.sectionTitle!, | |
child: _buildSimpleSectionContent(section.content), | |
); | |
} | |
return SizedBox.shrink(); | |
}, | |
), | |
], | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment