Skip to content

Commit

Permalink
Merge pull request #79 from JordyHers-org/dev
Browse files Browse the repository at this point in the history
[23.04.2024] Stage Release
  • Loading branch information
JordyHers authored Apr 23, 2024
2 parents c47e6ab + c5edf9b commit 29eb173
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 34 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.2.1
* update documentation
* minor fixes
* implemented social media placeholder

## 1.2.0

* Fix issue Web throwing error
Expand All @@ -6,7 +11,7 @@
* Add `height` and `width` for all templates
* Add `maxLinesExperience` for all templates
* Update MIT license
* Update readme
* Update readme

## 1.1.0

Expand Down Expand Up @@ -43,4 +48,4 @@
* Implemented core functionality of the application
* Created user interface for the application

The changelog entries are now in reverse chronological order, with the latest version at the top.
The changelog entries are now in reverse chronological order, with the latest version at the top.
2 changes: 1 addition & 1 deletion example/lib/data/data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ TemplateData data = TemplateData(
experience: [
ExperienceData(
experienceTitle: 'Software Engineer',
experienceLocation: 'at Mindable Health',
experienceLocation: ' Mindable Health',
experiencePeriod: 'Aug 2021 - Dec 2023',
experiencePlace: 'Berlin',
experienceDescription: workExperienceCompany1,
Expand Down
54 changes: 41 additions & 13 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,65 @@ class MyApp extends StatefulWidget {
}

class _MyAppState extends State<MyApp> {
final _scaffoldKey = GlobalKey<ScaffoldState>();

late TemplateTheme theme = TemplateTheme.modern;
List<TemplateTheme> list = [
TemplateTheme.none,
TemplateTheme.classic,
TemplateTheme.modern,
TemplateTheme.technical,
TemplateTheme.business,
];

TemplateTheme getRandomItem() {
void getRandomItem(BuildContext context) {
final random = Random();
final index = random.nextInt(5);
final index = random.nextInt(4);
theme = list[index];
return list[index];
}

@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: SafeArea(
child: Scaffold(
body: FlutterResumeTemplate(
data: data,
templateTheme: TemplateTheme.business,
mode: TemplateMode.onlyEditableMode,
showButtons: false,
imageBoxFit: BoxFit.cover,
height: 2500,
home: Scaffold(
key: _scaffoldKey,
drawer: Drawer(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
TextButton(
onPressed: () {
setState(() {
getRandomItem(context);
_scaffoldKey.currentState?.closeDrawer();
});
},
child: const Text('Change Theme'),
)
],
),
),
appBar: AppBar(
backgroundColor: Colors.transparent,
elevation: 0,
),
body: FlutterResumeTemplate(
data: data,
imageHeight: 100,
imageWidth: 100,
emailPlaceHolder: 'Email:',
telPlaceHolder: 'No:',
experiencePlaceHolder: 'Past',
educationPlaceHolder: 'School',
languagePlaceHolder: 'Skills',
aboutMePlaceholder: 'Me',
hobbiesPlaceholder: 'Past Times',
mode: TemplateMode.onlyEditableMode,
showButtons: true,
imageBoxFit: BoxFit.fitHeight,
enableDivider: false,
//backgroundColorLeftSection: Colors.amber,
templateTheme: theme),
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.1"
version: "1.2.0"
flutter_shake_animated:
dependency: transitive
description:
Expand Down
12 changes: 12 additions & 0 deletions lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,14 @@ class FlutterResumeTemplate extends StatefulWidget {
/// This value is the entire widget width
final double? width;

/// This value is used to define the spacing vertical or horizontal between
/// hobbies values. Only for the [TemplateTheme.modern]
final EdgeInsetsGeometry? hobbiesPadding;

/// The social medial placeholder is a widget that receives the
/// different social media accounts
final Widget? socialMediaPlaceholder;

const FlutterResumeTemplate({
Key? key,
required this.templateTheme,
Expand All @@ -179,6 +187,7 @@ class FlutterResumeTemplate extends StatefulWidget {
this.experiencePlaceHolder,
this.educationPlaceHolder,
this.languagePlaceHolder,
this.hobbiesPadding,
this.imageHeight,
this.imageWidth,
this.imageRadius,
Expand All @@ -188,6 +197,7 @@ class FlutterResumeTemplate extends StatefulWidget {
this.enableDivider = true,
this.showButtons = true,
this.backgroundColorLeftSection,
this.socialMediaPlaceholder,
this.mode = TemplateMode.onlyEditableMode,
}) : assert(data != null || onEmpty != null),
super(key: key);
Expand Down Expand Up @@ -228,7 +238,9 @@ class _FlutterResumeTemplateState extends State<FlutterResumeTemplate> {
telPlaceHolder: widget.telPlaceHolder,
languagePlaceHolder: widget.languagePlaceHolder,
hobbiesPlaceholder: widget.hobbiesPlaceholder,
hobbiesPadding: widget.hobbiesPadding,
onSaveResume: widget.onSaveResume,
socialMediaPlaceholder: widget.socialMediaPlaceholder,
mode: widget.mode,
data: widget.data ?? Str.mockData,
);
Expand Down
73 changes: 57 additions & 16 deletions lib/src/layout/layout_modern.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class LayoutModern extends StatefulWidget {
this.educationPlaceHolder,
this.languagePlaceHolder,
this.enableDividers = true,
this.hobbiesPadding,
this.socialMediaPlaceholder,
this.imageHeight,
this.imageWidth,
this.imageBoxFit,
Expand Down Expand Up @@ -77,6 +79,8 @@ class LayoutModern extends StatefulWidget {
final String? experiencePlaceHolder;
final String? languagePlaceHolder;
final bool? enableDividers;
final EdgeInsetsGeometry? hobbiesPadding;
final Widget? socialMediaPlaceholder;

final SaveResume<GlobalKey>? onSaveResume;

Expand Down Expand Up @@ -259,23 +263,27 @@ class _LayoutModernState extends State<LayoutModern> {
.data.hobbies!.length,
(index) => Column(
children: [
Config.spaceBox(Config
.smallSpacer),
DisplayText(
text: widget.data
.hobbies?[
index],
maxLines: 10,
style: Theme.of(
context)
.textTheme
.titleSmall
?.copyWith(
fontSize:
14),
Padding(
padding: widget
.hobbiesPadding ??
const EdgeInsets
.symmetric(
vertical:
8.0),
child: DisplayText(
text: widget.data
.hobbies?[
index],
maxLines: 10,
style: Theme.of(
context)
.textTheme
.titleSmall
?.copyWith(
fontSize:
14),
),
),
Config.spaceBox(Config
.smallSpacer),
],
),
)
Expand Down Expand Up @@ -316,6 +324,39 @@ class _LayoutModernState extends State<LayoutModern> {
),
]),
),
Config.spaceBox(Config.largeSpacer),
AnimatedShakingBuilder(
autoPlay: isDragged,
child: widget
.socialMediaPlaceholder ??
const Row(
mainAxisAlignment:
MainAxisAlignment
.spaceEvenly,
children: [
Icon(
Icons.tiktok,
color: Colors.deepOrange,
size: 18,
),
Icon(
Icons.facebook,
color: Colors.deepOrange,
size: 18,
),
Icon(
Icons.telegram,
color: Colors.deepOrange,
size: 18,
),
Icon(
Icons.messenger,
color: Colors.deepOrange,
size: 18,
),
],
),
),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >-
#Version to be released
version: 1.2.0
version: 1.2.1

#package homepage:
homepage: https://github.com/JordyHers/flutter_resume_template
Expand Down

0 comments on commit 29eb173

Please sign in to comment.