🐛 Fixes and optimzation on post
♻️ Replace freezed abstract classes with sealed
This commit is contained in:
@ -17,7 +17,7 @@ part 'event_calendar.g.dart';
|
||||
part 'event_calendar.freezed.dart';
|
||||
|
||||
@freezed
|
||||
abstract class EventCalendarQuery with _$EventCalendarQuery {
|
||||
sealed class EventCalendarQuery with _$EventCalendarQuery {
|
||||
const factory EventCalendarQuery({
|
||||
required String? uname,
|
||||
required int year,
|
||||
|
@ -229,7 +229,7 @@ class _ChatRoomActionMenu extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ChatRoomMemberState with _$ChatRoomMemberState {
|
||||
sealed class ChatRoomMemberState with _$ChatRoomMemberState {
|
||||
const factory ChatRoomMemberState({
|
||||
required List<SnChatMember> members,
|
||||
required bool isLoading,
|
||||
|
@ -310,7 +310,7 @@ class _StickerPackActionMenu extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class StickerWithPackQuery with _$StickerWithPackQuery {
|
||||
sealed class StickerWithPackQuery with _$StickerWithPackQuery {
|
||||
const factory StickerWithPackQuery({
|
||||
required String packId,
|
||||
required String id,
|
||||
|
@ -64,7 +64,12 @@ class PostDetailScreen extends HookConsumerWidget {
|
||||
child: Material(
|
||||
elevation: 2,
|
||||
color: Colors.transparent,
|
||||
child: PostQuickReply(parent: post).padding(
|
||||
child: PostQuickReply(
|
||||
parent: post,
|
||||
onPosted: () {
|
||||
ref.invalidate(postRepliesNotifierProvider(id));
|
||||
},
|
||||
).padding(
|
||||
bottom: MediaQuery.of(context).padding.bottom + 16,
|
||||
top: 16,
|
||||
horizontal: 16,
|
||||
|
Reference in New Issue
Block a user