Browse Source

Merge pull request #299 from Leptopoda/fix/#298

neon: fix drawer scrolling
pull/292/head
Kate 2 years ago committed by GitHub
parent
commit
ec497ecd22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/neon/neon/lib/src/pages/home.dart

5
packages/neon/neon/lib/src/pages/home.dart

@ -19,6 +19,7 @@ class HomePage extends StatefulWidget {
// ignore: prefer_mixin // ignore: prefer_mixin
class _HomePageState extends State<HomePage> { class _HomePageState extends State<HomePage> {
final _scaffoldKey = GlobalKey<ScaffoldState>(); final _scaffoldKey = GlobalKey<ScaffoldState>();
final drawerScrollController = ScrollController();
late GlobalOptions _globalOptions; late GlobalOptions _globalOptions;
late AccountsBloc _accountsBloc; late AccountsBloc _accountsBloc;
@ -178,6 +179,7 @@ class _HomePageState extends State<HomePage> {
@override @override
void dispose() { void dispose() {
_capabilitiesBloc.dispose(); _capabilitiesBloc.dispose();
drawerScrollController.dispose();
super.dispose(); super.dispose();
} }
@ -227,9 +229,10 @@ class _HomePageState extends State<HomePage> {
children: [ children: [
Expanded( Expanded(
child: Scrollbar( child: Scrollbar(
controller: drawerScrollController,
interactive: true, interactive: true,
child: ListView( child: ListView(
primary: true, controller: drawerScrollController,
// Needed for the drawer header to also render in the statusbar // Needed for the drawer header to also render in the statusbar
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
children: [ children: [

Loading…
Cancel
Save