jksevend / side_navigation Goto Github PK
View Code? Open in Web Editor NEWProvides Flutter navigation by using a sidemenu similar to Drawer or BottomNavigationBar
Home Page: https://pub.dev/packages/side_navigation
License: MIT License
Provides Flutter navigation by using a sidemenu similar to Drawer or BottomNavigationBar
Home Page: https://pub.dev/packages/side_navigation
License: MIT License
I'm using your package and it's super good, thanks for that. I wanted to add a header to my side navigation bar, I used the SideNavigationBarHeader, but the image is required, and according to the design that I'm creating there is no image to display, so that would be great if you turn the image
into an optional nullable parameter. Thanks!
I would like to be able to choose the unselected color in the SideNavigationBarItem for icon and label. The background being used almost makes the unselected items disappear.
Is it possible to bake in D Pad navigation out of the box
How can I change the Icon Color to white. so I cal view them when I have set page background to black
expandIcon: Icons.arrow_right,
shrinkIcon: Icons.arrow_left,
Hi do you have examples for using the Theme options
SideNavigationBarTheme Fields
ItemTheme fields
TogglerTheme fields
it's useful to change textStyle for each label and changing icon size maybe by theme.
if u accept PR i can make one.
Hello, i wanted to know is there a way to create a custom Navigation Item? Thanks
Dev environment:
$ flutter --version
Flutter 3.3.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision d9111f6402 (6 days ago) • 2022-10-19 12:27:13 -0700
Engine • revision 3ad69d7be3
Tools • Dart 2.18.2 • DevTools 2.15.0
Lib version:
side_navigation: ^1.0.4
Project: Created a sample flutter project for Web and Linux, added the side bar, and the items
(aka SideNavigationBarItem
) are faded.
Code:
@override
Widget build(BuildContext context) {
// This method is rerun every time setState is called, for instance as done
// by the _incrementCounter method above.
//
// The Flutter framework has been optimized to make rerunning build methods
// fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets.
return Scaffold(
body: Row(
children: [
SideNavigationBar(
selectedIndex: _index,
header: SideNavigationBarHeader(
image: CircleAvatar(
child: Icon(Icons.wallet),
),
title: Text('Test', style: Theme.of(context).textTheme.headline6),
subtitle: SizedBox.shrink(),
),
footer: const SideNavigationBarFooter(
label: Text('Footer label')
),
items: const [
SideNavigationBarItem(
icon: Icons.dashboard,
label: 'Dashboard',
),
SideNavigationBarItem(
icon: Icons.person,
label: 'Account',
),
SideNavigationBarItem(
icon: Icons.settings,
label: 'Settings',
),
],
onTap: (index) {
setState(() {
_index = index;
});
},
),
Expanded(
child: ListView(
children: [
Text('Main body', style: Theme.of(context).textTheme.headline4,),
],
),
),
],
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
Any idea why items have a bit of a fade? Anything that I'm missing in the config?
among other things, such as the inkwell colors and interactions.
great widget, simple to implement and use. thank you.
request footer and header not be required. Instead, optionally be able to place a container that we can then add our own widgets to both areas
I got this error on build
ERROR: ../../.pub-cache/hosted/pub.dartlang.org/side_navigation-0.0.7/lib/src/api/side_navigation_bar.dart:104:26: Error: Required named parameter 'vsync' must be provided.
ERROR: child: AnimatedSize(
ERROR: ^
ERROR: ../../snap/flutter/common/flutter/packages/flutter/lib/src/widgets/animated_size.dart:56:9: Context: Found this candidate, but the arguments don't match.
ERROR: const AnimatedSize({
ERROR: ^^^^^^^^^^^^
Exception: Build process failed
this is my base.dart
class Base extends StatefulWidget {
@override
State<StatefulWidget> createState() => _Base();
}
class _Base extends State<Base> {
List<Widget> views = const [
Center(
child: Text('Setting'),
),
Center(
child: Text('Account'),
),
Center(
child: Text('Settings'),
),
];
/// The currently selected index of the bar
int selectedIndex = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
/// You can use an AppBar if you want to
//appBar: AppBar(
// title: const Text('App'),
//),
// The row is needed to display the current view
body: Row(
children: [
/// Pretty similar to the BottomNavigationBar!
SideNavigationBar(
selectedIndex: selectedIndex,
items: const [
SideNavigationBarItem(
icon: Icons.dashboard,
label: 'Dashboard',
),
SideNavigationBarItem(
icon: Icons.person,
label: 'Account',
),
SideNavigationBarItem(
icon: Icons.settings,
label: 'Settings',
),
],
onTap: (index) {
setState(() {
selectedIndex = index;
});
},
),
/// Make it take the rest of the available width
Expanded(
child: views.elementAt(selectedIndex),
)
],
),
);
}
}
I just add the example on my base class.
Is it possible to add the capability of having a logo before the first SideNavigationBarItem
It would be good if l can change background color of SideNavigationBarItem when is active and when is not active.
Expanded(
child: _body(context),
)
_body returns a listview but I cant scroll in Chrome for Desktop and Edge for Desktop I can scroll fine on mobile browsers and
Hi, i found a bug that i think is quite easy to fix, when side bar is expanded try to pull right side of the window to shrink window width, at the moment when size of whole window is smaller then size of side bar, you will get overflow error.
I think if the width of window is smaller then (lets say 600) then it should auto fold to prevent this error from happening
The scroll bar is not clickable when there are multiple items in the menu. the scrollbar does not recognize the mouse click.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.