Skip to content

Commit 2096503

Browse files
committed
add github
1 parent ee9d01c commit 2096503

File tree

9 files changed

+48
-4
lines changed

9 files changed

+48
-4
lines changed

Diff for: assets/api/en/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"email": "[email protected]",
66
"image": "assets/images/png/pedram.jpg",
77
"linkedInUrl": "http://linkedin.com/in/pedram-mohammad-ali-pour-b44721141",
8-
"portfolioUrl": "https://b1101-portfolio.web.app/"
8+
"portfolioUrl": "https://b1101-portfolio.web.app/",
9+
"githubUrl": "https://github.com/P-B1101"
910
}

Diff for: assets/api/fa/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"email": "[email protected]",
66
"image": "assets/images/png/pedram.jpg",
77
"linkedInUrl": "http://linkedin.com/in/pedram-mohammad-ali-pour-b44721141",
8-
"portfolioUrl": "https://b1101-portfolio.web.app/"
8+
"portfolioUrl": "https://b1101-portfolio.web.app/",
9+
"githubUrl": "https://github.com/P-B1101"
910
}

Diff for: lib/feature/home/data/model/info_model.dart

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class InfoModel extends Info {
99
required super.image,
1010
required super.linkedInUrl,
1111
required super.portfolioUrl,
12+
required super.githubUrl,
1213
});
1314
factory InfoModel.fromJson(Map<String, dynamic> json) => InfoModel(
1415
name: json['name'],
@@ -18,5 +19,6 @@ class InfoModel extends Info {
1819
image: json['image'],
1920
linkedInUrl: json['linkedInUrl'] ?? '',
2021
portfolioUrl: json['portfolioUrl'] ?? '',
22+
githubUrl: json['githubUrl'] ?? '',
2123
);
2224
}

Diff for: lib/feature/home/domain/entity/info.dart

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class Info extends Equatable {
88
final String image;
99
final String linkedInUrl;
1010
final String portfolioUrl;
11+
final String githubUrl;
1112

1213
const Info({
1314
required this.name,
@@ -17,6 +18,7 @@ class Info extends Equatable {
1718
required this.image,
1819
required this.linkedInUrl,
1920
required this.portfolioUrl,
21+
required this.githubUrl,
2022
});
2123
@override
2224
List<Object?> get props => [
@@ -27,6 +29,7 @@ class Info extends Equatable {
2729
image,
2830
linkedInUrl,
2931
portfolioUrl,
32+
githubUrl,
3033
];
3134

3235
Info copyWith({
@@ -40,11 +43,14 @@ class Info extends Equatable {
4043
linkedInUrl: linkedInUrl,
4144
image: imageUrl ?? image,
4245
portfolioUrl: portfolioUrl,
46+
githubUrl: githubUrl,
4347
);
4448

4549
bool get hasLinkedInUrl => linkedInUrl.isNotEmpty;
46-
50+
4751
bool get hasPortfolioUrl => portfolioUrl.isNotEmpty;
4852

53+
bool get hasGithubUrl => githubUrl.isNotEmpty;
54+
4955
String get getFullName => '$name $lastName';
5056
}

Diff for: lib/feature/home/presentation/page/phone/home_page_phone.dart

+16
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,22 @@ class HomePagePhone extends StatelessWidget {
358358
),
359359
),
360360
),
361+
BlocBuilder<InfoBloc, InfoState>(
362+
builder: (context, state) => Padding(
363+
padding: const EdgeInsetsDirectional.only(
364+
top: 16,
365+
start: 24,
366+
),
367+
child: state.info == null ||
368+
!state.info!.hasGithubUrl
369+
? null
370+
: QRWidget(
371+
title:
372+
Strings.of(context).github_link_label,
373+
url: state.info!.githubUrl,
374+
),
375+
),
376+
),
361377
],
362378
),
363379
),

Diff for: lib/feature/home/presentation/page/window/home_page_window.dart

+16
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,22 @@ class HomePageWindow extends StatelessWidget {
343343
),
344344
),
345345
),
346+
BlocBuilder<InfoBloc, InfoState>(
347+
builder: (context, state) => Padding(
348+
padding: const EdgeInsetsDirectional.only(
349+
top: 24,
350+
start: 32,
351+
),
352+
child: state.info == null ||
353+
!state.info!.hasGithubUrl
354+
? null
355+
: QRWidget(
356+
title:
357+
Strings.of(context).github_link_label,
358+
url: state.info!.githubUrl,
359+
),
360+
),
361+
),
346362
],
347363
),
348364
const SizedBox(height: 32),

Diff for: lib/l10n/app_en.arb

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"web_link_label": "Web",
2222
"linked_in_link_label": "LinkedIn",
2323
"portfolio_link_label": "Portfolio",
24+
"github_link_label": "Github",
2425
"farsi_label": "Persian",
2526
"english_label": "English"
2627
}

Diff for: lib/l10n/app_fa.arb

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"web_link_label": "وب",
2222
"linked_in_link_label": "لینکدین",
2323
"portfolio_link_label": "رزومه آنلاین",
24+
"github_link_label": "گیت هاب",
2425
"farsi_label": "فارسی",
2526
"english_label": "انگلیسی"
2627
}

Diff for: macos/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ SPEC CHECKSUMS:
6060

6161
PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
6262

63-
COCOAPODS: 1.12.1
63+
COCOAPODS: 1.15.2

0 commit comments

Comments
 (0)