Browse Source

fix(neon_dashboard): Fix widgets reloading scrolling back up

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/1007/head
jld3103 1 year ago
parent
commit
504cace66d
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 1
      packages/neon/neon_dashboard/lib/src/pages/main.dart
  2. 1
      packages/neon/neon_dashboard/lib/src/widgets/widget.dart

1
packages/neon/neon_dashboard/lib/src/pages/main.dart

@ -38,6 +38,7 @@ class DashboardMainPage extends StatelessWidget {
return Center( return Center(
child: NeonListView.custom( child: NeonListView.custom(
scrollKey: 'dashboard',
isLoading: snapshot.isLoading, isLoading: snapshot.isLoading,
error: snapshot.error, error: snapshot.error,
onRefresh: bloc.refresh, onRefresh: bloc.refresh,

1
packages/neon/neon_dashboard/lib/src/widgets/widget.dart

@ -36,6 +36,7 @@ class DashboardWidget extends StatelessWidget {
borderRadius: const BorderRadius.all(Radius.circular(12)), borderRadius: const BorderRadius.all(Radius.circular(12)),
child: ListView( child: ListView(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
key: PageStorageKey<String>('dashboard-${widget.id}'),
children: [ children: [
ListTile( ListTile(
title: Text( title: Text(

Loading…
Cancel
Save