kopia lustrzana https://gitlab.com/mysocialportal/relatica
Fix notifications screen separators should be throughout
rodzic
7d982ef230
commit
b1af640269
|
@ -7,7 +7,7 @@ part of 'notification_services.dart';
|
|||
// **************************************************************************
|
||||
|
||||
String _$userNotificationsByTypeHash() =>
|
||||
r'11ea5e83e8035073414f5159b2d0db62998882c7';
|
||||
r'fe1e04eab091d6e92de866a9888c389024ca3da3';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
@ -768,7 +768,7 @@ class _LowHighIdProviderElement
|
|||
}
|
||||
|
||||
String _$notificationsStoreHash() =>
|
||||
r'390707e411acdeb617105e1baf551e14a1842a39';
|
||||
r'b503c0459703f8a1e7f6b4f9697056f22abbda4d';
|
||||
|
||||
abstract class _$NotificationsStore
|
||||
extends BuildlessNotifier<List<UserNotification>> {
|
||||
|
|
|
@ -87,29 +87,33 @@ class NotificationsScreen extends ConsumerWidget {
|
|||
profile: profile, isRead: true),
|
||||
];
|
||||
|
||||
final allEntries = [
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
await ref
|
||||
.read(notificationsManagerProvider(profile).notifier)
|
||||
.loadNewerNotifications();
|
||||
},
|
||||
child: const Text('Load newer notifications')),
|
||||
...notificationEntries,
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
await ref
|
||||
.read(notificationsManagerProvider(profile).notifier)
|
||||
.loadOlderNotifications();
|
||||
},
|
||||
child: const Text('Load older notifications'))
|
||||
];
|
||||
|
||||
body = RefreshIndicator(
|
||||
onRefresh: () async => ref
|
||||
.read(notificationsManagerProvider(profile).notifier)
|
||||
.refreshNotifications(),
|
||||
child: ResponsiveMaxWidth(
|
||||
child: ListView(
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
await ref
|
||||
.read(notificationsManagerProvider(profile).notifier)
|
||||
.loadNewerNotifications();
|
||||
},
|
||||
child: const Text('Load newer notifications')),
|
||||
...notificationEntries,
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
await ref
|
||||
.read(notificationsManagerProvider(profile).notifier)
|
||||
.loadOlderNotifications();
|
||||
},
|
||||
child: const Text('Load older notifications'))
|
||||
],
|
||||
child: ListView.separated(
|
||||
itemBuilder: (_, index) => allEntries[index],
|
||||
separatorBuilder: (_, __) => _standardDivider,
|
||||
itemCount: allEntries.length,
|
||||
),
|
||||
));
|
||||
}
|
||||
|
@ -174,10 +178,7 @@ class _NotificationsByTypeListElement extends ConsumerWidget {
|
|||
shrinkWrap: true,
|
||||
itemBuilder: (_, index) =>
|
||||
NotificationControl(notification: notifications[index]),
|
||||
separatorBuilder: (_, __) => const Divider(
|
||||
color: Colors.black54,
|
||||
height: 0.0,
|
||||
),
|
||||
separatorBuilder: (_, __) => _standardDivider,
|
||||
itemCount: notifications.length,
|
||||
);
|
||||
}
|
||||
|
@ -198,10 +199,7 @@ class _NotificationsByReadStatusListElement extends ConsumerWidget {
|
|||
shrinkWrap: true,
|
||||
itemBuilder: (_, index) =>
|
||||
NotificationControl(notification: notifications[index]),
|
||||
separatorBuilder: (_, __) => const Divider(
|
||||
color: Colors.black54,
|
||||
height: 0.0,
|
||||
),
|
||||
separatorBuilder: (_, __) => _standardDivider,
|
||||
itemCount: notifications.length,
|
||||
);
|
||||
}
|
||||
|
@ -218,3 +216,8 @@ final orderedNotificationTypes = [
|
|||
NotificationType.favourite,
|
||||
NotificationType.unknown,
|
||||
];
|
||||
|
||||
const _standardDivider = Divider(
|
||||
color: Colors.black54,
|
||||
height: 0.0,
|
||||
);
|
||||
|
|
Ładowanie…
Reference in New Issue