Skip to content

Commit

Permalink
fix: sidebar_navigation item
Browse files Browse the repository at this point in the history
  • Loading branch information
vanlooverenkoen committed Oct 5, 2024
1 parent dd02d11 commit 021694b
Showing 1 changed file with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ import 'package:impaktfull_ui_example/src/component_library/config/component_lib
import 'package:impaktfull_ui_example/src/util/network_images.dart';
import 'package:impaktfull_ui_example/src/widget/components/components_library_variant_descriptor.dart';

class SidebarNavigationLibraryVariant
extends ComponentLibraryVariant<SidebarNavigationLibraryPrimaryInputs> {
class SidebarNavigationLibraryVariant extends ComponentLibraryVariant<SidebarNavigationLibraryPrimaryInputs> {
const SidebarNavigationLibraryVariant();

@override
String get title => 'Default';

@override
List<Widget> build(
BuildContext context, SidebarNavigationLibraryPrimaryInputs inputs) {
List<Widget> build(BuildContext context, SidebarNavigationLibraryPrimaryInputs inputs) {
return [
ComponentsLibraryVariantDescriptor(
height: 250,
Expand Down Expand Up @@ -54,14 +52,23 @@ class SidebarNavigationLibraryVariant
ImpaktfullUiSidebarNavigationItem(
leading: theme.assets.icons.home,
title: 'Home',
items: [
ImpaktfullUiSidebarNavigationItem(
leading: theme.assets.icons.confetti,
title: 'Projects',
),
ImpaktfullUiSidebarNavigationItem(
leading: theme.assets.icons.confetti,
title: 'Apps',
),
],
),
ImpaktfullUiSidebarNavigationItem(
leading: theme.assets.icons.search,
title: 'Search',
),
],
secondaryItems: List.generate(
inputs.amountOfSecondaryItems.value ?? 0, (index) => index)
secondaryItems: List.generate(inputs.amountOfSecondaryItems.value ?? 0, (index) => index)
.map(
(index) => ImpaktfullUiSidebarNavigationItem(
leading: theme.assets.icons.confetti,
Expand Down Expand Up @@ -95,9 +102,7 @@ class SidebarNavigationLibraryVariant
),
),
trailingWidgetBuilder: (context) => const SizedBox(width: 40),
borderRadius: ImpaktfullUiSidebarNavigationItemTheme.of(context)
.dimens
.borderRadius,
borderRadius: ImpaktfullUiSidebarNavigationItemTheme.of(context).dimens.borderRadius,
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 8,
Expand All @@ -113,8 +118,7 @@ class SidebarNavigationLibraryVariant
textDirection: Directionality.of(context),
child: ImpaktfullUiIconButton(
asset: theme.assets.icons.logout,
onTap: () =>
ImpaktfullUiNotification.show(title: 'Logout tapped'),
onTap: () => ImpaktfullUiNotification.show(title: 'Logout tapped'),
),
),
],
Expand All @@ -125,9 +129,7 @@ class SidebarNavigationLibraryVariant
}

@override
SidebarNavigationLibraryPrimaryInputs inputs() =>
SidebarNavigationLibraryPrimaryInputs();
SidebarNavigationLibraryPrimaryInputs inputs() => SidebarNavigationLibraryPrimaryInputs();
}

class SidebarNavigationLibraryPrimaryInputs
extends SidebarNavigationLibraryInputs {}
class SidebarNavigationLibraryPrimaryInputs extends SidebarNavigationLibraryInputs {}

0 comments on commit 021694b

Please sign in to comment.