-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd3c676
commit 01577d9
Showing
24 changed files
with
332 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,51 @@ import 'package:impaktfull_ui_2/impaktfull_ui.dart'; | |
import 'package:impaktfull_ui_example/src/component_library/components/sidebar_navigation/sidebar_navigation_library_item.dart'; | ||
import 'package:impaktfull_ui_example/src/component_library/config/component_library_item.dart'; | ||
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 [ | ||
SizedBox( | ||
ComponentsLibraryVariantDescriptor( | ||
height: 250, | ||
child: ImpaktfullUiSidebarNavigation( | ||
width: 200, | ||
header: ImpaktfullUiAssetWidget( | ||
asset: theme.assets.images.logo, | ||
width: 150, | ||
), | ||
items: [ | ||
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', | ||
), | ||
], | ||
), | ||
), | ||
ComponentsLibraryVariantDescriptor( | ||
height: 500, | ||
width: 300, | ||
child: ImpaktfullUiSidebarNavigation( | ||
asset: theme.assets.images.logo, | ||
items: [ | ||
|
@@ -28,6 +60,15 @@ class SidebarNavigationLibraryVariant extends ComponentLibraryVariant<SidebarNav | |
title: 'Search', | ||
), | ||
], | ||
secondaryItems: List.generate( | ||
inputs.amountOfSecondaryItems.value ?? 0, (index) => index) | ||
.map( | ||
(index) => ImpaktfullUiSidebarNavigationItem( | ||
leading: theme.assets.icons.confetti, | ||
title: 'Submenu $index', | ||
), | ||
) | ||
.toList(), | ||
footerItems: [ | ||
ImpaktfullUiSidebarNavigationItem( | ||
leading: theme.assets.icons.settings, | ||
|
@@ -54,10 +95,12 @@ class SidebarNavigationLibraryVariant extends ComponentLibraryVariant<SidebarNav | |
), | ||
), | ||
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: 4, | ||
vertical: 8, | ||
), | ||
title: 'impaktfull admin', | ||
subtitle: '[email protected]', | ||
|
@@ -70,7 +113,8 @@ class SidebarNavigationLibraryVariant extends ComponentLibraryVariant<SidebarNav | |
textDirection: Directionality.of(context), | ||
child: ImpaktfullUiIconButton( | ||
asset: theme.assets.icons.logout, | ||
onTap: () => ImpaktfullUiNotification.show(title: 'Logout tapped'), | ||
onTap: () => | ||
ImpaktfullUiNotification.show(title: 'Logout tapped'), | ||
), | ||
), | ||
], | ||
|
@@ -81,7 +125,9 @@ class SidebarNavigationLibraryVariant extends ComponentLibraryVariant<SidebarNav | |
} | ||
|
||
@override | ||
SidebarNavigationLibraryPrimaryInputs inputs() => SidebarNavigationLibraryPrimaryInputs(); | ||
SidebarNavigationLibraryPrimaryInputs inputs() => | ||
SidebarNavigationLibraryPrimaryInputs(); | ||
} | ||
|
||
class SidebarNavigationLibraryPrimaryInputs extends SidebarNavigationLibraryInputs {} | ||
class SidebarNavigationLibraryPrimaryInputs | ||
extends SidebarNavigationLibraryInputs {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
part of 'network_image.dart'; | ||
|
||
String _describeInstance(BuildContext context, ImpaktfullUiNetworkImage instance) { | ||
String _describeInstance( | ||
BuildContext context, ImpaktfullUiNetworkImage instance) { | ||
final descriptor = ComponentDescriptor(); | ||
descriptor.add('theme', instance.theme); | ||
return descriptor.describe(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.