Created
June 8, 2025 14:11
-
-
Save ben953/51a4076e2ae18ab21b966ec8616900e0 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 = { | |
'contact': 'Contact', | |
'summary': 'Summary', | |
'skills': 'Skills', | |
'experience': 'Experience', | |
'education': 'Education', | |
}; | |
final Map<String, Color> myResumeColors = { | |
'backgroundColor': Color(0xFFFBF9F4), | |
'leftColumnColor': Color(0xFFF3EFE9), | |
'titleHighlightColor': Color(0xFFD4E79E), | |
'primaryTextColor': Color(0xFF2B2B2B), | |
'secondaryTextColor': Color(0xFF6B6B6B), | |
}; | |
final Map<String, TextStyle> myResumeTextStyles = { | |
'nameStyle': GoogleFonts.lora( | |
color: myResumeColors['primaryTextColor'], | |
fontSize: 54, | |
fontWeight: FontWeight.bold, | |
), | |
'professionalHeadlineStyle': GoogleFonts.lato( | |
color: myResumeColors['primaryTextColor'], | |
fontSize: 14, | |
fontWeight: FontWeight.w600, | |
letterSpacing: 1.5, | |
), | |
'sectionTitleStyle': GoogleFonts.lato( | |
color: myResumeColors['primaryTextColor'], | |
fontSize: 20, | |
fontWeight: FontWeight.bold, | |
), | |
'itemTitleStyle': GoogleFonts.lato( | |
color: myResumeColors['primaryTextColor'], | |
fontSize: 16, | |
fontWeight: FontWeight.bold, | |
), | |
'itemSubtitleStyle': GoogleFonts.lato( | |
color: myResumeColors['primaryTextColor'], | |
fontSize: 14, | |
fontWeight: FontWeight.normal, | |
), | |
'dateStyle': GoogleFonts.lato( | |
color: myResumeColors['secondaryTextColor'], | |
fontSize: 14, | |
), | |
'bodyStyle': GoogleFonts.lato( | |
color: myResumeColors['primaryTextColor'], | |
fontSize: 13, | |
height: 1.5, | |
), | |
'contactInfoStyle': GoogleFonts.lato( | |
color: myResumeColors['primaryTextColor'], | |
fontSize: 13, | |
), | |
}; | |
class MyResume extends StatelessWidget { | |
final ResumeData resumeData; | |
final double pageMargin; | |
final Widget? professionalHeadshot; | |
MyResume({ | |
super.key, | |
required this.resumeData, | |
required this.pageMargin, | |
this.professionalHeadshot, | |
}); | |
static final Color backgroundColor = myResumeColors['backgroundColor']!; | |
static final Color leftColumnColor = myResumeColors['leftColumnColor']!; | |
static final Color titleHighlightColor = myResumeColors['titleHighlightColor']!; | |
static final Color primaryTextColor = myResumeColors['primaryTextColor']!; | |
static final Color secondaryTextColor = myResumeColors['secondaryTextColor']!; | |
static final TextStyle nameStyle = myResumeTextStyles['nameStyle']!; | |
static final TextStyle professionalHeadlineStyle = myResumeTextStyles['professionalHeadlineStyle']!; | |
static final TextStyle sectionTitleStyle = myResumeTextStyles['sectionTitleStyle']!; | |
static final TextStyle itemTitleStyle = myResumeTextStyles['itemTitleStyle']!; | |
static final TextStyle itemSubtitleStyle = myResumeTextStyles['itemSubtitleStyle']!; | |
static final TextStyle dateStyle = myResumeTextStyles['dateStyle']!; | |
static final TextStyle bodyStyle = myResumeTextStyles['bodyStyle']!; | |
static final TextStyle contactInfoStyle = myResumeTextStyles['contactInfoStyle']!; | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
color: backgroundColor, | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.stretch, | |
children: [ | |
_buildHeader(), | |
Row( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Expanded( | |
flex: 1, | |
child: _buildLeftColumn(), | |
), | |
Expanded( | |
flex: 2, | |
child: _buildRightColumn(), | |
), | |
], | |
) | |
], | |
), | |
); | |
} | |
Widget _buildHeader() { | |
final name = [resumeData.contact.firstName, resumeData.contact.lastName] | |
.where((n) => n != null && n.isNotEmpty) | |
.join(' '); | |
final textContent = Column( | |
crossAxisAlignment: professionalHeadshot == null | |
? CrossAxisAlignment.center | |
: CrossAxisAlignment.start, | |
children: [ | |
if (name.isNotEmpty) CustomText(name, style: nameStyle), | |
if (resumeData.professionalHeadline != null && | |
resumeData.professionalHeadline!.isNotEmpty) ...[ | |
SizedBox(height: 12), | |
Container( | |
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 8), | |
decoration: BoxDecoration( | |
color: titleHighlightColor, | |
borderRadius: BorderRadius.circular(20), | |
), | |
child: CustomText( | |
resumeData.professionalHeadline!.toUpperCase(), | |
style: professionalHeadlineStyle, | |
), | |
), | |
], | |
], | |
); | |
return Container( | |
color: leftColumnColor, | |
padding: EdgeInsets.fromLTRB(pageMargin, pageMargin, pageMargin, 40), | |
child: professionalHeadshot == null | |
? Center(child: textContent) | |
: Row( | |
crossAxisAlignment: CrossAxisAlignment.center, | |
children: [ | |
professionalHeadshot!, | |
SizedBox(width: 24), | |
Expanded(child: textContent), | |
], | |
), | |
); | |
} | |
Widget _buildLeftColumn() { | |
return Container( | |
color: leftColumnColor, | |
padding: EdgeInsets.fromLTRB(pageMargin, 24, 24, pageMargin), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
_buildContactSection(), | |
_buildSummarySection(), | |
_buildSkillsSection(), | |
], | |
), | |
); | |
} | |
Widget _buildRightColumn() { | |
return Container( | |
padding: EdgeInsets.fromLTRB(32, 24, pageMargin, pageMargin), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
_buildWorkSection(), | |
_buildAdditionalExperiencesSection(), | |
_buildAdditionalSections(), | |
_buildEducationSection(), | |
], | |
), | |
); | |
} | |
Widget _buildSectionSpacer(Widget child) { | |
if (child is SizedBox) return SizedBox.shrink(); | |
return Padding( | |
padding: EdgeInsets.only(bottom: 32.0), | |
child: child, | |
); | |
} | |
Widget _buildContactSection() { | |
final contactItems = <Widget>[]; | |
if (resumeData.contact.email != null && resumeData.contact.email!.isNotEmpty) { | |
contactItems.add(_ContactItem(icon: Icons.email_outlined, text: resumeData.contact.email!)); | |
} | |
if (resumeData.contact.phone != null && resumeData.contact.phone!.isNotEmpty) { | |
contactItems.add(_ContactItem(icon: Icons.phone_outlined, text: resumeData.contact.phone!)); | |
} | |
final address = [resumeData.contact.address1, resumeData.contact.address2] | |
.where((s) => s != null && s.isNotEmpty) | |
.join(', '); | |
if (address.isNotEmpty) { | |
contactItems.add(_ContactItem(icon: Icons.location_on_outlined, text: address)); | |
} | |
if (resumeData.contact.website != null && resumeData.contact.website!.isNotEmpty) { | |
contactItems.add(_ContactItem(icon: Icons.link, text: resumeData.contact.website!)); | |
} | |
for (var link in resumeData.contact.socialLinks) { | |
if (link.url != null && link.url!.isNotEmpty) { | |
contactItems.add(_ContactItem(icon: Icons.public, text: link.url!)); | |
} | |
} | |
if (contactItems.isEmpty) return SizedBox.shrink(); | |
return _buildSectionSpacer( | |
Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
CustomText(myResumeContent['contact']!, style: sectionTitleStyle), | |
SizedBox(height: 16), | |
...contactItems, | |
], | |
), | |
); | |
} | |
Widget _buildSummarySection() { | |
if (resumeData.professionalSummary == null || resumeData.professionalSummary!.isEmpty) { | |
return SizedBox.shrink(); | |
} | |
return _buildSectionSpacer( | |
Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
CustomText(myResumeContent['summary']!, style: sectionTitleStyle), | |
SizedBox(height: 16), | |
CustomText(resumeData.professionalSummary!, style: bodyStyle), | |
], | |
), | |
); | |
} | |
Widget _buildSkillsSection() { | |
final validSkills = resumeData.skills | |
.where((s) => s.itemTitle != null && s.itemTitle!.isNotEmpty) | |
.toList(); | |
if (validSkills.isEmpty) return SizedBox.shrink(); | |
return _buildSectionSpacer( | |
Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
CustomText(myResumeContent['skills']!, style: sectionTitleStyle), | |
SizedBox(height: 16), | |
...validSkills.map((skill) => Padding( | |
padding: EdgeInsets.only(bottom: 8.0), | |
child: CustomTextWithDescription( | |
itemTitle: skill.itemTitle, | |
itemDescription: skill.itemDescription, | |
itemTitleStyle: bodyStyle, | |
itemDescriptionStyle: bodyStyle, | |
oneLine: false, | |
showBullet: true, | |
), | |
)), | |
], | |
), | |
); | |
} | |
Widget _buildWorkSection() { | |
if (resumeData.work.isEmpty) return SizedBox.shrink(); | |
return _buildSectionSpacer( | |
Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
CustomText(myResumeContent['experience']!, style: sectionTitleStyle), | |
SizedBox(height: 24), | |
...resumeData.work.map((job) { | |
final subtitle = [job.company, job.location] | |
.where((s) => s != null && s.isNotEmpty) | |
.join(' | '); | |
return Padding( | |
padding: EdgeInsets.only(bottom: 24.0), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
if (job.position != null && job.position!.isNotEmpty) | |
CustomText(job.position!, style: itemTitleStyle), | |
if (subtitle.isNotEmpty) ...[ | |
SizedBox(height: 4), | |
CustomText(subtitle, style: itemSubtitleStyle), | |
], | |
if (job.dates != null && job.dates!.isNotEmpty) ...[ | |
SizedBox(height: 4), | |
CustomText(job.dates!, style: dateStyle), | |
], | |
if (job.description != null && job.description!.isNotEmpty) ...[ | |
SizedBox(height: 8), | |
CustomText(job.description!, style: bodyStyle, bulletedList: true), | |
], | |
], | |
), | |
); | |
}), | |
], | |
), | |
); | |
} | |
Widget _buildAdditionalExperiencesSection() { | |
final validSections = resumeData.additionalExperiences | |
.where((s) => s.sectionTitle != null && s.content.isNotEmpty) | |
.toList(); | |
if (validSections.isEmpty) return SizedBox.shrink(); | |
return _buildSectionSpacer( | |
Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: List.generate(validSections.length, (index) { | |
final section = validSections[index]; | |
return Padding( | |
padding: EdgeInsets.only(bottom: index == validSections.length - 1 ? 0 : 32), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
CustomText(section.sectionTitle!, style: sectionTitleStyle), | |
SizedBox(height: 24), | |
...section.content.map((item) { | |
final subtitle = [item.subtitle, item.location] | |
.where((s) => s != null && s.isNotEmpty) | |
.join(' | '); | |
return Padding( | |
padding: EdgeInsets.only(bottom: 24.0), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
if (item.title != null && item.title!.isNotEmpty) | |
CustomText(item.title!, style: itemTitleStyle), | |
if (subtitle.isNotEmpty) ...[ | |
SizedBox(height: 4), | |
CustomText(subtitle, style: itemSubtitleStyle), | |
], | |
if (item.dates != null && item.dates!.isNotEmpty) ...[ | |
SizedBox(height: 4), | |
CustomText(item.dates!, style: dateStyle), | |
], | |
if (item.description != null && item.description!.isNotEmpty) ...[ | |
SizedBox(height: 8), | |
CustomText(item.description!, style: bodyStyle, bulletedList: true), | |
], | |
], | |
), | |
); | |
}), | |
], | |
), | |
); | |
}), | |
), | |
); | |
} | |
Widget _buildAdditionalSections() { | |
final validSections = resumeData.additionalSimpleSections | |
.where((s) => | |
s.sectionTitle != null && | |
s.content.any((c) => c.itemTitle != null && c.itemTitle!.isNotEmpty)) | |
.toList(); | |
if (validSections.isEmpty) return SizedBox.shrink(); | |
return _buildSectionSpacer( | |
Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: validSections.map((section) { | |
final validContent = section.content | |
.where((c) => c.itemTitle != null && c.itemTitle!.isNotEmpty) | |
.toList(); | |
return Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
CustomText(section.sectionTitle!, style: sectionTitleStyle), | |
SizedBox(height: 24), | |
...validContent.map((item) => Padding( | |
padding: EdgeInsets.only(bottom: 16.0), | |
child: CustomTextWithDescription( | |
itemTitle: item.itemTitle, | |
itemDescription: item.itemDescription, | |
itemTitleStyle: itemTitleStyle, | |
itemDescriptionStyle: itemSubtitleStyle, | |
oneLine: false, | |
showBullet: false, | |
), | |
)), | |
], | |
); | |
}).toList(), | |
), | |
); | |
} | |
Widget _buildEducationSection() { | |
if (resumeData.education.isEmpty) return SizedBox.shrink(); | |
return _buildSectionSpacer( | |
Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
CustomText(myResumeContent['education']!, style: sectionTitleStyle), | |
SizedBox(height: 24), | |
...resumeData.education.map((edu) => Padding( | |
padding: EdgeInsets.only(bottom: 16.0), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
if (edu.school != null && edu.school!.isNotEmpty) | |
CustomText(edu.school!, style: itemTitleStyle), | |
if (edu.dates != null && edu.dates!.isNotEmpty) ...[ | |
SizedBox(height: 4), | |
CustomText(edu.dates!, style: dateStyle), | |
], | |
if (edu.degree != null && edu.degree!.isNotEmpty) ...[ | |
SizedBox(height: 4), | |
CustomText(edu.degree!, style: itemSubtitleStyle), | |
], | |
if (edu.description != null && edu.description!.isNotEmpty) ...[ | |
SizedBox(height: 4), | |
CustomText(edu.description!, style: bodyStyle), | |
], | |
], | |
), | |
)), | |
], | |
), | |
); | |
} | |
} | |
class _ContactItem extends StatelessWidget { | |
final IconData icon; | |
final String text; | |
_ContactItem({required this.icon, required this.text}); | |
@override | |
Widget build(BuildContext context) { | |
return Padding( | |
padding: EdgeInsets.only(bottom: 12.0), | |
child: Row( | |
children: [ | |
Icon(icon, color: MyResume.primaryTextColor, size: 16), | |
SizedBox(width: 12), | |
Expanded( | |
child: CustomText(text, style: MyResume.contactInfoStyle), | |
), | |
], | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment