Browse Source

neon,neon_files,settings: Make scrollbars draggable

pull/273/head
jld3103 2 years ago
parent
commit
5cafec49d6
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/neon/neon/lib/src/pages/home.dart
  2. 4
      packages/neon/neon/lib/src/pages/login.dart
  3. 2
      packages/neon/neon/lib/src/widgets/list_view.dart
  4. 6
      packages/neon/neon_files/lib/pages/details.dart
  5. 2
      packages/settings/lib/src/widgets/settings_list.dart

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

@ -227,7 +227,9 @@ class _HomePageState extends State<HomePage> {
children: [
Expanded(
child: Scrollbar(
interactive: true,
child: ListView(
primary: true,
// Needed for the drawer header to also render in the statusbar
padding: EdgeInsets.zero,
children: [

4
packages/neon/neon/lib/src/pages/login.dart

@ -163,7 +163,10 @@ class _LoginPageState extends State<LoginPage> {
),
)
: Center(
child: Scrollbar(
interactive: true,
child: ListView(
primary: true,
shrinkWrap: true,
padding: const EdgeInsets.symmetric(vertical: 40, horizontal: 20),
children: [
@ -236,5 +239,6 @@ class _LoginPageState extends State<LoginPage> {
),
),
),
),
);
}

2
packages/neon/neon/lib/src/widgets/list_view.dart

@ -41,7 +41,9 @@ class NeonListView<T> extends StatelessWidget {
),
Expanded(
child: Scrollbar(
interactive: true,
child: ListView(
primary: true,
key: scrollKey != null ? PageStorageKey<String>(scrollKey!) : null,
padding: withFloatingActionButton ? const EdgeInsets.only(bottom: 88) : null,
children: [

6
packages/neon/neon_files/lib/pages/details.dart

@ -16,7 +16,10 @@ class FilesDetailsPage extends StatelessWidget {
appBar: AppBar(
title: Text(details.name),
),
body: ListView(
body: Scrollbar(
interactive: true,
child: ListView(
primary: true,
children: [
ColoredBox(
color: Theme.of(context).colorScheme.primary,
@ -62,5 +65,6 @@ class FilesDetailsPage extends StatelessWidget {
),
],
),
),
);
}

2
packages/settings/lib/src/widgets/settings_list.dart

@ -10,7 +10,9 @@ class SettingsList extends StatelessWidget {
@override
Widget build(final BuildContext context) => Scrollbar(
interactive: true,
child: ListView(
primary: true,
padding: const EdgeInsets.all(20),
children: categories.cast<Widget>().intersperse(const Divider()).toList(),
),

Loading…
Cancel
Save