Skip to content

Commit 1d87884

Browse files
authored
Merge pull request #5 from VVK027/ui_updates
added pub.dev link to the project.
2 parents a6f9b22 + b280daa commit 1d87884

12 files changed

Lines changed: 81 additions & 127 deletions

File tree

CONTRIBUTING.md

Lines changed: 0 additions & 122 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ flutter test --coverage
130130
dart run build_runner build --delete-conflicting-outputs
131131
```
132132

133-
See [CONTRIBUTING.md](CONTRIBUTING.md) for branch naming, PR expectations, and contribution ideas.
134-
135133
## Build
136134

137135
```bash

assets/data.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@
309309
"previewImage": "assets/projects/flutter_band_fit_preview.jpg",
310310
"playStoreUrl": [],
311311
"appStoreUrl": [],
312-
"githubUrl": "https://github.com/VVK027/flutter_band_fit"
312+
"githubUrl": "https://github.com/VVK027/flutter_band_fit",
313+
"pubUrl": "https://pub.dev/packages/flutter_band_fit"
313314
},
314315
{
315316
"name": "Docty Digital Health for All",

assets/icons/pub.svg

Lines changed: 1 addition & 0 deletions
Loading

lib/core/theme/app_colors.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ class AppColors extends ThemeExtension<AppColors> {
5050
final Color appStoreBorder;
5151
final Color githubFg;
5252
final Color githubBorder;
53+
final Color pubFg;
54+
final Color pubBorder;
5355
final Color internalLabel;
5456
final Color success;
5557
final Color toggleCircle;
@@ -107,6 +109,8 @@ class AppColors extends ThemeExtension<AppColors> {
107109
required this.appStoreBorder,
108110
required this.githubFg,
109111
required this.githubBorder,
112+
required this.pubFg,
113+
required this.pubBorder,
110114
required this.internalLabel,
111115
required this.success,
112116
required this.toggleCircle,
@@ -165,6 +169,8 @@ class AppColors extends ThemeExtension<AppColors> {
165169
appStoreBorder: Color(0xFFC7D2FE),
166170
githubFg: Color(0xFF1E293B),
167171
githubBorder: Color(0xFFCBD5E1),
172+
pubFg: Color(0xFF0175C2),
173+
pubBorder: Color(0xFF7EC8E8),
168174
internalLabel: Color(0xFF64748B),
169175
success: Color(0xFF16A34A),
170176
toggleCircle: Color(0xFFFFFFFF),
@@ -223,6 +229,8 @@ class AppColors extends ThemeExtension<AppColors> {
223229
appStoreBorder: Color(0xFF4E5370),
224230
githubFg: Color(0xFFE0E0E0),
225231
githubBorder: Color(0xFF4E5370),
232+
pubFg: Color(0xFF64B5F6),
233+
pubBorder: Color(0xFF4E5370),
226234
internalLabel: Color(0xFF94A3B8),
227235
success: Color(0xFF81C784),
228236
toggleCircle: Color(0xFFE8EEFF),
@@ -282,6 +290,8 @@ class AppColors extends ThemeExtension<AppColors> {
282290
Color? appStoreBorder,
283291
Color? githubFg,
284292
Color? githubBorder,
293+
Color? pubFg,
294+
Color? pubBorder,
285295
Color? internalLabel,
286296
Color? success,
287297
Color? toggleCircle,
@@ -342,6 +352,8 @@ class AppColors extends ThemeExtension<AppColors> {
342352
appStoreBorder: appStoreBorder ?? this.appStoreBorder,
343353
githubFg: githubFg ?? this.githubFg,
344354
githubBorder: githubBorder ?? this.githubBorder,
355+
pubFg: pubFg ?? this.pubFg,
356+
pubBorder: pubBorder ?? this.pubBorder,
345357
internalLabel: internalLabel ?? this.internalLabel,
346358
success: success ?? this.success,
347359
toggleCircle: toggleCircle ?? this.toggleCircle,
@@ -409,6 +421,8 @@ class AppColors extends ThemeExtension<AppColors> {
409421
appStoreBorder: l(appStoreBorder, other.appStoreBorder),
410422
githubFg: l(githubFg, other.githubFg),
411423
githubBorder: l(githubBorder, other.githubBorder),
424+
pubFg: l(pubFg, other.pubFg),
425+
pubBorder: l(pubBorder, other.pubBorder),
412426
internalLabel: l(internalLabel, other.internalLabel),
413427
success: l(success, other.success),
414428
toggleCircle: l(toggleCircle, other.toggleCircle),

lib/data/mappers/portfolio_mapper.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class PortfolioMapper {
4646
fullDescription: model.fullDescription,
4747
features: model.features,
4848
githubUrl: model.githubUrl,
49+
pubUrl: model.pubUrl,
4950
);
5051
}
5152

lib/data/models/portfolio_model.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class ProjectModel {
8686
final List<String>? fullDescription;
8787
final List<String>? features;
8888
final String? githubUrl;
89+
final String? pubUrl;
8990

9091
ProjectModel(
9192
this.name,
@@ -97,6 +98,7 @@ class ProjectModel {
9798
this.fullDescription,
9899
this.features,
99100
this.githubUrl,
101+
this.pubUrl,
100102
);
101103

102104
factory ProjectModel.fromJson(Map<String, dynamic> json) =>

lib/domain/entities/portfolio.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class Project {
6161
final List<String>? fullDescription;
6262
final List<String>? features;
6363
final String? githubUrl;
64+
final String? pubUrl;
6465

6566
const Project({
6667
required this.name,
@@ -72,6 +73,7 @@ class Project {
7273
this.fullDescription,
7374
this.features,
7475
this.githubUrl,
76+
this.pubUrl,
7577
});
7678
}
7779

lib/presentation/widgets/portfolio_asset_icon.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'package:vivekdevfolio/presentation/widgets/svg_path_parser.dart';
66
enum PortfolioIcon {
77
linkedin('assets/icons/linkedin.svg'),
88
github('assets/icons/github.svg'),
9+
pub('assets/icons/pub.svg'),
910
facebook('assets/icons/facebook-f.svg'),
1011
whatsapp('assets/icons/whatsapp.svg');
1112

lib/presentation/widgets/project_detail_sheet.dart

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ class _ProjectDetailContent extends StatelessWidget {
5555
final playStoreUrls = project.playStoreUrl;
5656
final appStoreUrls = project.appStoreUrl;
5757
final githubUrl = (project.githubUrl ?? '').trim();
58+
final pubUrl = (project.pubUrl ?? '').trim();
5859
final hasPlayStore = playStoreUrls.isNotEmpty;
5960
final hasAppStore = appStoreUrls.isNotEmpty;
6061
final hasGithub = githubUrl.isNotEmpty;
62+
final hasPub = pubUrl.isNotEmpty;
6163
final descriptions = project.fullDescription ?? [project.desc];
6264
final features = project.features ?? [];
6365
final hasFeatures = features.isNotEmpty;
@@ -185,7 +187,7 @@ class _ProjectDetailContent extends StatelessWidget {
185187
),
186188
Padding(
187189
padding: const EdgeInsets.fromLTRB(24, 0, 24, 20),
188-
child: (hasPlayStore || hasAppStore || hasGithub)
190+
child: (hasPlayStore || hasAppStore || hasGithub || hasPub)
189191
? SizedBox(
190192
height: 48,
191193
child: SingleChildScrollView(
@@ -196,6 +198,7 @@ class _ProjectDetailContent extends StatelessWidget {
196198
playStoreUrls: playStoreUrls,
197199
appStoreUrls: appStoreUrls,
198200
githubUrl: hasGithub ? githubUrl : null,
201+
pubUrl: hasPub ? pubUrl : null,
199202
),
200203
),
201204
),
@@ -244,6 +247,7 @@ class _ProjectDetailContent extends StatelessWidget {
244247
required List<String> playStoreUrls,
245248
required List<String> appStoreUrls,
246249
required String? githubUrl,
250+
required String? pubUrl,
247251
}) {
248252
final colors = context.appColors;
249253
final widgets = <Widget>[];
@@ -312,6 +316,29 @@ class _ProjectDetailContent extends StatelessWidget {
312316
);
313317
}
314318

319+
if (pubUrl != null) {
320+
if (widgets.isNotEmpty) widgets.add(const SizedBox(width: 10));
321+
widgets.add(
322+
FilledButton.icon(
323+
onPressed: () => _openUrl(context, pubUrl),
324+
icon: const PortfolioAssetIcon(
325+
icon: PortfolioIcon.pub,
326+
size: 18,
327+
),
328+
label: const Text('pub.dev'),
329+
style: FilledButton.styleFrom(
330+
minimumSize: const Size(0, 48),
331+
backgroundColor: colors.pubFg.withValues(alpha: 0.12),
332+
foregroundColor: colors.pubFg,
333+
shape: RoundedRectangleBorder(
334+
borderRadius: BorderRadius.circular(10),
335+
side: BorderSide(color: colors.pubBorder),
336+
),
337+
),
338+
),
339+
);
340+
}
341+
315342
return widgets;
316343
}
317344

0 commit comments

Comments
 (0)