Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
PLGuerraDesigns committed May 3, 2024
2 parents 91ed265 + baf24d1 commit d727630
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 42 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 2.3.1

- REVISED: Revised home header banner padding.
- REVISED: Revised timeline filter chip fitment.
- REVISED: Timeline entries are now sorted by start date in descending order.
- REVISED: Revised the FrostedContainer color for light mode.

## 2.3.0

- NEW: Timeline section on home page now includes projects.
Expand Down
4 changes: 4 additions & 0 deletions lib/models/app_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ class AppState extends ChangeNotifier {
entries.addAll(_projects.map((Project project) => project.timelineEntry));
}

entries.sort((TimelineEntry a, TimelineEntry b) {
return b.startDate.compareTo(a.startDate);
});

return entries;
}

Expand Down
54 changes: 29 additions & 25 deletions lib/screens/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -165,31 +165,35 @@ class HomeScreen extends StatelessWidget {
controller: scrollController,
padding: const EdgeInsets.all(16),
childrenDelegate: SliverChildListDelegate(<Widget>[
Wrap(
spacing: 8,
children: <Widget>[
CustomFilterChip(
label: Strings.education,
selected: appState.educationVisible,
onSelected: (bool value) {
appState.toggleEducationVisibility();
},
),
CustomFilterChip(
label: Strings.professional,
selected: appState.professionalExperiencesVisible,
onSelected: (bool value) {
appState.toggleProfessionalExperienceVisibility();
},
),
CustomFilterChip(
label: Strings.projects,
selected: appState.projectsVisible,
onSelected: (bool value) {
appState.toggleProjectsVisibility();
},
),
],
FittedBox(
fit: BoxFit.scaleDown,
alignment: Alignment.centerLeft,
child: Row(
children: <Widget>[
CustomFilterChip(
label: Strings.education,
selected: appState.educationVisible,
onSelected: (bool value) {
appState.toggleEducationVisibility();
},
),
CustomFilterChip(
label: Strings.professional,
selected: appState.professionalExperiencesVisible,
onSelected: (bool value) {
appState
.toggleProfessionalExperienceVisibility();
},
),
CustomFilterChip(
label: Strings.projects,
selected: appState.projectsVisible,
onSelected: (bool value) {
appState.toggleProjectsVisibility();
},
),
],
),
),
Padding(
padding: const EdgeInsets.only(top: 8.0),
Expand Down
24 changes: 15 additions & 9 deletions lib/widgets/custom_filter_chip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,21 @@ class CustomFilterChip extends StatelessWidget {

@override
Widget build(BuildContext context) {
return FilterChip.elevated(
label: Text(label),
selected: selected,
onSelected: onSelected,
selectedColor: Theme.of(context).colorScheme.background,
backgroundColor:
Theme.of(context).colorScheme.background.withOpacity(0.2),
checkmarkColor: Theme.of(context).colorScheme.primary,
visualDensity: VisualDensity.compact,
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 4.0),
child: FilterChip.elevated(
label: Text(
label,
style: Theme.of(context).textTheme.labelLarge,
),
selected: selected,
onSelected: onSelected,
selectedColor: Theme.of(context).colorScheme.background,
backgroundColor:
Theme.of(context).colorScheme.background.withOpacity(0.2),
checkmarkColor: Theme.of(context).colorScheme.primary,
visualDensity: VisualDensity.compact,
),
);
}
}
6 changes: 2 additions & 4 deletions lib/widgets/frosted_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ class FrostedContainer extends StatelessWidget {
return Material(
color: Colors.transparent,
elevation: 3,
shadowColor: Theme.of(context).brightness == Brightness.dark
? Colors.black87
: Colors.black87,
shadowColor: Colors.black87,
borderRadius: BorderRadius.circular(borderRadiusAmount),
child: ClipRRect(
borderRadius: BorderRadius.circular(borderRadiusAmount),
Expand All @@ -36,7 +34,7 @@ class FrostedContainer extends StatelessWidget {
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).brightness == Brightness.light
? Theme.of(context).colorScheme.surface.withOpacity(0.75)
? Theme.of(context).colorScheme.background.withOpacity(0.8)
: Theme.of(context)
.colorScheme
.surfaceVariant
Expand Down
15 changes: 12 additions & 3 deletions lib/widgets/header_banner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,26 @@ class HeaderBanner extends StatelessWidget {
@override
Widget build(BuildContext context) {
return FrostedContainer(
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0),
child: Row(
children: <Widget>[
if (leading != null) leading!,
if (leading != null) const SizedBox(width: 16.0),
if (leading != null) const SizedBox(width: 12.0),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
title,
const SizedBox(height: 10.0),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 4.0),
child: title,
),
const Divider(),
subtitle,
Padding(
padding: const EdgeInsets.symmetric(horizontal: 4.0),
child: subtitle,
),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: plg_portfolio
description: Pablo L. Guerra's web-app portfolio powered by Flutter.
publish_to: "none"
version: 2.3.0+40
version: 2.3.1+41

environment:
sdk: ">=3.1.1 <4.0.0"
Expand Down

0 comments on commit d727630

Please sign in to comment.