♻️ Convert the notification to sheet
This commit is contained in:
@@ -282,7 +282,11 @@ class AccountScreen extends HookConsumerWidget {
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
context.pushNamed('notifications');
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
builder: (context) => const NotificationScreen(),
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
|
@@ -54,7 +54,11 @@ Widget notificationIndicatorWidget(
|
||||
trailing: const Icon(Symbols.chevron_right),
|
||||
contentPadding: EdgeInsets.only(left: 16, right: 15),
|
||||
onTap: () {
|
||||
GoRouter.of(context).pushNamed('notifications');
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
builder: (context) => const NotificationScreen(),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
|
@@ -3,7 +3,6 @@ import 'dart:math' as math;
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
@@ -11,8 +10,8 @@ import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/websocket.dart';
|
||||
import 'package:island/route.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/content/markdown.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import 'package:relative_time/relative_time.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
@@ -128,19 +127,15 @@ class NotificationScreen extends HookConsumerWidget {
|
||||
ref.watch(notificationUnreadCountNotifierProvider.notifier).clear();
|
||||
}
|
||||
|
||||
return AppScaffold(
|
||||
appBar: AppBar(
|
||||
leading: const PageBackButton(),
|
||||
title: const Text('notifications').tr(),
|
||||
actions: [
|
||||
IconButton(
|
||||
onPressed: markAllRead,
|
||||
icon: const Icon(Symbols.mark_as_unread),
|
||||
),
|
||||
const Gap(8),
|
||||
],
|
||||
),
|
||||
body: PagingHelperView(
|
||||
return SheetScaffold(
|
||||
titleText: 'notifications'.tr(),
|
||||
actions: [
|
||||
IconButton(
|
||||
onPressed: markAllRead,
|
||||
icon: const Icon(Symbols.mark_as_unread),
|
||||
),
|
||||
],
|
||||
child: PagingHelperView(
|
||||
provider: notificationListNotifierProvider,
|
||||
futureRefreshable: notificationListNotifierProvider.future,
|
||||
notifierRefreshable: notificationListNotifierProvider.notifier,
|
||||
|
@@ -66,12 +66,12 @@ class TabsScreen extends HookConsumerWidget {
|
||||
if (wideScreen)
|
||||
NavigationDestination(
|
||||
label: 'creatorHub'.tr(),
|
||||
icon: const Icon(Symbols.draw),
|
||||
icon: const Icon(Symbols.ink_pen),
|
||||
),
|
||||
if (wideScreen)
|
||||
NavigationDestination(
|
||||
label: 'developerHub'.tr(),
|
||||
icon: const Icon(Symbols.code),
|
||||
icon: const Icon(Symbols.data_object),
|
||||
),
|
||||
];
|
||||
|
||||
|
Reference in New Issue
Block a user