Skip to content

Commit

Permalink
refactor: naming
Browse files Browse the repository at this point in the history
  • Loading branch information
AladdineDev committed Feb 10, 2024
1 parent 5facd0a commit 6a23ac3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions lib/src/common/widgets/link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'package:portfolio/src/constants/sizes.dart';
import 'package:portfolio/src/utils/launch_url_helper.dart';
import 'package:portfolio/src/utils/scaffold_messenger_helper.dart';

class LinkWidget extends StatefulHookConsumerWidget {
const LinkWidget({
class MyLink extends StatefulHookConsumerWidget {
const MyLink({
super.key,
required this.url,
this.displayLink,
Expand All @@ -22,10 +22,10 @@ class LinkWidget extends StatefulHookConsumerWidget {
final Color hoverColor;

@override
ConsumerState<LinkWidget> createState() => _LinkState();
ConsumerState<MyLink> createState() => _LinkState();
}

class _LinkState extends ConsumerState<LinkWidget> {
class _LinkState extends ConsumerState<MyLink> {
late ColorTween _colorTween;

@override
Expand Down
6 changes: 3 additions & 3 deletions lib/src/common/widgets/technology_wrap_chips.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ import 'package:portfolio/src/common/widgets/technology_chip.dart';
class TechnologyWrapChips extends ConsumerWidget {
const TechnologyWrapChips({
super.key,
required this.titles,
required this.technologies,
});

final List<Technology> titles;
final List<Technology> technologies;

@override
Widget build(BuildContext context, WidgetRef ref) {
return Wrap(
spacing: 8,
runSpacing: 8,
children: titles.map((technology) {
children: technologies.map((technology) {
return TechnologyChip(technology: technology);
}).toList(),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/common/widgets/wrap_links.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class WrapLinks extends ConsumerWidget {
final projectLinkUrl = link.url;
final projectLinkDisplay = link.display;
if (projectLinkUrl == null) return const SizedBox.shrink();
return LinkWidget(
return MyLink(
url: projectLinkUrl,
displayLink: projectLinkDisplay ?? projectLinkUrl,
displayLeadingIcon: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class ExperienceCard extends ConsumerWidget {
Widget _buildChips() {
final experienceTechnologies = experience.technologies;
if (experienceTechnologies == null) return const SizedBox.shrink();
return TechnologyWrapChips(titles: experienceTechnologies);
return TechnologyWrapChips(technologies: experienceTechnologies);
}

Widget _buildLinks() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ProjectDescription extends ConsumerWidget {
Widget _buildChips() {
final projectTechnologies = project.technologies;
if (projectTechnologies == null) return const SizedBox.shrink();
return TechnologyWrapChips(titles: projectTechnologies);
return TechnologyWrapChips(technologies: projectTechnologies);
}

Widget _buildLinks(BuildContext context) {
Expand Down

0 comments on commit 6a23ac3

Please sign in to comment.