Skip to content

Commit

Permalink
Merge pull request #16 from JordyHers/dev
Browse files Browse the repository at this point in the history
Merge dev into Master
  • Loading branch information
JordyHers authored May 7, 2023
2 parents 6c2f016 + ea3d5e3 commit f7b2ec1
Show file tree
Hide file tree
Showing 18 changed files with 185 additions and 77 deletions.
5 changes: 3 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# These are supported funding model platforms

github: [jordyhers]
patreon: patreon.com/user?u=91968185
custom: https://paypal.me/JordyHershelIGONDJO?country.x=DE&locale.x=en_US
patreon: 91968185


11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.0.1
## 1.0.0

* Initial release of the project
* Added basic project structure and files
* Implemented core functionality of the application
* Created user interface for the application




* TODO: Describe initial release.
16 changes: 16 additions & 0 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.5"
dio:
dependency: transitive
description:
name: dio
sha256: "0894a098594263fe1caaba3520e3016d8a855caeb010a882273189cca10f11e9"
url: "https://pub.dev"
source: hosted
version: "5.1.1"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -170,6 +178,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.13.5"
http_mock_adapter:
dependency: transitive
description:
name: http_mock_adapter
sha256: "00f48d69f31d79e389f7a8544b266a214020a8b79d9f376f54e84ae13d3e2965"
url: "https://pub.dev"
source: hosted
version: "0.4.4"
http_parser:
dependency: transitive
description:
Expand Down
16 changes: 9 additions & 7 deletions lib/src/layout/layout_classic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:flutter_resume_template/flutter_resume_template.dart';
import 'package:flutter_resume_template/src/components/section_bottom_buttons.dart';
import 'package:flutter_resume_template/src/components/section_rating_widget.dart';
import 'package:flutter_resume_template/src/components/section_shaking.dart';
import 'package:flutter_resume_template/src/utils/helper.dart';
import 'package:flutter_resume_template/src/utils/strings.dart';
import 'package:flutter_resume_template/src/utils/typedef_utils.dart';

Expand Down Expand Up @@ -107,15 +108,16 @@ class _LayoutClassicState extends State<LayoutClassic> {
key: globalKey,
child: Wrap(
children: [
Container(
height: Config.smallHeight,
decoration: BoxDecoration(
image: DecorationImage(
image: NetworkImage(Str.backgroundImage),
fit: BoxFit.cover,
if (Helper.isTestMode)
Container(
height: Config.smallHeight,
decoration: BoxDecoration(
image: DecorationImage(
image: NetworkImage(Str.backgroundImage),
fit: BoxFit.cover,
),
),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expand Down
26 changes: 14 additions & 12 deletions lib/src/layout/layout_modern.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:flutter_resume_template/flutter_resume_template.dart';
import 'package:flutter_resume_template/src/components/section_bottom_buttons.dart';
import 'package:flutter_resume_template/src/components/section_rating_widget.dart';
import 'package:flutter_resume_template/src/components/section_shaking.dart';
import 'package:flutter_resume_template/src/utils/helper.dart';
import 'package:flutter_resume_template/src/utils/strings.dart';
import 'package:flutter_resume_template/src/utils/typedef_utils.dart';

Expand Down Expand Up @@ -112,18 +113,19 @@ class _LayoutModernState extends State<LayoutModern> {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Config.spaceBox(Config.largeSpacer),
AnimatedShakingBuilder(
autoPlay: isDragged,
child: ClipRRect(
borderRadius: BorderRadius.circular(100.0),
child: Image.network(
widget.data.image ?? Str.resumeHeader,
height: 100,
width: 90,
fit: BoxFit.fitWidth,
if (Helper.isTestMode)
AnimatedShakingBuilder(
autoPlay: isDragged,
child: ClipRRect(
borderRadius: BorderRadius.circular(100.0),
child: Image.network(
widget.data.image ?? Str.resumeHeader,
height: 100,
width: 90,
fit: BoxFit.fitWidth,
),
),
),
),
Config.spaceBox(Config.smallSpacer),
AnimatedShakingBuilder(
autoPlay: isDragged,
Expand Down Expand Up @@ -539,7 +541,7 @@ class _LayoutModernState extends State<LayoutModern> {
?.copyWith(
fontSize: 13,
letterSpacing: 0.8,
color: Colors.deepOrange),
color: Colors.grey),
)),
),
Config.spaceBox(Config.eightPx),
Expand All @@ -556,7 +558,7 @@ class _LayoutModernState extends State<LayoutModern> {
?.copyWith(
fontSize: 13,
letterSpacing: 0.8,
color: Colors.deepOrange),
color: Colors.grey),
),
),
),
Expand Down
35 changes: 19 additions & 16 deletions lib/src/layout/layout_technical.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:flutter_resume_template/flutter_resume_template.dart';
import 'package:flutter_resume_template/src/components/section_bottom_buttons.dart';
import 'package:flutter_resume_template/src/components/section_rating_widget.dart';
import 'package:flutter_resume_template/src/components/section_shaking.dart';
import 'package:flutter_resume_template/src/utils/helper.dart';
import 'package:flutter_resume_template/src/utils/strings.dart';
import 'package:flutter_resume_template/src/utils/typedef_utils.dart';

Expand Down Expand Up @@ -110,26 +111,28 @@ class _LayoutTechnicalState extends State<LayoutTechnical> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Container(
decoration: BoxDecoration(
image: DecorationImage(
image: NetworkImage(Str.backgroundImage),
fit: BoxFit.cover,
if (Helper.isTestMode)
Container(
decoration: BoxDecoration(
image: DecorationImage(
image: NetworkImage(Str.backgroundImage),
fit: BoxFit.cover,
),
),
),
child: SizedBox(
width: double.infinity,
height: 400,
child: Container(
alignment: const Alignment(0.0, 1.3),
child: CircleAvatar(
backgroundImage: NetworkImage(
widget.data.image ?? Str.resumeHeader),
radius: 70.0,
child: SizedBox(
width: double.infinity,
height: 400,
child: Container(
alignment: const Alignment(0.0, 1.3),
child: CircleAvatar(
backgroundImage: NetworkImage(
widget.data.image ??
Str.resumeHeader),
radius: 70.0,
),
),
),
),
),
Config.spaceBox(60.0),
Center(
child: AnimatedShakingBuilder(
Expand Down
6 changes: 6 additions & 0 deletions lib/src/utils/helper.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import 'dart:io';

class Helper {
static bool get isTestMode =>
!Platform.environment.containsKey('FLUTTER_TEST');
}
30 changes: 15 additions & 15 deletions lib/src/utils/strings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ class Str {
'My role was to take care of customer related design, improve the quality of the product and be ready to adapt if needed.';

static TemplateData mockData = TemplateData(
fullName: 'Matthew Smith',
currentPosition: 'Service Designer',
street: '63 Fall Street',
address: 'Toronto, ST 12874',
country: 'Canada',
email: 'matthewsmith@join.com',
phoneNumber: '+ 1 (246)869 453 00',
bio: Str.bioText,
experienceTitle: 'Creative Director',
experiencePlace: 'at Uber',
experiencePeriod: 'Sep 2018 - Jan 2020',
experienceLocation: 'New york City',
experienceDescription: Str.myRoleText,
education: 'Yale Gala University',
);
fullName: 'Matthew Smith',
currentPosition: 'Service Designer',
street: '63 Fall Street',
address: 'Toronto, ST 12874',
country: 'Canada',
email: 'matthewsmith@join.com',
phoneNumber: '+ 1 (246)869 453 00',
bio: Str.bioText,
experienceTitle: 'Creative Director',
experiencePlace: 'at Uber',
experiencePeriod: 'Sep 2018 - Jan 2020',
experienceLocation: 'New york City',
experienceDescription: Str.myRoleText,
education: 'Yale Gala University',
image: resumeHeader);
static String backgroundImage =
'https://images.pexels.com/photos/10319780/pexels-photo-10319780.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2';
static String resumeHeader =
Expand Down
12 changes: 7 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ name: flutter_resume_template

#description of the package
description: >-
The flutter_resume_template plugin provides a customizable resume template that can be easily
integrated into a Flutter application. This plugin provides a FlutterResumeTemplate widget that
takes four parameters, withButtons, TemplateData, OnEmpty(), and style, to customize the
template according to your needs.
The flutter_resume_template plugin provides a customizable resume template
that can be easily integrated into a Flutter application.
This plugin provides a FlutterResumeTemplate widget that takes the parameters,
TemplateMode, TemplateTheme, onSaveResume, TemplateData and onEmpty(),
to customize the template according to your needs.
#Version to be released
version: 1.0.0
Expand All @@ -17,7 +18,7 @@ homepage: https://github.com/JordyHers/flutter_resume_template
repository: https://github.com/JordyHers/flutter_resume_template

#remove that when the package is ready to be published
publish_to: none
#publish_to: none

#funding url
funding:
Expand All @@ -43,6 +44,7 @@ dependencies:
google_fonts: ^4.0.3
auto_size_text: ^3.0.0
flutter_shake_animated: ^0.0.5
http_mock_adapter: ^0.4.4

#logic package
pdf: ^3.10.1
Expand Down
2 changes: 1 addition & 1 deletion test/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Launch {
),
);

static pumpWidget(Widget child) => MaterialApp(
static Future<Widget> pumpWidget(Widget child) async => MaterialApp(
home: Scaffold(body: child),
);
}
2 changes: 1 addition & 1 deletion test/src/component/section_bio_container_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ void main() {
child: Text('child'),
);
// Create a test widget that has SbContainer with a Text widget as its child
final widget = Launch.pumpWidget(passedChild);
final widget = await Launch.pumpWidget(passedChild);

// Build the widget tree
await tester.pumpWidget(widget);
Expand Down
4 changes: 2 additions & 2 deletions test/src/component/section_rating_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ void main() {
testWidgets('RatingWidget displays correct number of filled stars',
(WidgetTester tester) async {
// Build the RatingWidget with a rating of 3
await tester.pumpWidget(
Launch.pumpWidget(const RatingWidget(rating: 3, title: 'English')));
await tester.pumpWidget(await Launch.pumpWidget(
const RatingWidget(rating: 3, title: 'English')));

// Verify that the RatingWidget contains 3 filled stars and 2 empty stars
expect(find.byIcon(Icons.star), findsNWidgets(3));
Expand Down
2 changes: 1 addition & 1 deletion test/src/component/section_shaking_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void main() {
testWidgets('AnimatedShakingBuilder applies ShakeWidget to child',
(WidgetTester tester) async {
// Build the AnimatedShakingBuilder with autoPlay set to true
await tester.pumpWidget(Launch.pumpWidget(
await tester.pumpWidget(await Launch.pumpWidget(
const AnimatedShakingBuilder(
autoPlay: true,
child: Text('Hello, world!'),
Expand Down
6 changes: 3 additions & 3 deletions test/src/layout/layout_business_test.dart
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import 'package:flutter_resume_template/flutter_resume_template.dart';
import 'package:flutter_resume_template/src/utils/strings.dart';
import 'package:flutter_test/flutter_test.dart';

import '../app.dart';
import '../mocks/mock_data.dart';

void main() {
testWidgets('Test launching widget and shaking children widgets',
(WidgetTester tester) async {
// Create the widget that contains the button to test
final testWidget = Launch.pumpWidget(LayoutBusiness(
mode: TemplateMode.shakeEditAndSaveMode,
data: Str.mockData,
data: MockData.data,
h: 1000,
w: 1000));

// Launch the widget
await tester.pumpWidget(testWidget);
await tester.pumpWidget(await testWidget);

// Verify that the widget is displayed on the screen
expect(find.text('Animate'), findsOneWidget);
Expand Down
29 changes: 26 additions & 3 deletions test/src/layout/layout_classic_test.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
import 'package:flutter_resume_template/flutter_resume_template.dart';
import 'package:flutter_test/flutter_test.dart';

import '../app.dart';
import '../mocks/mock_data.dart';

void main() {
test('This test will always pass', () {
// This test doesn't actually test anything, but it will always pass
expect(1 + 1, equals(2));
testWidgets('Test launching widget and shaking children widgets',
(WidgetTester tester) async {
// Create the widget that contains the button to test
final testWidget = Launch.pumpWidget(LayoutClassic(
mode: TemplateMode.shakeEditAndSaveMode,
data: MockData.data,
h: 1000,
w: 1000));

// Launch the widget
await tester.pumpWidget(await testWidget);

// Verify that the widget is displayed on the screen
expectLater(find.text('Animate'), findsOneWidget);

// Pan the widget to the right
final gesture = await tester.startGesture(Offset.zero);
await gesture.moveBy(const Offset(200, 0));
await gesture.up();

// Tap the button
await tester.tap(find.text('Animate'));
});
}
Loading

0 comments on commit f7b2ec1

Please sign in to comment.