qqmikey / kf_drawer Goto Github PK
View Code? Open in Web Editor NEWFlutter drawer (dynamic ready side menu)
License: MIT License
Flutter drawer (dynamic ready side menu)
License: MIT License
The possibility to change the KFDrawerController.items programmatically after first initialization/declaration.
Examples:
Hello,
First thanks for the good job you have done.
I have an issue with the routing, the issue is that no route is been pushed while navigating through the drawer item. If I landed @ home page then go to second page and pressed on back button it will navigate me back to '/' or to login page in my case.
Is there is a way to keep a track for the route while navigating through the drawer?
Thanks in advance.
Please add centered list when menu is scrollable
if (widget.scrollable) {
return Column(
children: [
Container(
child: widget.header,
),
Expanded(
child: Center(
child: ListView(
shrinkWrap: true,
children: widget.items,
),
),
),
if (widget.footer != null) widget.footer!,
],
);
}
Adding KFDrawerItem onPress function prevents page routing and onMenuPress. Is there a way to add an onPress handler to the KFDrawerItem while still maintaining the usual navigation?
I am using your package as a dependency, and need to ship this project by the end of this month. I came across this hurdle when I was migrating my project to null safety.
Need KFDrawerContent.of(context) to pass on Menu Press
Hello,
Refresh current page When i click menu button and open drawer .
What is classbuilder . please give any suggestion with example
Hello Developer Actually I was making app which contains both drawer and bottom navigation but I am not able to do that please add function to add both together.
Some Code Demo
import 'package:drawer/pages/mainpage.dart';
import 'package:drawer/shared/drawer.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Plaza'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _currentIndex = 0;
static List _widgetOptions = [
MainPage(),
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
elevation: 0,
backgroundColor: Colors.transparent,
title: Text(widget.title , style: TextStyle(color: Colors.black54,fontSize: 26 , fontWeight: FontWeight.w600),),
),
**body: Center(
child: _widgetOptions.elementAt(_currentIndex),
),** // Here i can only add one thing that is a drawer or bottom navigation bar
bottomNavigationBar: BottomNavigationBar(
elevation: 2,
onTap: onTabTapped,
currentIndex: _currentIndex,
items: [
BottomNavigationBarItem(
icon: Icon(
Icons.fastfood,
color: Colors.black,
),
title: Text(
'Recipies',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
),
BottomNavigationBarItem(
icon: Icon(
Icons.local_offer,
color: Colors.black,
),
title: Text(
'Brands',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
),
BottomNavigationBarItem(
icon: Icon(
Icons.restaurant_menu,
color: Colors.black,
),
title: Text(
'Menu',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
),
BottomNavigationBarItem(
icon: Icon(
Icons.person,
color: Colors.black,
),
title: Text(
'Profile',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
),
BottomNavigationBarItem(
icon: Icon(
Icons.shopping_basket,
color: Colors.black,
),
title: Text(
'Cart',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
),
],
),
);
}
void onTabTapped(int index) {
setState(() {
_currentIndex = index;
});
}
}
Kf drawer menu is not working in release mode but working fine in debug mode!
flutter: #7 ComponentElement.mount
package:flutter/…/widgets/framework.dart:3902
flutter: #8 Element.inflateWidget
package:flutter/…/widgets/framework.dart:3084
flutter: #9 Element.updateChild
package:flutter/…/widgets/framework.dart:2887
flutter: #10 ComponentElement.performRebuild
package:flutter/…/widgets/framework.dart:3935
flutter: #11 Element.rebuild
package:flutter/…/widgets/framework.dart:3721
flutter: #12 BuildOwner.buildScope
package:flutter/…/widgets/framework.dart:2340
flutter: #13 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame
package:flutter/…/widgets/binding.dart:700
flutter: #14 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback
package:flutter/…/rendering/binding.dart:285
flutter: #15 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback
package:flutter/…/scheduler/binding.dart:1016
flutter: #16 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame
package:flutter/…/scheduler/binding.dart:958
flutter: #17 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame
package:flutter/…/scheduler/binding.dart:874
flutter: #21 _invoke (dart:ui/hooks.dart:236:10)
flutter: #22 _drawFrame (dart:ui/hooks.dart:194:3)
flutter: (elided 3 frames from package dart:async)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
Hi! greetings!
I found a issue when i updagrde flutter:
kf_drawer-1.2.0/lib/kf_drawer.dart:169:10: Error: A value of type 'Animation<BorderRadius?>' can't be assigned to a variable of type 'Animation<BorderRadius>' because 'BorderRadius?' is nullable and 'BorderRadius' isn't.
and my project no works,
I appreciate your help, thanks!
Are there plans for RTL support?
Opening the menu from the right side etc.
Can you provide us with how to use this as a library in our project, that would be helpfull
I trying to make an app with kurdish language and it is from right to left how can i do that.
I can't use the package because Null Safety is not passed. When will you switch to Null Safety?
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.