flutter sidebar widget
an easy to configure sidebar widget for your flutter mobile/web apps.
usage
import 'package:flutter_sidebar/flutter_sidebar.dart';
simple sidebar with few sidebar items:
class myhomepage extends statelesswidget {
@override
widget build(buildcontext context) {
return scaffold(
appbar: appbar(title: text('flutter sidebar')),
drawer: sidebar.fromjson(
tabs: [
{
'title': 'chapter a',
'children': [
{'title': 'chapter a1'},
{'title': 'chapter a2'},
],
},
{
'title': 'chapter b',
'children': [
{'title': 'chapter b1'},
{
'title': 'chapter b2',
'children': [
{'title': 'chapter b2a'},
{'title': 'chapter b2b'},
],
},
],
},
{'title': 'chapter c'},
],
),
);
}
}
Comments are closed.