Skip to content

Commit

Permalink
Merge branch 'dev' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
PLGuerraDesigns committed Oct 10, 2023
2 parents bb09137 + 56c4004 commit 6f0d84c
Show file tree
Hide file tree
Showing 20 changed files with 483 additions and 128 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ migrate_working_dir/
/build/

# Web related
lib/generated_plugin_registrant.dart

# Symbolication related
app.*.symbols
Expand Down
Binary file added assets/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 21 additions & 2 deletions lib/constants/strings.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
class Strings {
Strings._();

// URLs
static const String flutterUrl = 'https://flutter.dev/';
static const String sponsorUrl = 'https://www.buymeacoffee.com/plguerra';
static const String sourceCodeUrl =
'https://github.com/PLGuerraDesigns/flutter_resume_builder';
static const String portfolioUrl =
'https://plguerradesigns.github.io/portfolio/';

// Asset Paths
static const String iconPath = 'images/icon.png';

// General
static const String resumeBuilder = 'Resume Builder';
static const String poweredByFlutter = 'Powered by Flutter';
static const String flutterResumeBuilder = 'Flutter Resume Builder';
static const String flutterUrl = 'https://flutter.dev/';
static const String projectInfo =
'This project is still under development!\n\nThe Flutter Resume Builder is an open source project created by Pablo L. Guerra to provide users with a web-based resume builder that is free and easy to use while still providing professional resumes.';
static const String aboutThisProject = 'About this project';
static const String moreOptions = 'More options';
static const String contributeToThisProject = 'Contribute to this project';
static const String projectDonation = 'Project Donation';
static const String licenses = 'Licenses';
static const String moreProjects = 'More Projects';
static String copyRight(String year) => '© $year Pablo L. Guerra';

// Form
static const String contactDetails = 'Contact Details';
Expand Down Expand Up @@ -51,7 +70,7 @@ class Strings {

// Split view
static const String recompile = 'RECOMPILE';
static const String download = 'DOWNLOAD';
static const String downloadPDF = 'DOWNLOAD PDF';
static const String form = 'Form';
static const String preview = 'Preview';
}
1 change: 1 addition & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'constants/strings.dart';
import 'pages/split_view.dart';

void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(const FlutterResumeBuilder());
}

Expand Down
65 changes: 46 additions & 19 deletions lib/pages/input_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ import '../widgets/image_file_picker.dart';

/// The input form for the resume.
class InputForm extends StatefulWidget {
const InputForm({super.key});
const InputForm({
super.key,
this.portrait = false,
});

/// Whether the layout is portrait or not.
final bool portrait;

@override
State<InputForm> createState() => _InputFormState();
}

class _InputFormState extends State<InputForm> {
/// The key for the contact section.
final GlobalKey<State<StatefulWidget>> _contactSectionKey = GlobalKey();

/// The key for the skill section.
final GlobalKey<State<StatefulWidget>> _skillSectionKey = GlobalKey();

/// Form fields for requesting the user's name, location, and a logo.
Widget _header(Resume resume) {
return Row(
Expand Down Expand Up @@ -101,6 +101,7 @@ class _InputFormState extends State<InputForm> {
children: <Widget>[
if (titleEditable)
Expanded(
flex: 2,
child: GenericTextField(
key: UniqueKey(),
label: '',
Expand All @@ -120,7 +121,6 @@ class _InputFormState extends State<InputForm> {
),
),
const Expanded(
flex: 2,
child: Divider(
indent: 10,
endIndent: 10,
Expand Down Expand Up @@ -201,15 +201,25 @@ class _InputFormState extends State<InputForm> {
Widget _contactSection(Resume resume) {
return ReorderableBuilder(
longPressDelay: const Duration(milliseconds: 250),
key: _contactSectionKey,
enableScrollingWhileDragging: false,
dragChildBoxDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
boxShadow: const <BoxShadow>[
BoxShadow(
color: Colors.black54,
blurRadius: 10,
offset: Offset(-2, 5),
),
],
),
builder: (List<Widget> children) {
return GridView.custom(
key: _contactSectionKey,
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
childrenDelegate: SliverChildListDelegate(children),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
mainAxisExtent: 74,
crossAxisCount: 2,
crossAxisCount: widget.portrait ? 1 : 2,
mainAxisSpacing: 10,
crossAxisSpacing: 10,
),
Expand Down Expand Up @@ -259,8 +269,17 @@ class _InputFormState extends State<InputForm> {
opacity: resume.sectionVisible(Strings.skills) ? 1 : 0.5,
child: ReorderableBuilder(
longPressDelay: const Duration(milliseconds: 250),
key: _skillSectionKey,
enableScrollingWhileDragging: false,
dragChildBoxDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
boxShadow: const <BoxShadow>[
BoxShadow(
color: Colors.black54,
blurRadius: 10,
offset: Offset(-2, 5),
),
],
),
onReorder: (List<OrderUpdateEntity> orderUpdateEntities) {
for (final OrderUpdateEntity element in orderUpdateEntities) {
resume.onReorderSkillsList(element.oldIndex, element.newIndex);
Expand All @@ -269,12 +288,11 @@ class _InputFormState extends State<InputForm> {
builder: (List<Widget> children) {
return GridView.custom(
physics: const NeverScrollableScrollPhysics(),
key: _skillSectionKey,
shrinkWrap: true,
childrenDelegate: SliverChildListDelegate(children),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
mainAxisExtent: 74,
crossAxisCount: 5,
crossAxisCount: widget.portrait ? 2 : 5,
mainAxisSpacing: 10,
crossAxisSpacing: 10,
),
Expand Down Expand Up @@ -318,16 +336,18 @@ class _InputFormState extends State<InputForm> {
),
ReorderableList(
itemCount: resume.experiences.length,
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
proxyDecorator: _proxyDecorator,
onReorder: (int oldIndex, int newIndex) {
resume.onReorderExperienceList(oldIndex, newIndex);
},
itemBuilder: (BuildContext context, int index) {
return ReorderableDragStartListener(
return ReorderableDelayedDragStartListener(
key: Key('${Strings.experience}$index'),
index: index,
child: ExperienceEntry(
portrait: widget.portrait,
experience: resume.experiences[index],
onSubmitted: (_) {
resume.rebuild();
Expand Down Expand Up @@ -356,15 +376,17 @@ class _InputFormState extends State<InputForm> {
ReorderableList(
itemCount: resume.educationHistory.length,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
proxyDecorator: _proxyDecorator,
onReorder: (int oldIndex, int newIndex) {
resume.onReorderEducationList(oldIndex, newIndex);
},
itemBuilder: (BuildContext context, int index) {
return ReorderableDragStartListener(
return ReorderableDelayedDragStartListener(
key: Key('${Strings.education}$index'),
index: index,
child: EducationEntry(
portrait: widget.portrait,
education: resume.educationHistory[index],
onSubmitted: (_) {
resume.rebuild();
Expand Down Expand Up @@ -409,14 +431,16 @@ class _InputFormState extends State<InputForm> {
itemCount: genericSection.length,
shrinkWrap: true,
proxyDecorator: _proxyDecorator,
physics: const NeverScrollableScrollPhysics(),
onReorder: (int oldIndex, int newIndex) {
resume.onReorderCustomSectionList(oldIndex, newIndex);
},
itemBuilder: (BuildContext context, int index) {
return ReorderableDragStartListener(
return ReorderableDelayedDragStartListener(
key: Key('$title$index'),
index: index,
child: CustomEntry(
portrait: widget.portrait,
genericSection: genericSection[index],
onSubmitted: (_) {
resume.rebuild();
Expand All @@ -443,6 +467,9 @@ class _InputFormState extends State<InputForm> {
elevation: elevation,
color: Colors.transparent,
shadowColor: Colors.black54,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),
child: child,
),
);
Expand Down
Loading

0 comments on commit 6f0d84c

Please sign in to comment.