♻️ Migrated to riverpod v3
This commit is contained in:
@@ -57,9 +57,7 @@ class AccountScreen extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
final user = ref.watch(userInfoProvider);
|
||||
final notificationUnreadCount = ref.watch(
|
||||
notificationUnreadCountNotifierProvider,
|
||||
);
|
||||
final notificationUnreadCount = ref.watch(notificationUnreadCountProvider);
|
||||
|
||||
if (user.value == null || user.value == null) {
|
||||
return _UnauthorizedAccountScreen();
|
||||
|
||||
@@ -6,23 +6,38 @@ part of 'credits.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$socialCreditsHash() => r'a0284583e94bc97285c689ac2bc018536932da69';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [socialCredits].
|
||||
@ProviderFor(socialCredits)
|
||||
final socialCreditsProvider = AutoDisposeFutureProvider<double>.internal(
|
||||
socialCredits,
|
||||
name: r'socialCreditsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$socialCreditsHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
const socialCreditsProvider = SocialCreditsProvider._();
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef SocialCreditsRef = AutoDisposeFutureProviderRef<double>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
final class SocialCreditsProvider
|
||||
extends $FunctionalProvider<AsyncValue<double>, double, FutureOr<double>>
|
||||
with $FutureModifier<double>, $FutureProvider<double> {
|
||||
const SocialCreditsProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'socialCreditsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$socialCreditsHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<double> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<double> create(Ref ref) {
|
||||
return socialCredits(ref);
|
||||
}
|
||||
}
|
||||
|
||||
String _$socialCreditsHash() => r'a0284583e94bc97285c689ac2bc018536932da69';
|
||||
|
||||
@@ -6,64 +6,129 @@ part of 'account_settings.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(authFactors)
|
||||
const authFactorsProvider = AuthFactorsProvider._();
|
||||
|
||||
final class AuthFactorsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnAuthFactor>>,
|
||||
List<SnAuthFactor>,
|
||||
FutureOr<List<SnAuthFactor>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<List<SnAuthFactor>>,
|
||||
$FutureProvider<List<SnAuthFactor>> {
|
||||
const AuthFactorsProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'authFactorsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$authFactorsHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<List<SnAuthFactor>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<List<SnAuthFactor>> create(Ref ref) {
|
||||
return authFactors(ref);
|
||||
}
|
||||
}
|
||||
|
||||
String _$authFactorsHash() => r'ed87d7dbd421fef0a5620416727c3dc598c97ef5';
|
||||
|
||||
/// See also [authFactors].
|
||||
@ProviderFor(authFactors)
|
||||
final authFactorsProvider =
|
||||
AutoDisposeFutureProvider<List<SnAuthFactor>>.internal(
|
||||
authFactors,
|
||||
name: r'authFactorsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$authFactorsHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
@ProviderFor(contactMethods)
|
||||
const contactMethodsProvider = ContactMethodsProvider._();
|
||||
|
||||
final class ContactMethodsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnContactMethod>>,
|
||||
List<SnContactMethod>,
|
||||
FutureOr<List<SnContactMethod>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<List<SnContactMethod>>,
|
||||
$FutureProvider<List<SnContactMethod>> {
|
||||
const ContactMethodsProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'contactMethodsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$contactMethodsHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<List<SnContactMethod>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<List<SnContactMethod>> create(Ref ref) {
|
||||
return contactMethods(ref);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef AuthFactorsRef = AutoDisposeFutureProviderRef<List<SnAuthFactor>>;
|
||||
String _$contactMethodsHash() => r'1d3d03e9ffbf36126236558ead22cb7d88bb9cb2';
|
||||
|
||||
/// See also [contactMethods].
|
||||
@ProviderFor(contactMethods)
|
||||
final contactMethodsProvider =
|
||||
AutoDisposeFutureProvider<List<SnContactMethod>>.internal(
|
||||
contactMethods,
|
||||
name: r'contactMethodsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$contactMethodsHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
@ProviderFor(accountConnections)
|
||||
const accountConnectionsProvider = AccountConnectionsProvider._();
|
||||
|
||||
final class AccountConnectionsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnAccountConnection>>,
|
||||
List<SnAccountConnection>,
|
||||
FutureOr<List<SnAccountConnection>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<List<SnAccountConnection>>,
|
||||
$FutureProvider<List<SnAccountConnection>> {
|
||||
const AccountConnectionsProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'accountConnectionsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$accountConnectionsHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<List<SnAccountConnection>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<List<SnAccountConnection>> create(Ref ref) {
|
||||
return accountConnections(ref);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef ContactMethodsRef = AutoDisposeFutureProviderRef<List<SnContactMethod>>;
|
||||
String _$accountConnectionsHash() =>
|
||||
r'33c10b98962ede6c428d4028c0d5f2f12ff0eb22';
|
||||
|
||||
/// See also [accountConnections].
|
||||
@ProviderFor(accountConnections)
|
||||
final accountConnectionsProvider =
|
||||
AutoDisposeFutureProvider<List<SnAccountConnection>>.internal(
|
||||
accountConnections,
|
||||
name: r'accountConnectionsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$accountConnectionsHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef AccountConnectionsRef =
|
||||
AutoDisposeFutureProviderRef<List<SnAccountConnection>>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,25 +6,46 @@ part of 'relationship.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$sentFriendRequestHash() => r'0c52813eb6f86c05f6e0b1e4e840d0d9c350aa9e';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [sentFriendRequest].
|
||||
@ProviderFor(sentFriendRequest)
|
||||
final sentFriendRequestProvider =
|
||||
AutoDisposeFutureProvider<List<SnRelationship>>.internal(
|
||||
sentFriendRequest,
|
||||
name: r'sentFriendRequestProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$sentFriendRequestHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
const sentFriendRequestProvider = SentFriendRequestProvider._();
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef SentFriendRequestRef =
|
||||
AutoDisposeFutureProviderRef<List<SnRelationship>>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
final class SentFriendRequestProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnRelationship>>,
|
||||
List<SnRelationship>,
|
||||
FutureOr<List<SnRelationship>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<List<SnRelationship>>,
|
||||
$FutureProvider<List<SnRelationship>> {
|
||||
const SentFriendRequestProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'sentFriendRequestProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$sentFriendRequestHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<List<SnRelationship>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<List<SnRelationship>> create(Ref ref) {
|
||||
return sentFriendRequest(ref);
|
||||
}
|
||||
}
|
||||
|
||||
String _$sentFriendRequestHash() => r'0c52813eb6f86c05f6e0b1e4e840d0d9c350aa9e';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
|
||||
@@ -6,21 +6,38 @@ part of 'captcha.config.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$captchaUrlHash() => r'5d59de4f26a0544bf4fbd5209943f0b111959ce6';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [captchaUrl].
|
||||
@ProviderFor(captchaUrl)
|
||||
final captchaUrlProvider = AutoDisposeFutureProvider<String>.internal(
|
||||
captchaUrl,
|
||||
name: r'captchaUrlProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$captchaUrlHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
const captchaUrlProvider = CaptchaUrlProvider._();
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef CaptchaUrlRef = AutoDisposeFutureProviderRef<String>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
final class CaptchaUrlProvider
|
||||
extends $FunctionalProvider<AsyncValue<String>, String, FutureOr<String>>
|
||||
with $FutureModifier<String>, $FutureProvider<String> {
|
||||
const CaptchaUrlProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'captchaUrlProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$captchaUrlHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<String> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<String> create(Ref ref) {
|
||||
return captchaUrl(ref);
|
||||
}
|
||||
}
|
||||
|
||||
String _$captchaUrlHash() => r'5d59de4f26a0544bf4fbd5209943f0b111959ce6';
|
||||
|
||||
@@ -22,8 +22,8 @@ class CallScreen extends HookConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final ongoingCall = ref.watch(ongoingCallProvider(room.id));
|
||||
final callState = ref.watch(callNotifierProvider);
|
||||
final callNotifier = ref.watch(callNotifierProvider.notifier);
|
||||
final callState = ref.watch(callProvider);
|
||||
final callNotifier = ref.watch(callProvider.notifier);
|
||||
|
||||
useEffect(() {
|
||||
talker.info('[Call] Joining the call...');
|
||||
|
||||
@@ -191,7 +191,7 @@ class ChatListBodyWidget extends HookConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final chats = ref.watch(chatRoomJoinedNotifierProvider);
|
||||
final chats = ref.watch(chatRoomJoinedProvider);
|
||||
|
||||
Widget bodyWidget = Column(
|
||||
children: [
|
||||
@@ -214,7 +214,7 @@ class ChatListBodyWidget extends HookConsumerWidget {
|
||||
(items) => RefreshIndicator(
|
||||
onRefresh:
|
||||
() => Future.sync(() {
|
||||
ref.invalidate(chatRoomJoinedNotifierProvider);
|
||||
ref.invalidate(chatRoomJoinedProvider);
|
||||
}),
|
||||
child: SuperListView.builder(
|
||||
padding: EdgeInsets.only(bottom: 96),
|
||||
@@ -264,7 +264,7 @@ class ChatListBodyWidget extends HookConsumerWidget {
|
||||
(error, stack) => ResponseErrorWidget(
|
||||
error: error,
|
||||
onRetry: () {
|
||||
ref.invalidate(chatRoomJoinedNotifierProvider);
|
||||
ref.invalidate(chatRoomJoinedProvider);
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -341,7 +341,7 @@ class ChatListScreen extends HookConsumerWidget {
|
||||
|
||||
// Listen for chat rooms refresh events
|
||||
final subscription = eventBus.on<ChatRoomsRefreshEvent>().listen((event) {
|
||||
ref.invalidate(chatRoomJoinedNotifierProvider);
|
||||
ref.invalidate(chatRoomJoinedProvider);
|
||||
});
|
||||
|
||||
return () {
|
||||
@@ -353,13 +353,14 @@ class ChatListScreen extends HookConsumerWidget {
|
||||
// Set FAB type to chat
|
||||
final fabMenuNotifier = ref.read(fabMenuTypeProvider.notifier);
|
||||
Future(() {
|
||||
fabMenuNotifier.state = FabMenuType.chat;
|
||||
fabMenuNotifier.setMenuType(FabMenuType.chat);
|
||||
});
|
||||
return () {
|
||||
// Clean up: reset FAB type to main
|
||||
final fabMenu = ref.read(fabMenuTypeProvider);
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (fabMenuNotifier.state == FabMenuType.chat) {
|
||||
fabMenuNotifier.state = FabMenuType.main;
|
||||
if (fabMenu == FabMenuType.chat) {
|
||||
fabMenuNotifier.setMenuType(FabMenuType.main);
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -521,7 +522,7 @@ class _ChatInvitesSheet extends HookConsumerWidget {
|
||||
final client = ref.read(apiClientProvider);
|
||||
await client.post('/sphere/chat/invites/${invite.chatRoom!.id}/accept');
|
||||
ref.invalidate(chatroomInvitesProvider);
|
||||
ref.invalidate(chatRoomJoinedNotifierProvider);
|
||||
ref.invalidate(chatRoomJoinedProvider);
|
||||
} catch (err) {
|
||||
showErrorAlert(err);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class EditChatScreen extends HookConsumerWidget {
|
||||
final isPublic = useState(true);
|
||||
final isCommunity = useState(false);
|
||||
|
||||
final chat = ref.watch(ChatRoomNotifierProvider(id));
|
||||
final chat = ref.watch(chatRoomProvider(id));
|
||||
|
||||
final joinedRealms = ref.watch(realmsJoinedProvider);
|
||||
final currentRealm = useState<SnRealm?>(null);
|
||||
|
||||
@@ -27,8 +27,8 @@ class PublicRoomPreview extends HookConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final messages = ref.watch(messagesNotifierProvider(id));
|
||||
final messagesNotifier = ref.read(messagesNotifierProvider(id).notifier);
|
||||
final messages = ref.watch(messagesProvider(id));
|
||||
final messagesNotifier = ref.read(messagesProvider(id).notifier);
|
||||
final scrollController = useScrollController();
|
||||
|
||||
final listController = useMemoized(() => ListController(), []);
|
||||
@@ -203,7 +203,7 @@ class PublicRoomPreview extends HookConsumerWidget {
|
||||
showLoadingModal(context);
|
||||
final apiClient = ref.read(apiClientProvider);
|
||||
await apiClient.post('/sphere/chat/${room.id}/members/me');
|
||||
ref.invalidate(ChatRoomIdentityNotifierProvider(id));
|
||||
ref.invalidate(chatRoomIdentityProvider(id));
|
||||
} catch (err) {
|
||||
showErrorAlert(err);
|
||||
} finally {
|
||||
|
||||
@@ -48,11 +48,11 @@ class ChatRoomScreen extends HookConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final chatRoom = ref.watch(ChatRoomNotifierProvider(id));
|
||||
final chatIdentity = ref.watch(ChatRoomIdentityNotifierProvider(id));
|
||||
final isSyncing = ref.watch(isSyncingProvider);
|
||||
final onlineCount = ref.watch(chatOnlineCountNotifierProvider(id));
|
||||
final settings = ref.watch(appSettingsNotifierProvider);
|
||||
final chatRoom = ref.watch(chatRoomProvider(id));
|
||||
final chatIdentity = ref.watch(chatRoomIdentityProvider(id));
|
||||
final isSyncing = ref.watch(chatSyncingProvider);
|
||||
final onlineCount = ref.watch(chatOnlineCountProvider(id));
|
||||
final settings = ref.watch(appSettingsProvider);
|
||||
|
||||
if (chatIdentity.isLoading || chatRoom.isLoading) {
|
||||
return AppScaffold(
|
||||
@@ -100,9 +100,7 @@ class ChatRoomScreen extends HookConsumerWidget {
|
||||
await apiClient.post(
|
||||
'/sphere/chat/${room.id}/members/me',
|
||||
);
|
||||
ref.invalidate(
|
||||
ChatRoomIdentityNotifierProvider(id),
|
||||
);
|
||||
ref.invalidate(chatRoomIdentityProvider(id));
|
||||
} catch (err) {
|
||||
showErrorAlert(err);
|
||||
} finally {
|
||||
@@ -131,17 +129,15 @@ class ChatRoomScreen extends HookConsumerWidget {
|
||||
appBar: AppBar(leading: const PageBackButton()),
|
||||
body: ResponseErrorWidget(
|
||||
error: error,
|
||||
onRetry: () => ref.refresh(ChatRoomNotifierProvider(id)),
|
||||
onRetry: () => ref.refresh(chatRoomProvider(id)),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
final messages = ref.watch(messagesNotifierProvider(id));
|
||||
final messagesNotifier = ref.read(messagesNotifierProvider(id).notifier);
|
||||
final chatSubscribeNotifier = ref.read(
|
||||
chatSubscribeNotifierProvider(id).notifier,
|
||||
);
|
||||
final messages = ref.watch(messagesProvider(id));
|
||||
final messagesNotifier = ref.read(messagesProvider(id).notifier);
|
||||
final chatSubscribeNotifier = ref.read(chatSubscribeProvider(id).notifier);
|
||||
|
||||
final messageController = useTextEditingController();
|
||||
final scrollController = useScrollController();
|
||||
@@ -384,7 +380,7 @@ class ChatRoomScreen extends HookConsumerWidget {
|
||||
|
||||
// Convert selected message IDs to message data
|
||||
final selectedMessageData =
|
||||
messages.valueOrNull
|
||||
messages.value
|
||||
?.where((msg) => selectedMessages.value.contains(msg.id))
|
||||
.map(
|
||||
(msg) => {
|
||||
@@ -773,8 +769,7 @@ class ChatRoomScreen extends HookConsumerWidget {
|
||||
'chatDetail',
|
||||
pathParameters: {'id': id},
|
||||
);
|
||||
if (result is SearchMessagesResult &&
|
||||
messages.valueOrNull != null) {
|
||||
if (result is SearchMessagesResult && messages.value != null) {
|
||||
final messageId = result.messageId;
|
||||
|
||||
// Jump to the message and trigger flash effect
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
@@ -40,8 +38,8 @@ class ChatDetailScreen extends HookConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final roomState = ref.watch(ChatRoomNotifierProvider(id));
|
||||
final roomIdentity = ref.watch(ChatRoomIdentityNotifierProvider(id));
|
||||
final roomState = ref.watch(chatRoomProvider(id));
|
||||
final roomIdentity = ref.watch(chatRoomIdentityProvider(id));
|
||||
final totalMessages = ref.watch(totalMessagesCountProvider(id));
|
||||
|
||||
const kNotifyLevelText = [
|
||||
@@ -57,7 +55,7 @@ class ChatDetailScreen extends HookConsumerWidget {
|
||||
'/sphere/chat/$id/members/me/notify',
|
||||
data: {'notify_level': level},
|
||||
);
|
||||
ref.invalidate(ChatRoomIdentityNotifierProvider(id));
|
||||
ref.invalidate(chatRoomIdentityProvider(id));
|
||||
if (context.mounted) {
|
||||
showSnackBar(
|
||||
'chatNotifyLevelUpdated'.tr(args: [kNotifyLevelText[level].tr()]),
|
||||
@@ -75,7 +73,7 @@ class ChatDetailScreen extends HookConsumerWidget {
|
||||
'/sphere/chat/$id/members/me/notify',
|
||||
data: {'break_until': until.toUtc().toIso8601String()},
|
||||
);
|
||||
ref.invalidate(ChatRoomNotifierProvider(id));
|
||||
ref.invalidate(chatRoomIdentityProvider(id));
|
||||
} catch (err) {
|
||||
showErrorAlert(err);
|
||||
}
|
||||
@@ -440,8 +438,8 @@ class _ChatRoomActionMenu extends HookConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final chatIdentity = ref.watch(ChatRoomIdentityNotifierProvider(id));
|
||||
final chatRoom = ref.watch(ChatRoomNotifierProvider(id));
|
||||
final chatIdentity = ref.watch(chatRoomIdentityProvider(id));
|
||||
final chatRoom = ref.watch(chatRoomProvider(id));
|
||||
|
||||
final isManagable =
|
||||
chatIdentity.value?.accountId == chatRoom.value?.accountId ||
|
||||
@@ -462,7 +460,7 @@ class _ChatRoomActionMenu extends HookConsumerWidget {
|
||||
).then((value) {
|
||||
if (value != null) {
|
||||
// Invalidate to refresh room data after edit
|
||||
ref.invalidate(ChatRoomNotifierProvider(id));
|
||||
ref.invalidate(chatMemberListProvider(id));
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -498,7 +496,7 @@ class _ChatRoomActionMenu extends HookConsumerWidget {
|
||||
if (confirm) {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
await client.delete('/sphere/chat/$id');
|
||||
ref.invalidate(chatRoomJoinedNotifierProvider);
|
||||
ref.invalidate(chatRoomJoinedProvider);
|
||||
if (context.mounted) {
|
||||
context.pop();
|
||||
}
|
||||
@@ -531,7 +529,7 @@ class _ChatRoomActionMenu extends HookConsumerWidget {
|
||||
if (confirm) {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
await client.delete('/sphere/chat/$id/members/me');
|
||||
ref.invalidate(chatRoomJoinedNotifierProvider);
|
||||
ref.invalidate(chatRoomJoinedProvider);
|
||||
if (context.mounted) {
|
||||
context.pop();
|
||||
}
|
||||
@@ -554,63 +552,17 @@ sealed class ChatRoomMemberState with _$ChatRoomMemberState {
|
||||
}) = _ChatRoomMemberState;
|
||||
}
|
||||
|
||||
final chatMemberStateProvider = StateNotifierProvider.family<
|
||||
ChatMemberNotifier,
|
||||
ChatRoomMemberState,
|
||||
String
|
||||
>((ref, roomId) {
|
||||
final apiClient = ref.watch(apiClientProvider);
|
||||
return ChatMemberNotifier(apiClient, roomId);
|
||||
});
|
||||
final chatMemberListProvider = AsyncNotifierProvider.autoDispose.family(
|
||||
ChatMemberListNotifier.new,
|
||||
);
|
||||
|
||||
class ChatMemberNotifier extends StateNotifier<ChatRoomMemberState> {
|
||||
final String roomId;
|
||||
final Dio _apiClient;
|
||||
|
||||
ChatMemberNotifier(this._apiClient, this.roomId)
|
||||
: super(const ChatRoomMemberState(members: [], isLoading: false, total: 0));
|
||||
|
||||
Future<void> loadMore({int offset = 0, int take = 20}) async {
|
||||
if (state.isLoading) return;
|
||||
if (state.total > 0 && state.members.length >= state.total) return;
|
||||
|
||||
state = state.copyWith(isLoading: true, error: null);
|
||||
|
||||
try {
|
||||
final response = await _apiClient.get(
|
||||
'/sphere/chat/$roomId/members',
|
||||
queryParameters: {'offset': offset, 'take': take},
|
||||
);
|
||||
|
||||
final total = int.parse(response.headers.value('X-Total') ?? '0');
|
||||
final List<dynamic> data = response.data;
|
||||
final members = data.map((e) => SnChatMember.fromJson(e)).toList();
|
||||
|
||||
state = state.copyWith(
|
||||
members: [...state.members, ...members],
|
||||
total: total,
|
||||
isLoading: false,
|
||||
);
|
||||
} catch (e) {
|
||||
state = state.copyWith(error: e.toString(), isLoading: false);
|
||||
}
|
||||
}
|
||||
|
||||
void reset() {
|
||||
state = const ChatRoomMemberState(members: [], isLoading: false, total: 0);
|
||||
}
|
||||
}
|
||||
|
||||
final chatMemberListNotifierProvider = AsyncNotifierProvider.autoDispose
|
||||
.family<ChatMemberListNotifier, List<SnChatMember>, String>(
|
||||
ChatMemberListNotifier.new,
|
||||
);
|
||||
|
||||
class ChatMemberListNotifier
|
||||
extends AutoDisposeFamilyAsyncNotifier<List<SnChatMember>, String>
|
||||
with FamilyAsyncPaginationController<SnChatMember, String> {
|
||||
class ChatMemberListNotifier extends AsyncNotifier<List<SnChatMember>>
|
||||
with AsyncPaginationController<SnChatMember> {
|
||||
static const pageSize = 20;
|
||||
|
||||
final String arg;
|
||||
ChatMemberListNotifier(this.arg);
|
||||
|
||||
@override
|
||||
Future<List<SnChatMember>> fetch() async {
|
||||
final apiClient = ref.watch(apiClientProvider);
|
||||
@@ -640,26 +592,15 @@ class _ChatMemberListSheet extends HookConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final memberListProvider = chatMemberListNotifierProvider(roomId);
|
||||
final memberNotifier = ref.read(chatMemberListProvider(roomId).notifier);
|
||||
|
||||
// For backward compatibility and to show total count in the header
|
||||
final memberState = ref.watch(chatMemberStateProvider(roomId));
|
||||
final memberNotifier = ref.read(chatMemberStateProvider(roomId).notifier);
|
||||
|
||||
final roomIdentity = ref.watch(ChatRoomIdentityNotifierProvider(roomId));
|
||||
final chatRoom = ref.watch(ChatRoomNotifierProvider(roomId));
|
||||
final roomIdentity = ref.watch(chatRoomIdentityProvider(roomId));
|
||||
final chatRoom = ref.watch(chatRoomProvider(roomId));
|
||||
|
||||
final isManagable =
|
||||
chatRoom.value?.accountId == roomIdentity.value?.accountId ||
|
||||
chatRoom.value?.type == 1;
|
||||
|
||||
useEffect(() {
|
||||
Future(() {
|
||||
memberNotifier.loadMore();
|
||||
});
|
||||
return null;
|
||||
}, []);
|
||||
|
||||
Future<void> invitePerson() async {
|
||||
final result = await showModalBottomSheet(
|
||||
context: context,
|
||||
@@ -674,10 +615,7 @@ class _ChatMemberListSheet extends HookConsumerWidget {
|
||||
'/sphere/chat/invites/$roomId',
|
||||
data: {'related_user_id': result.id, 'role': 0},
|
||||
);
|
||||
// Refresh both providers
|
||||
memberNotifier.reset();
|
||||
await memberNotifier.loadMore();
|
||||
ref.invalidate(memberListProvider);
|
||||
memberNotifier.refresh();
|
||||
} catch (err) {
|
||||
showErrorAlert(err);
|
||||
}
|
||||
@@ -694,7 +632,7 @@ class _ChatMemberListSheet extends HookConsumerWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'members'.plural(memberState.total),
|
||||
'members'.plural(memberNotifier.totalCount ?? 0),
|
||||
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.5,
|
||||
@@ -709,10 +647,7 @@ class _ChatMemberListSheet extends HookConsumerWidget {
|
||||
IconButton(
|
||||
icon: const Icon(Symbols.refresh),
|
||||
onPressed: () {
|
||||
// Refresh both providers
|
||||
memberNotifier.reset();
|
||||
memberNotifier.loadMore();
|
||||
ref.invalidate(memberListProvider);
|
||||
memberNotifier.refresh();
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
@@ -726,8 +661,8 @@ class _ChatMemberListSheet extends HookConsumerWidget {
|
||||
const Divider(height: 1),
|
||||
Expanded(
|
||||
child: PaginationList(
|
||||
provider: memberListProvider,
|
||||
notifier: memberListProvider.notifier,
|
||||
provider: chatMemberListProvider(roomId),
|
||||
notifier: chatMemberListProvider(roomId).notifier,
|
||||
itemBuilder: (context, idx, member) {
|
||||
return ListTile(
|
||||
contentPadding: EdgeInsets.only(left: 16, right: 12),
|
||||
@@ -770,9 +705,7 @@ class _ChatMemberListSheet extends HookConsumerWidget {
|
||||
'/sphere/chat/$roomId/members/${member.accountId}',
|
||||
);
|
||||
// Refresh both providers
|
||||
memberNotifier.reset();
|
||||
memberNotifier.loadMore();
|
||||
ref.invalidate(memberListProvider);
|
||||
memberNotifier.refresh();
|
||||
} catch (err) {
|
||||
showErrorAlert(err);
|
||||
}
|
||||
|
||||
@@ -6,148 +6,75 @@ part of 'room_detail.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$totalMessagesCountHash() =>
|
||||
r'd55f1507aba2acdce5e468c1c2e15dba7640c571';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [totalMessagesCount].
|
||||
@ProviderFor(totalMessagesCount)
|
||||
const totalMessagesCountProvider = TotalMessagesCountFamily();
|
||||
const totalMessagesCountProvider = TotalMessagesCountFamily._();
|
||||
|
||||
/// See also [totalMessagesCount].
|
||||
class TotalMessagesCountFamily extends Family<AsyncValue<int>> {
|
||||
/// See also [totalMessagesCount].
|
||||
const TotalMessagesCountFamily();
|
||||
final class TotalMessagesCountProvider
|
||||
extends $FunctionalProvider<AsyncValue<int>, int, FutureOr<int>>
|
||||
with $FutureModifier<int>, $FutureProvider<int> {
|
||||
const TotalMessagesCountProvider._({
|
||||
required TotalMessagesCountFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'totalMessagesCountProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [totalMessagesCount].
|
||||
TotalMessagesCountProvider call(String roomId) {
|
||||
return TotalMessagesCountProvider(roomId);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$totalMessagesCountHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'totalMessagesCountProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
TotalMessagesCountProvider getProviderOverride(
|
||||
covariant TotalMessagesCountProvider provider,
|
||||
) {
|
||||
return call(provider.roomId);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<int> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'totalMessagesCountProvider';
|
||||
}
|
||||
|
||||
/// See also [totalMessagesCount].
|
||||
class TotalMessagesCountProvider extends AutoDisposeFutureProvider<int> {
|
||||
/// See also [totalMessagesCount].
|
||||
TotalMessagesCountProvider(String roomId)
|
||||
: this._internal(
|
||||
(ref) => totalMessagesCount(ref as TotalMessagesCountRef, roomId),
|
||||
from: totalMessagesCountProvider,
|
||||
name: r'totalMessagesCountProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$totalMessagesCountHash,
|
||||
dependencies: TotalMessagesCountFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
TotalMessagesCountFamily._allTransitiveDependencies,
|
||||
roomId: roomId,
|
||||
);
|
||||
|
||||
TotalMessagesCountProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.roomId,
|
||||
}) : super.internal();
|
||||
|
||||
final String roomId;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<int> Function(TotalMessagesCountRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: TotalMessagesCountProvider._internal(
|
||||
(ref) => create(ref as TotalMessagesCountRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
roomId: roomId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<int> createElement() {
|
||||
return _TotalMessagesCountProviderElement(this);
|
||||
FutureOr<int> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return totalMessagesCount(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is TotalMessagesCountProvider && other.roomId == roomId;
|
||||
return other is TotalMessagesCountProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, roomId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin TotalMessagesCountRef on AutoDisposeFutureProviderRef<int> {
|
||||
/// The parameter `roomId` of this provider.
|
||||
String get roomId;
|
||||
}
|
||||
String _$totalMessagesCountHash() =>
|
||||
r'd55f1507aba2acdce5e468c1c2e15dba7640c571';
|
||||
|
||||
class _TotalMessagesCountProviderElement
|
||||
extends AutoDisposeFutureProviderElement<int>
|
||||
with TotalMessagesCountRef {
|
||||
_TotalMessagesCountProviderElement(super.provider);
|
||||
final class TotalMessagesCountFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<int>, String> {
|
||||
const TotalMessagesCountFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'totalMessagesCountProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
TotalMessagesCountProvider call(String roomId) =>
|
||||
TotalMessagesCountProvider._(argument: roomId, from: this);
|
||||
|
||||
@override
|
||||
String get roomId => (origin as TotalMessagesCountProvider).roomId;
|
||||
String toString() => r'totalMessagesCountProvider';
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -124,9 +124,7 @@ class SearchMessagesScreen extends HookConsumerWidget {
|
||||
// Debounce timer for search optimization
|
||||
final debounceTimer = useRef<Timer?>(null);
|
||||
|
||||
final messagesNotifier = ref.read(
|
||||
messagesNotifierProvider(roomId).notifier,
|
||||
);
|
||||
final messagesNotifier = ref.read(messagesProvider(roomId).notifier);
|
||||
|
||||
// Optimized search function with debouncing
|
||||
void performSearch(String query) async {
|
||||
@@ -180,7 +178,7 @@ class SearchMessagesScreen extends HookConsumerWidget {
|
||||
useEffect(() {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
// Clear flashing messages when entering search screen
|
||||
ref.read(flashingMessagesProvider.notifier).state = {};
|
||||
ref.read(flashingMessagesProvider.notifier).clear();
|
||||
});
|
||||
return null;
|
||||
}, []);
|
||||
|
||||
@@ -1,14 +1,28 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'package:island/database/message.dart';
|
||||
import 'package:island/models/chat.dart';
|
||||
import 'package:island/widgets/chat/message_item.dart';
|
||||
|
||||
// Provider to track animated messages to prevent replay
|
||||
final animatedMessagesProvider = StateProvider<Set<String>>((ref) => {});
|
||||
final animatedMessagesProvider =
|
||||
NotifierProvider<AnimatedMessagesNotifier, Set<String>>(
|
||||
AnimatedMessagesNotifier.new,
|
||||
);
|
||||
|
||||
class MessageItemWrapper extends HookConsumerWidget {
|
||||
class AnimatedMessagesNotifier extends Notifier<Set<String>> {
|
||||
@override
|
||||
Set<String> build() {
|
||||
return {};
|
||||
}
|
||||
|
||||
void addMessage(String messageId) {
|
||||
state = {...state, messageId};
|
||||
}
|
||||
}
|
||||
|
||||
class MessageItemWrapper extends ConsumerWidget {
|
||||
final LocalChatMessage message;
|
||||
final int index;
|
||||
final bool isLastInGroup;
|
||||
@@ -78,9 +92,7 @@ class MessageItemWrapper extends HookConsumerWidget {
|
||||
onEnd: () {
|
||||
// Mark as animated
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
ref
|
||||
.read(animatedMessagesProvider.notifier)
|
||||
.update((state) => {...state, message.id});
|
||||
ref.read(animatedMessagesProvider.notifier).addMessage(message.id);
|
||||
});
|
||||
},
|
||||
child: child,
|
||||
|
||||
@@ -81,11 +81,13 @@ Future<List<SnPublisherMember>> publisherInvites(Ref ref) async {
|
||||
final publisherMemberListNotifierProvider = AsyncNotifierProvider.family
|
||||
.autoDispose(PublisherMemberListNotifier.new);
|
||||
|
||||
class PublisherMemberListNotifier
|
||||
extends AutoDisposeFamilyAsyncNotifier<List<SnPublisherMember>, String>
|
||||
with FamilyAsyncPaginationController<SnPublisherMember, String> {
|
||||
class PublisherMemberListNotifier extends AsyncNotifier<List<SnPublisherMember>>
|
||||
with AsyncPaginationController<SnPublisherMember> {
|
||||
static const int pageSize = 20;
|
||||
|
||||
final String arg;
|
||||
PublisherMemberListNotifier(this.arg);
|
||||
|
||||
@override
|
||||
Future<List<SnPublisherMember>> fetch() async {
|
||||
final apiClient = ref.read(apiClientProvider);
|
||||
@@ -759,55 +761,6 @@ class PublisherMemberState {
|
||||
}
|
||||
}
|
||||
|
||||
final publisherMemberStateProvider = StateNotifierProvider.family<
|
||||
PublisherMemberNotifier,
|
||||
PublisherMemberState,
|
||||
String
|
||||
>((ref, publisherUname) {
|
||||
final apiClient = ref.watch(apiClientProvider);
|
||||
return PublisherMemberNotifier(apiClient, publisherUname);
|
||||
});
|
||||
|
||||
class PublisherMemberNotifier extends StateNotifier<PublisherMemberState> {
|
||||
final String publisherUname;
|
||||
final Dio _apiClient;
|
||||
|
||||
PublisherMemberNotifier(this._apiClient, this.publisherUname)
|
||||
: super(
|
||||
const PublisherMemberState(members: [], isLoading: false, total: 0),
|
||||
);
|
||||
|
||||
Future<void> loadMore({int offset = 0, int take = 20}) async {
|
||||
if (state.isLoading) return;
|
||||
if (state.total > 0 && state.members.length >= state.total) return;
|
||||
|
||||
state = state.copyWith(isLoading: true, error: null);
|
||||
|
||||
try {
|
||||
final response = await _apiClient.get(
|
||||
'/sphere/publishers/$publisherUname/members',
|
||||
queryParameters: {'offset': offset, 'take': take},
|
||||
);
|
||||
|
||||
final total = int.parse(response.headers.value('X-Total') ?? '0');
|
||||
final List<dynamic> data = response.data;
|
||||
final members = data.map((e) => SnPublisherMember.fromJson(e)).toList();
|
||||
|
||||
state = state.copyWith(
|
||||
members: [...state.members, ...members],
|
||||
total: total,
|
||||
isLoading: false,
|
||||
);
|
||||
} catch (e) {
|
||||
state = state.copyWith(error: e.toString(), isLoading: false);
|
||||
}
|
||||
}
|
||||
|
||||
void reset() {
|
||||
state = const PublisherMemberState(members: [], isLoading: false, total: 0);
|
||||
}
|
||||
}
|
||||
|
||||
class _PublisherMemberListSheet extends HookConsumerWidget {
|
||||
final String publisherUname;
|
||||
const _PublisherMemberListSheet({required this.publisherUname});
|
||||
@@ -820,18 +773,10 @@ class _PublisherMemberListSheet extends HookConsumerWidget {
|
||||
final memberListProvider = publisherMemberListNotifierProvider(
|
||||
publisherUname,
|
||||
);
|
||||
final memberState = ref.watch(publisherMemberStateProvider(publisherUname));
|
||||
final memberNotifier = ref.read(
|
||||
publisherMemberStateProvider(publisherUname).notifier,
|
||||
publisherMemberListNotifierProvider(publisherUname).notifier,
|
||||
);
|
||||
|
||||
useEffect(() {
|
||||
Future(() {
|
||||
memberNotifier.loadMore();
|
||||
});
|
||||
return null;
|
||||
}, []);
|
||||
|
||||
Future<void> invitePerson() async {
|
||||
final result = await showModalBottomSheet(
|
||||
useRootNavigator: true,
|
||||
@@ -846,10 +791,7 @@ class _PublisherMemberListSheet extends HookConsumerWidget {
|
||||
'/sphere/publishers/invites/$publisherUname',
|
||||
data: {'related_user_id': result.id, 'role': 0},
|
||||
);
|
||||
// Refresh both providers
|
||||
memberNotifier.reset();
|
||||
await memberNotifier.loadMore();
|
||||
ref.invalidate(memberListProvider);
|
||||
memberNotifier.refresh();
|
||||
} catch (err) {
|
||||
showErrorAlert(err);
|
||||
}
|
||||
@@ -866,7 +808,7 @@ class _PublisherMemberListSheet extends HookConsumerWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'members'.plural(memberState.total),
|
||||
'members'.plural(memberNotifier.totalCount ?? 0),
|
||||
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.5,
|
||||
@@ -881,9 +823,7 @@ class _PublisherMemberListSheet extends HookConsumerWidget {
|
||||
IconButton(
|
||||
icon: const Icon(Symbols.refresh),
|
||||
onPressed: () {
|
||||
memberNotifier.reset();
|
||||
memberNotifier.loadMore();
|
||||
ref.invalidate(memberListProvider);
|
||||
memberNotifier.refresh();
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
@@ -943,10 +883,7 @@ class _PublisherMemberListSheet extends HookConsumerWidget {
|
||||
),
|
||||
).then((value) {
|
||||
if (value != null) {
|
||||
// Refresh both providers
|
||||
memberNotifier.reset();
|
||||
memberNotifier.loadMore();
|
||||
ref.invalidate(memberListProvider);
|
||||
memberNotifier.refresh();
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -965,10 +902,7 @@ class _PublisherMemberListSheet extends HookConsumerWidget {
|
||||
await apiClient.delete(
|
||||
'/sphere/publishers/$publisherUname/members/${member.accountId}',
|
||||
);
|
||||
// Refresh both providers
|
||||
memberNotifier.reset();
|
||||
memberNotifier.loadMore();
|
||||
ref.invalidate(memberListProvider);
|
||||
memberNotifier.refresh();
|
||||
} catch (err) {
|
||||
showErrorAlert(err);
|
||||
}
|
||||
|
||||
@@ -6,533 +6,351 @@ part of 'hub.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$publisherStatsHash() => r'eea4ed98bf165cc785874f83b912bb7e23d1f7bc';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [publisherStats].
|
||||
@ProviderFor(publisherStats)
|
||||
const publisherStatsProvider = PublisherStatsFamily();
|
||||
const publisherStatsProvider = PublisherStatsFamily._();
|
||||
|
||||
/// See also [publisherStats].
|
||||
class PublisherStatsFamily extends Family<AsyncValue<SnPublisherStats?>> {
|
||||
/// See also [publisherStats].
|
||||
const PublisherStatsFamily();
|
||||
final class PublisherStatsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnPublisherStats?>,
|
||||
SnPublisherStats?,
|
||||
FutureOr<SnPublisherStats?>
|
||||
>
|
||||
with
|
||||
$FutureModifier<SnPublisherStats?>,
|
||||
$FutureProvider<SnPublisherStats?> {
|
||||
const PublisherStatsProvider._({
|
||||
required PublisherStatsFamily super.from,
|
||||
required String? super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'publisherStatsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [publisherStats].
|
||||
PublisherStatsProvider call(String? uname) {
|
||||
return PublisherStatsProvider(uname);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$publisherStatsHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'publisherStatsProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
PublisherStatsProvider getProviderOverride(
|
||||
covariant PublisherStatsProvider provider,
|
||||
) {
|
||||
return call(provider.uname);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<SnPublisherStats?> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'publisherStatsProvider';
|
||||
}
|
||||
|
||||
/// See also [publisherStats].
|
||||
class PublisherStatsProvider
|
||||
extends AutoDisposeFutureProvider<SnPublisherStats?> {
|
||||
/// See also [publisherStats].
|
||||
PublisherStatsProvider(String? uname)
|
||||
: this._internal(
|
||||
(ref) => publisherStats(ref as PublisherStatsRef, uname),
|
||||
from: publisherStatsProvider,
|
||||
name: r'publisherStatsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$publisherStatsHash,
|
||||
dependencies: PublisherStatsFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
PublisherStatsFamily._allTransitiveDependencies,
|
||||
uname: uname,
|
||||
);
|
||||
|
||||
PublisherStatsProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.uname,
|
||||
}) : super.internal();
|
||||
|
||||
final String? uname;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnPublisherStats?> Function(PublisherStatsRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PublisherStatsProvider._internal(
|
||||
(ref) => create(ref as PublisherStatsRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
uname: uname,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnPublisherStats?> createElement() {
|
||||
return _PublisherStatsProviderElement(this);
|
||||
FutureOr<SnPublisherStats?> create(Ref ref) {
|
||||
final argument = this.argument as String?;
|
||||
return publisherStats(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PublisherStatsProvider && other.uname == uname;
|
||||
return other is PublisherStatsProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, uname.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PublisherStatsRef on AutoDisposeFutureProviderRef<SnPublisherStats?> {
|
||||
/// The parameter `uname` of this provider.
|
||||
String? get uname;
|
||||
}
|
||||
String _$publisherStatsHash() => r'eea4ed98bf165cc785874f83b912bb7e23d1f7bc';
|
||||
|
||||
class _PublisherStatsProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnPublisherStats?>
|
||||
with PublisherStatsRef {
|
||||
_PublisherStatsProviderElement(super.provider);
|
||||
final class PublisherStatsFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnPublisherStats?>, String?> {
|
||||
const PublisherStatsFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'publisherStatsProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
PublisherStatsProvider call(String? uname) =>
|
||||
PublisherStatsProvider._(argument: uname, from: this);
|
||||
|
||||
@override
|
||||
String? get uname => (origin as PublisherStatsProvider).uname;
|
||||
String toString() => r'publisherStatsProvider';
|
||||
}
|
||||
|
||||
@ProviderFor(publisherHeatmap)
|
||||
const publisherHeatmapProvider = PublisherHeatmapFamily._();
|
||||
|
||||
final class PublisherHeatmapProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnHeatmap?>,
|
||||
SnHeatmap?,
|
||||
FutureOr<SnHeatmap?>
|
||||
>
|
||||
with $FutureModifier<SnHeatmap?>, $FutureProvider<SnHeatmap?> {
|
||||
const PublisherHeatmapProvider._({
|
||||
required PublisherHeatmapFamily super.from,
|
||||
required String? super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'publisherHeatmapProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$publisherHeatmapHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'publisherHeatmapProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<SnHeatmap?> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<SnHeatmap?> create(Ref ref) {
|
||||
final argument = this.argument as String?;
|
||||
return publisherHeatmap(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PublisherHeatmapProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
String _$publisherHeatmapHash() => r'5f70c55e14629ec8628445a317888e02fccd9af2';
|
||||
|
||||
/// See also [publisherHeatmap].
|
||||
@ProviderFor(publisherHeatmap)
|
||||
const publisherHeatmapProvider = PublisherHeatmapFamily();
|
||||
|
||||
/// See also [publisherHeatmap].
|
||||
class PublisherHeatmapFamily extends Family<AsyncValue<SnHeatmap?>> {
|
||||
/// See also [publisherHeatmap].
|
||||
const PublisherHeatmapFamily();
|
||||
|
||||
/// See also [publisherHeatmap].
|
||||
PublisherHeatmapProvider call(String? uname) {
|
||||
return PublisherHeatmapProvider(uname);
|
||||
}
|
||||
|
||||
@override
|
||||
PublisherHeatmapProvider getProviderOverride(
|
||||
covariant PublisherHeatmapProvider provider,
|
||||
) {
|
||||
return call(provider.uname);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'publisherHeatmapProvider';
|
||||
}
|
||||
|
||||
/// See also [publisherHeatmap].
|
||||
class PublisherHeatmapProvider extends AutoDisposeFutureProvider<SnHeatmap?> {
|
||||
/// See also [publisherHeatmap].
|
||||
PublisherHeatmapProvider(String? uname)
|
||||
: this._internal(
|
||||
(ref) => publisherHeatmap(ref as PublisherHeatmapRef, uname),
|
||||
from: publisherHeatmapProvider,
|
||||
final class PublisherHeatmapFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnHeatmap?>, String?> {
|
||||
const PublisherHeatmapFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'publisherHeatmapProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$publisherHeatmapHash,
|
||||
dependencies: PublisherHeatmapFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
PublisherHeatmapFamily._allTransitiveDependencies,
|
||||
uname: uname,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
PublisherHeatmapProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.uname,
|
||||
}) : super.internal();
|
||||
|
||||
final String? uname;
|
||||
PublisherHeatmapProvider call(String? uname) =>
|
||||
PublisherHeatmapProvider._(argument: uname, from: this);
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnHeatmap?> Function(PublisherHeatmapRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PublisherHeatmapProvider._internal(
|
||||
(ref) => create(ref as PublisherHeatmapRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
uname: uname,
|
||||
),
|
||||
);
|
||||
String toString() => r'publisherHeatmapProvider';
|
||||
}
|
||||
|
||||
@ProviderFor(publisherIdentity)
|
||||
const publisherIdentityProvider = PublisherIdentityFamily._();
|
||||
|
||||
final class PublisherIdentityProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnPublisherMember?>,
|
||||
SnPublisherMember?,
|
||||
FutureOr<SnPublisherMember?>
|
||||
>
|
||||
with
|
||||
$FutureModifier<SnPublisherMember?>,
|
||||
$FutureProvider<SnPublisherMember?> {
|
||||
const PublisherIdentityProvider._({
|
||||
required PublisherIdentityFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'publisherIdentityProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$publisherIdentityHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'publisherIdentityProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnHeatmap?> createElement() {
|
||||
return _PublisherHeatmapProviderElement(this);
|
||||
$FutureProviderElement<SnPublisherMember?> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<SnPublisherMember?> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return publisherIdentity(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PublisherHeatmapProvider && other.uname == uname;
|
||||
return other is PublisherIdentityProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, uname.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PublisherHeatmapRef on AutoDisposeFutureProviderRef<SnHeatmap?> {
|
||||
/// The parameter `uname` of this provider.
|
||||
String? get uname;
|
||||
}
|
||||
|
||||
class _PublisherHeatmapProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnHeatmap?>
|
||||
with PublisherHeatmapRef {
|
||||
_PublisherHeatmapProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String? get uname => (origin as PublisherHeatmapProvider).uname;
|
||||
}
|
||||
|
||||
String _$publisherIdentityHash() => r'299372f25fa4b2bf8e11a8ba2d645100fc38e76f';
|
||||
|
||||
/// See also [publisherIdentity].
|
||||
@ProviderFor(publisherIdentity)
|
||||
const publisherIdentityProvider = PublisherIdentityFamily();
|
||||
|
||||
/// See also [publisherIdentity].
|
||||
class PublisherIdentityFamily extends Family<AsyncValue<SnPublisherMember?>> {
|
||||
/// See also [publisherIdentity].
|
||||
const PublisherIdentityFamily();
|
||||
|
||||
/// See also [publisherIdentity].
|
||||
PublisherIdentityProvider call(String uname) {
|
||||
return PublisherIdentityProvider(uname);
|
||||
}
|
||||
|
||||
@override
|
||||
PublisherIdentityProvider getProviderOverride(
|
||||
covariant PublisherIdentityProvider provider,
|
||||
) {
|
||||
return call(provider.uname);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'publisherIdentityProvider';
|
||||
}
|
||||
|
||||
/// See also [publisherIdentity].
|
||||
class PublisherIdentityProvider
|
||||
extends AutoDisposeFutureProvider<SnPublisherMember?> {
|
||||
/// See also [publisherIdentity].
|
||||
PublisherIdentityProvider(String uname)
|
||||
: this._internal(
|
||||
(ref) => publisherIdentity(ref as PublisherIdentityRef, uname),
|
||||
from: publisherIdentityProvider,
|
||||
final class PublisherIdentityFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnPublisherMember?>, String> {
|
||||
const PublisherIdentityFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'publisherIdentityProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$publisherIdentityHash,
|
||||
dependencies: PublisherIdentityFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
PublisherIdentityFamily._allTransitiveDependencies,
|
||||
uname: uname,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
PublisherIdentityProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.uname,
|
||||
}) : super.internal();
|
||||
|
||||
final String uname;
|
||||
PublisherIdentityProvider call(String uname) =>
|
||||
PublisherIdentityProvider._(argument: uname, from: this);
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnPublisherMember?> Function(PublisherIdentityRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PublisherIdentityProvider._internal(
|
||||
(ref) => create(ref as PublisherIdentityRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
uname: uname,
|
||||
),
|
||||
);
|
||||
String toString() => r'publisherIdentityProvider';
|
||||
}
|
||||
|
||||
@ProviderFor(publisherFeatures)
|
||||
const publisherFeaturesProvider = PublisherFeaturesFamily._();
|
||||
|
||||
final class PublisherFeaturesProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<Map<String, bool>>,
|
||||
Map<String, bool>,
|
||||
FutureOr<Map<String, bool>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<Map<String, bool>>,
|
||||
$FutureProvider<Map<String, bool>> {
|
||||
const PublisherFeaturesProvider._({
|
||||
required PublisherFeaturesFamily super.from,
|
||||
required String? super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'publisherFeaturesProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$publisherFeaturesHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'publisherFeaturesProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnPublisherMember?> createElement() {
|
||||
return _PublisherIdentityProviderElement(this);
|
||||
$FutureProviderElement<Map<String, bool>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<Map<String, bool>> create(Ref ref) {
|
||||
final argument = this.argument as String?;
|
||||
return publisherFeatures(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PublisherIdentityProvider && other.uname == uname;
|
||||
return other is PublisherFeaturesProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, uname.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PublisherIdentityRef on AutoDisposeFutureProviderRef<SnPublisherMember?> {
|
||||
/// The parameter `uname` of this provider.
|
||||
String get uname;
|
||||
}
|
||||
|
||||
class _PublisherIdentityProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnPublisherMember?>
|
||||
with PublisherIdentityRef {
|
||||
_PublisherIdentityProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get uname => (origin as PublisherIdentityProvider).uname;
|
||||
}
|
||||
|
||||
String _$publisherFeaturesHash() => r'08bace2d9a3da227ecec0cbf8709e55ee0646ca2';
|
||||
|
||||
/// See also [publisherFeatures].
|
||||
@ProviderFor(publisherFeatures)
|
||||
const publisherFeaturesProvider = PublisherFeaturesFamily();
|
||||
|
||||
/// See also [publisherFeatures].
|
||||
class PublisherFeaturesFamily extends Family<AsyncValue<Map<String, bool>>> {
|
||||
/// See also [publisherFeatures].
|
||||
const PublisherFeaturesFamily();
|
||||
|
||||
/// See also [publisherFeatures].
|
||||
PublisherFeaturesProvider call(String? uname) {
|
||||
return PublisherFeaturesProvider(uname);
|
||||
}
|
||||
|
||||
@override
|
||||
PublisherFeaturesProvider getProviderOverride(
|
||||
covariant PublisherFeaturesProvider provider,
|
||||
) {
|
||||
return call(provider.uname);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'publisherFeaturesProvider';
|
||||
}
|
||||
|
||||
/// See also [publisherFeatures].
|
||||
class PublisherFeaturesProvider
|
||||
extends AutoDisposeFutureProvider<Map<String, bool>> {
|
||||
/// See also [publisherFeatures].
|
||||
PublisherFeaturesProvider(String? uname)
|
||||
: this._internal(
|
||||
(ref) => publisherFeatures(ref as PublisherFeaturesRef, uname),
|
||||
from: publisherFeaturesProvider,
|
||||
final class PublisherFeaturesFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<Map<String, bool>>, String?> {
|
||||
const PublisherFeaturesFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'publisherFeaturesProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$publisherFeaturesHash,
|
||||
dependencies: PublisherFeaturesFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
PublisherFeaturesFamily._allTransitiveDependencies,
|
||||
uname: uname,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
PublisherFeaturesProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.uname,
|
||||
}) : super.internal();
|
||||
|
||||
final String? uname;
|
||||
PublisherFeaturesProvider call(String? uname) =>
|
||||
PublisherFeaturesProvider._(argument: uname, from: this);
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<Map<String, bool>> Function(PublisherFeaturesRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PublisherFeaturesProvider._internal(
|
||||
(ref) => create(ref as PublisherFeaturesRef),
|
||||
from: from,
|
||||
name: null,
|
||||
String toString() => r'publisherFeaturesProvider';
|
||||
}
|
||||
|
||||
@ProviderFor(publisherInvites)
|
||||
const publisherInvitesProvider = PublisherInvitesProvider._();
|
||||
|
||||
final class PublisherInvitesProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnPublisherMember>>,
|
||||
List<SnPublisherMember>,
|
||||
FutureOr<List<SnPublisherMember>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<List<SnPublisherMember>>,
|
||||
$FutureProvider<List<SnPublisherMember>> {
|
||||
const PublisherInvitesProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'publisherInvitesProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
uname: uname,
|
||||
),
|
||||
);
|
||||
}
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<Map<String, bool>> createElement() {
|
||||
return _PublisherFeaturesProviderElement(this);
|
||||
}
|
||||
String debugGetCreateSourceHash() => _$publisherInvitesHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<List<SnPublisherMember>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PublisherFeaturesProvider && other.uname == uname;
|
||||
FutureOr<List<SnPublisherMember>> create(Ref ref) {
|
||||
return publisherInvites(ref);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, uname.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PublisherFeaturesRef on AutoDisposeFutureProviderRef<Map<String, bool>> {
|
||||
/// The parameter `uname` of this provider.
|
||||
String? get uname;
|
||||
}
|
||||
|
||||
class _PublisherFeaturesProviderElement
|
||||
extends AutoDisposeFutureProviderElement<Map<String, bool>>
|
||||
with PublisherFeaturesRef {
|
||||
_PublisherFeaturesProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String? get uname => (origin as PublisherFeaturesProvider).uname;
|
||||
}
|
||||
|
||||
String _$publisherInvitesHash() => r'93aafc2f02af0a7a055ec1770b3999363dfaabdc';
|
||||
|
||||
/// See also [publisherInvites].
|
||||
@ProviderFor(publisherInvites)
|
||||
final publisherInvitesProvider =
|
||||
AutoDisposeFutureProvider<List<SnPublisherMember>>.internal(
|
||||
publisherInvites,
|
||||
name: r'publisherInvitesProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$publisherInvitesHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef PublisherInvitesRef =
|
||||
AutoDisposeFutureProviderRef<List<SnPublisherMember>>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -21,11 +21,13 @@ final pollListNotifierProvider = AsyncNotifierProvider.family.autoDispose(
|
||||
PollListNotifier.new,
|
||||
);
|
||||
|
||||
class PollListNotifier
|
||||
extends AutoDisposeFamilyAsyncNotifier<List<SnPollWithStats>, String?>
|
||||
with FamilyAsyncPaginationController<SnPollWithStats, String?> {
|
||||
class PollListNotifier extends AsyncNotifier<List<SnPollWithStats>>
|
||||
with AsyncPaginationController<SnPollWithStats> {
|
||||
static const int pageSize = 20;
|
||||
|
||||
final String? arg;
|
||||
PollListNotifier(this.arg);
|
||||
|
||||
@override
|
||||
Future<List<SnPollWithStats>> fetch() async {
|
||||
final client = ref.read(apiClientProvider);
|
||||
|
||||
@@ -6,147 +6,80 @@ part of 'poll_list.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$pollWithStatsHash() => r'6bb910046ce1e09368f9922dbec52fdc2cc86740';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [pollWithStats].
|
||||
@ProviderFor(pollWithStats)
|
||||
const pollWithStatsProvider = PollWithStatsFamily();
|
||||
const pollWithStatsProvider = PollWithStatsFamily._();
|
||||
|
||||
/// See also [pollWithStats].
|
||||
class PollWithStatsFamily extends Family<AsyncValue<SnPollWithStats>> {
|
||||
/// See also [pollWithStats].
|
||||
const PollWithStatsFamily();
|
||||
final class PollWithStatsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnPollWithStats>,
|
||||
SnPollWithStats,
|
||||
FutureOr<SnPollWithStats>
|
||||
>
|
||||
with $FutureModifier<SnPollWithStats>, $FutureProvider<SnPollWithStats> {
|
||||
const PollWithStatsProvider._({
|
||||
required PollWithStatsFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'pollWithStatsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [pollWithStats].
|
||||
PollWithStatsProvider call(String id) {
|
||||
return PollWithStatsProvider(id);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$pollWithStatsHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'pollWithStatsProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
PollWithStatsProvider getProviderOverride(
|
||||
covariant PollWithStatsProvider provider,
|
||||
) {
|
||||
return call(provider.id);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<SnPollWithStats> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'pollWithStatsProvider';
|
||||
}
|
||||
|
||||
/// See also [pollWithStats].
|
||||
class PollWithStatsProvider extends AutoDisposeFutureProvider<SnPollWithStats> {
|
||||
/// See also [pollWithStats].
|
||||
PollWithStatsProvider(String id)
|
||||
: this._internal(
|
||||
(ref) => pollWithStats(ref as PollWithStatsRef, id),
|
||||
from: pollWithStatsProvider,
|
||||
name: r'pollWithStatsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$pollWithStatsHash,
|
||||
dependencies: PollWithStatsFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
PollWithStatsFamily._allTransitiveDependencies,
|
||||
id: id,
|
||||
);
|
||||
|
||||
PollWithStatsProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.id,
|
||||
}) : super.internal();
|
||||
|
||||
final String id;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnPollWithStats> Function(PollWithStatsRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PollWithStatsProvider._internal(
|
||||
(ref) => create(ref as PollWithStatsRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
id: id,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnPollWithStats> createElement() {
|
||||
return _PollWithStatsProviderElement(this);
|
||||
FutureOr<SnPollWithStats> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return pollWithStats(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PollWithStatsProvider && other.id == id;
|
||||
return other is PollWithStatsProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, id.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PollWithStatsRef on AutoDisposeFutureProviderRef<SnPollWithStats> {
|
||||
/// The parameter `id` of this provider.
|
||||
String get id;
|
||||
}
|
||||
String _$pollWithStatsHash() => r'6bb910046ce1e09368f9922dbec52fdc2cc86740';
|
||||
|
||||
class _PollWithStatsProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnPollWithStats>
|
||||
with PollWithStatsRef {
|
||||
_PollWithStatsProviderElement(super.provider);
|
||||
final class PollWithStatsFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnPollWithStats>, String> {
|
||||
const PollWithStatsFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'pollWithStatsProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
PollWithStatsProvider call(String id) =>
|
||||
PollWithStatsProvider._(argument: id, from: this);
|
||||
|
||||
@override
|
||||
String get id => (origin as PollWithStatsProvider).id;
|
||||
String toString() => r'pollWithStatsProvider';
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -6,163 +6,121 @@ part of 'publishers_form.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$publishersManagedHash() => r'ea83759fed9bd5119738b4d09f12b4476959e0a3';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [publishersManaged].
|
||||
@ProviderFor(publishersManaged)
|
||||
final publishersManagedProvider =
|
||||
AutoDisposeFutureProvider<List<SnPublisher>>.internal(
|
||||
publishersManaged,
|
||||
name: r'publishersManagedProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$publishersManagedHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
const publishersManagedProvider = PublishersManagedProvider._();
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef PublishersManagedRef = AutoDisposeFutureProviderRef<List<SnPublisher>>;
|
||||
String _$publisherHash() => r'18fb5c6b3d79dd8af4fbee108dec1a0e8a034038';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [publisher].
|
||||
@ProviderFor(publisher)
|
||||
const publisherProvider = PublisherFamily();
|
||||
|
||||
/// See also [publisher].
|
||||
class PublisherFamily extends Family<AsyncValue<SnPublisher?>> {
|
||||
/// See also [publisher].
|
||||
const PublisherFamily();
|
||||
|
||||
/// See also [publisher].
|
||||
PublisherProvider call(String? identifier) {
|
||||
return PublisherProvider(identifier);
|
||||
}
|
||||
|
||||
@override
|
||||
PublisherProvider getProviderOverride(covariant PublisherProvider provider) {
|
||||
return call(provider.identifier);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'publisherProvider';
|
||||
}
|
||||
|
||||
/// See also [publisher].
|
||||
class PublisherProvider extends AutoDisposeFutureProvider<SnPublisher?> {
|
||||
/// See also [publisher].
|
||||
PublisherProvider(String? identifier)
|
||||
: this._internal(
|
||||
(ref) => publisher(ref as PublisherRef, identifier),
|
||||
from: publisherProvider,
|
||||
name: r'publisherProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$publisherHash,
|
||||
dependencies: PublisherFamily._dependencies,
|
||||
allTransitiveDependencies: PublisherFamily._allTransitiveDependencies,
|
||||
identifier: identifier,
|
||||
final class PublishersManagedProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnPublisher>>,
|
||||
List<SnPublisher>,
|
||||
FutureOr<List<SnPublisher>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<List<SnPublisher>>,
|
||||
$FutureProvider<List<SnPublisher>> {
|
||||
const PublishersManagedProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'publishersManagedProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
PublisherProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.identifier,
|
||||
}) : super.internal();
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$publishersManagedHash();
|
||||
|
||||
final String? identifier;
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<List<SnPublisher>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnPublisher?> Function(PublisherRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PublisherProvider._internal(
|
||||
(ref) => create(ref as PublisherRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
identifier: identifier,
|
||||
),
|
||||
);
|
||||
FutureOr<List<SnPublisher>> create(Ref ref) {
|
||||
return publishersManaged(ref);
|
||||
}
|
||||
}
|
||||
|
||||
String _$publishersManagedHash() => r'ea83759fed9bd5119738b4d09f12b4476959e0a3';
|
||||
|
||||
@ProviderFor(publisher)
|
||||
const publisherProvider = PublisherFamily._();
|
||||
|
||||
final class PublisherProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnPublisher?>,
|
||||
SnPublisher?,
|
||||
FutureOr<SnPublisher?>
|
||||
>
|
||||
with $FutureModifier<SnPublisher?>, $FutureProvider<SnPublisher?> {
|
||||
const PublisherProvider._({
|
||||
required PublisherFamily super.from,
|
||||
required String? super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'publisherProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$publisherHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'publisherProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnPublisher?> createElement() {
|
||||
return _PublisherProviderElement(this);
|
||||
$FutureProviderElement<SnPublisher?> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<SnPublisher?> create(Ref ref) {
|
||||
final argument = this.argument as String?;
|
||||
return publisher(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PublisherProvider && other.identifier == identifier;
|
||||
return other is PublisherProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, identifier.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PublisherRef on AutoDisposeFutureProviderRef<SnPublisher?> {
|
||||
/// The parameter `identifier` of this provider.
|
||||
String? get identifier;
|
||||
}
|
||||
String _$publisherHash() => r'18fb5c6b3d79dd8af4fbee108dec1a0e8a034038';
|
||||
|
||||
class _PublisherProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnPublisher?>
|
||||
with PublisherRef {
|
||||
_PublisherProviderElement(super.provider);
|
||||
final class PublisherFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnPublisher?>, String?> {
|
||||
const PublisherFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'publisherProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
PublisherProvider call(String? identifier) =>
|
||||
PublisherProvider._(argument: identifier, from: this);
|
||||
|
||||
@override
|
||||
String? get identifier => (origin as PublisherProvider).identifier;
|
||||
String toString() => r'publisherProvider';
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -6,168 +6,90 @@ part of 'site_detail.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$publicationSiteDetailHash() =>
|
||||
r'e5d259ea39c4ba47e92d37e644fc3d84984927a9';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [publicationSiteDetail].
|
||||
@ProviderFor(publicationSiteDetail)
|
||||
const publicationSiteDetailProvider = PublicationSiteDetailFamily();
|
||||
const publicationSiteDetailProvider = PublicationSiteDetailFamily._();
|
||||
|
||||
/// See also [publicationSiteDetail].
|
||||
class PublicationSiteDetailFamily
|
||||
extends Family<AsyncValue<SnPublicationSite>> {
|
||||
/// See also [publicationSiteDetail].
|
||||
const PublicationSiteDetailFamily();
|
||||
final class PublicationSiteDetailProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnPublicationSite>,
|
||||
SnPublicationSite,
|
||||
FutureOr<SnPublicationSite>
|
||||
>
|
||||
with
|
||||
$FutureModifier<SnPublicationSite>,
|
||||
$FutureProvider<SnPublicationSite> {
|
||||
const PublicationSiteDetailProvider._({
|
||||
required PublicationSiteDetailFamily super.from,
|
||||
required (String, String) super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'publicationSiteDetailProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [publicationSiteDetail].
|
||||
PublicationSiteDetailProvider call(String pubName, String siteSlug) {
|
||||
return PublicationSiteDetailProvider(pubName, siteSlug);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$publicationSiteDetailHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'publicationSiteDetailProvider'
|
||||
''
|
||||
'$argument';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
PublicationSiteDetailProvider getProviderOverride(
|
||||
covariant PublicationSiteDetailProvider provider,
|
||||
) {
|
||||
return call(provider.pubName, provider.siteSlug);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<SnPublicationSite> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'publicationSiteDetailProvider';
|
||||
}
|
||||
|
||||
/// See also [publicationSiteDetail].
|
||||
class PublicationSiteDetailProvider
|
||||
extends AutoDisposeFutureProvider<SnPublicationSite> {
|
||||
/// See also [publicationSiteDetail].
|
||||
PublicationSiteDetailProvider(String pubName, String siteSlug)
|
||||
: this._internal(
|
||||
(ref) => publicationSiteDetail(
|
||||
ref as PublicationSiteDetailRef,
|
||||
pubName,
|
||||
siteSlug,
|
||||
),
|
||||
from: publicationSiteDetailProvider,
|
||||
name: r'publicationSiteDetailProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$publicationSiteDetailHash,
|
||||
dependencies: PublicationSiteDetailFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
PublicationSiteDetailFamily._allTransitiveDependencies,
|
||||
pubName: pubName,
|
||||
siteSlug: siteSlug,
|
||||
);
|
||||
|
||||
PublicationSiteDetailProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.pubName,
|
||||
required this.siteSlug,
|
||||
}) : super.internal();
|
||||
|
||||
final String pubName;
|
||||
final String siteSlug;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnPublicationSite> Function(PublicationSiteDetailRef provider)
|
||||
create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PublicationSiteDetailProvider._internal(
|
||||
(ref) => create(ref as PublicationSiteDetailRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
pubName: pubName,
|
||||
siteSlug: siteSlug,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnPublicationSite> createElement() {
|
||||
return _PublicationSiteDetailProviderElement(this);
|
||||
FutureOr<SnPublicationSite> create(Ref ref) {
|
||||
final argument = this.argument as (String, String);
|
||||
return publicationSiteDetail(ref, argument.$1, argument.$2);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PublicationSiteDetailProvider &&
|
||||
other.pubName == pubName &&
|
||||
other.siteSlug == siteSlug;
|
||||
return other is PublicationSiteDetailProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, pubName.hashCode);
|
||||
hash = _SystemHash.combine(hash, siteSlug.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PublicationSiteDetailRef
|
||||
on AutoDisposeFutureProviderRef<SnPublicationSite> {
|
||||
/// The parameter `pubName` of this provider.
|
||||
String get pubName;
|
||||
String _$publicationSiteDetailHash() =>
|
||||
r'e5d259ea39c4ba47e92d37e644fc3d84984927a9';
|
||||
|
||||
/// The parameter `siteSlug` of this provider.
|
||||
String get siteSlug;
|
||||
}
|
||||
final class PublicationSiteDetailFamily extends $Family
|
||||
with
|
||||
$FunctionalFamilyOverride<
|
||||
FutureOr<SnPublicationSite>,
|
||||
(String, String)
|
||||
> {
|
||||
const PublicationSiteDetailFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'publicationSiteDetailProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
class _PublicationSiteDetailProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnPublicationSite>
|
||||
with PublicationSiteDetailRef {
|
||||
_PublicationSiteDetailProviderElement(super.provider);
|
||||
PublicationSiteDetailProvider call(String pubName, String siteSlug) =>
|
||||
PublicationSiteDetailProvider._(
|
||||
argument: (pubName, siteSlug),
|
||||
from: this,
|
||||
);
|
||||
|
||||
@override
|
||||
String get pubName => (origin as PublicationSiteDetailProvider).pubName;
|
||||
@override
|
||||
String get siteSlug => (origin as PublicationSiteDetailProvider).siteSlug;
|
||||
String toString() => r'publicationSiteDetailProvider';
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -19,11 +19,13 @@ final siteListNotifierProvider = AsyncNotifierProvider.family.autoDispose(
|
||||
SiteListNotifier.new,
|
||||
);
|
||||
|
||||
class SiteListNotifier
|
||||
extends AutoDisposeFamilyAsyncNotifier<List<SnPublicationSite>, String>
|
||||
with FamilyAsyncPaginationController<SnPublicationSite, String> {
|
||||
class SiteListNotifier extends AsyncNotifier<List<SnPublicationSite>>
|
||||
with AsyncPaginationController<SnPublicationSite> {
|
||||
static const int pageSize = 20;
|
||||
|
||||
final String arg;
|
||||
SiteListNotifier(this.arg);
|
||||
|
||||
@override
|
||||
Future<List<SnPublicationSite>> fetch() async {
|
||||
final client = ref.read(apiClientProvider);
|
||||
|
||||
@@ -293,7 +293,7 @@ class StickerPackActionMenu extends HookConsumerWidget {
|
||||
if (confirm) {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
client.delete('/sphere/stickers/$packId');
|
||||
ref.invalidate(stickerPacksNotifierProvider);
|
||||
ref.invalidate(stickerPacksProvider);
|
||||
if (context.mounted) context.pop(true);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -6,272 +6,157 @@ part of 'pack_detail.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$stickerPackContentHash() =>
|
||||
r'42d74f51022e67e35cb601c2f30f4f02e1f2be9d';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [stickerPackContent].
|
||||
@ProviderFor(stickerPackContent)
|
||||
const stickerPackContentProvider = StickerPackContentFamily();
|
||||
const stickerPackContentProvider = StickerPackContentFamily._();
|
||||
|
||||
/// See also [stickerPackContent].
|
||||
class StickerPackContentFamily extends Family<AsyncValue<List<SnSticker>>> {
|
||||
/// See also [stickerPackContent].
|
||||
const StickerPackContentFamily();
|
||||
final class StickerPackContentProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnSticker>>,
|
||||
List<SnSticker>,
|
||||
FutureOr<List<SnSticker>>
|
||||
>
|
||||
with $FutureModifier<List<SnSticker>>, $FutureProvider<List<SnSticker>> {
|
||||
const StickerPackContentProvider._({
|
||||
required StickerPackContentFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'stickerPackContentProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [stickerPackContent].
|
||||
StickerPackContentProvider call(String packId) {
|
||||
return StickerPackContentProvider(packId);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$stickerPackContentHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'stickerPackContentProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
StickerPackContentProvider getProviderOverride(
|
||||
covariant StickerPackContentProvider provider,
|
||||
) {
|
||||
return call(provider.packId);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<List<SnSticker>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'stickerPackContentProvider';
|
||||
}
|
||||
|
||||
/// See also [stickerPackContent].
|
||||
class StickerPackContentProvider
|
||||
extends AutoDisposeFutureProvider<List<SnSticker>> {
|
||||
/// See also [stickerPackContent].
|
||||
StickerPackContentProvider(String packId)
|
||||
: this._internal(
|
||||
(ref) => stickerPackContent(ref as StickerPackContentRef, packId),
|
||||
from: stickerPackContentProvider,
|
||||
name: r'stickerPackContentProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$stickerPackContentHash,
|
||||
dependencies: StickerPackContentFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
StickerPackContentFamily._allTransitiveDependencies,
|
||||
packId: packId,
|
||||
);
|
||||
|
||||
StickerPackContentProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.packId,
|
||||
}) : super.internal();
|
||||
|
||||
final String packId;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<List<SnSticker>> Function(StickerPackContentRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: StickerPackContentProvider._internal(
|
||||
(ref) => create(ref as StickerPackContentRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
packId: packId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<List<SnSticker>> createElement() {
|
||||
return _StickerPackContentProviderElement(this);
|
||||
FutureOr<List<SnSticker>> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return stickerPackContent(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is StickerPackContentProvider && other.packId == packId;
|
||||
return other is StickerPackContentProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, packId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin StickerPackContentRef on AutoDisposeFutureProviderRef<List<SnSticker>> {
|
||||
/// The parameter `packId` of this provider.
|
||||
String get packId;
|
||||
}
|
||||
String _$stickerPackContentHash() =>
|
||||
r'42d74f51022e67e35cb601c2f30f4f02e1f2be9d';
|
||||
|
||||
class _StickerPackContentProviderElement
|
||||
extends AutoDisposeFutureProviderElement<List<SnSticker>>
|
||||
with StickerPackContentRef {
|
||||
_StickerPackContentProviderElement(super.provider);
|
||||
final class StickerPackContentFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<List<SnSticker>>, String> {
|
||||
const StickerPackContentFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'stickerPackContentProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
StickerPackContentProvider call(String packId) =>
|
||||
StickerPackContentProvider._(argument: packId, from: this);
|
||||
|
||||
@override
|
||||
String get packId => (origin as StickerPackContentProvider).packId;
|
||||
String toString() => r'stickerPackContentProvider';
|
||||
}
|
||||
|
||||
@ProviderFor(stickerPackSticker)
|
||||
const stickerPackStickerProvider = StickerPackStickerFamily._();
|
||||
|
||||
final class StickerPackStickerProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnSticker?>,
|
||||
SnSticker?,
|
||||
FutureOr<SnSticker?>
|
||||
>
|
||||
with $FutureModifier<SnSticker?>, $FutureProvider<SnSticker?> {
|
||||
const StickerPackStickerProvider._({
|
||||
required StickerPackStickerFamily super.from,
|
||||
required StickerWithPackQuery? super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'stickerPackStickerProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$stickerPackStickerHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'stickerPackStickerProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<SnSticker?> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<SnSticker?> create(Ref ref) {
|
||||
final argument = this.argument as StickerWithPackQuery?;
|
||||
return stickerPackSticker(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is StickerPackStickerProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
String _$stickerPackStickerHash() =>
|
||||
r'5c553666b3a63530bdebae4b7cd52f303c5ab3a0';
|
||||
|
||||
/// See also [stickerPackSticker].
|
||||
@ProviderFor(stickerPackSticker)
|
||||
const stickerPackStickerProvider = StickerPackStickerFamily();
|
||||
|
||||
/// See also [stickerPackSticker].
|
||||
class StickerPackStickerFamily extends Family<AsyncValue<SnSticker?>> {
|
||||
/// See also [stickerPackSticker].
|
||||
const StickerPackStickerFamily();
|
||||
|
||||
/// See also [stickerPackSticker].
|
||||
StickerPackStickerProvider call(StickerWithPackQuery? query) {
|
||||
return StickerPackStickerProvider(query);
|
||||
}
|
||||
|
||||
@override
|
||||
StickerPackStickerProvider getProviderOverride(
|
||||
covariant StickerPackStickerProvider provider,
|
||||
) {
|
||||
return call(provider.query);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'stickerPackStickerProvider';
|
||||
}
|
||||
|
||||
/// See also [stickerPackSticker].
|
||||
class StickerPackStickerProvider extends AutoDisposeFutureProvider<SnSticker?> {
|
||||
/// See also [stickerPackSticker].
|
||||
StickerPackStickerProvider(StickerWithPackQuery? query)
|
||||
: this._internal(
|
||||
(ref) => stickerPackSticker(ref as StickerPackStickerRef, query),
|
||||
from: stickerPackStickerProvider,
|
||||
final class StickerPackStickerFamily extends $Family
|
||||
with
|
||||
$FunctionalFamilyOverride<FutureOr<SnSticker?>, StickerWithPackQuery?> {
|
||||
const StickerPackStickerFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'stickerPackStickerProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$stickerPackStickerHash,
|
||||
dependencies: StickerPackStickerFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
StickerPackStickerFamily._allTransitiveDependencies,
|
||||
query: query,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
StickerPackStickerProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.query,
|
||||
}) : super.internal();
|
||||
|
||||
final StickerWithPackQuery? query;
|
||||
StickerPackStickerProvider call(StickerWithPackQuery? query) =>
|
||||
StickerPackStickerProvider._(argument: query, from: this);
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnSticker?> Function(StickerPackStickerRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: StickerPackStickerProvider._internal(
|
||||
(ref) => create(ref as StickerPackStickerRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
query: query,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnSticker?> createElement() {
|
||||
return _StickerPackStickerProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is StickerPackStickerProvider && other.query == query;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, query.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
String toString() => r'stickerPackStickerProvider';
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin StickerPackStickerRef on AutoDisposeFutureProviderRef<SnSticker?> {
|
||||
/// The parameter `query` of this provider.
|
||||
StickerWithPackQuery? get query;
|
||||
}
|
||||
|
||||
class _StickerPackStickerProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnSticker?>
|
||||
with StickerPackStickerRef {
|
||||
_StickerPackStickerProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
StickerWithPackQuery? get query =>
|
||||
(origin as StickerPackStickerProvider).query;
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -48,7 +48,7 @@ class StickersScreen extends HookConsumerWidget {
|
||||
),
|
||||
).then((value) {
|
||||
if (value != null) {
|
||||
ref.invalidate(stickerPacksNotifierProvider(pubName));
|
||||
ref.invalidate(stickerPacksProvider(pubName));
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -83,8 +83,8 @@ class SliverStickerPacksList extends HookConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return PaginationList(
|
||||
provider: stickerPacksNotifierProvider(pubName),
|
||||
notifier: stickerPacksNotifierProvider(pubName).notifier,
|
||||
provider: stickerPacksProvider(pubName),
|
||||
notifier: stickerPacksProvider(pubName).notifier,
|
||||
itemBuilder: (context, index, sticker) {
|
||||
return ListTile(
|
||||
shape: RoundedRectangleBorder(
|
||||
@@ -139,15 +139,17 @@ class SliverStickerPacksList extends HookConsumerWidget {
|
||||
}
|
||||
}
|
||||
|
||||
final stickerPacksNotifierProvider = AsyncNotifierProvider.family.autoDispose(
|
||||
final stickerPacksProvider = AsyncNotifierProvider.family.autoDispose(
|
||||
StickerPacksNotifier.new,
|
||||
);
|
||||
|
||||
class StickerPacksNotifier
|
||||
extends AutoDisposeFamilyAsyncNotifier<List<SnStickerPack>, String>
|
||||
with FamilyAsyncPaginationController<SnStickerPack, String> {
|
||||
class StickerPacksNotifier extends AsyncNotifier<List<SnStickerPack>>
|
||||
with AsyncPaginationController<SnStickerPack> {
|
||||
static const int pageSize = 20;
|
||||
|
||||
final String arg;
|
||||
StickerPacksNotifier(this.arg);
|
||||
|
||||
@override
|
||||
Future<List<SnStickerPack>> fetch() async {
|
||||
final client = ref.read(apiClientProvider);
|
||||
|
||||
@@ -6,146 +6,80 @@ part of 'stickers.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$stickerPackHash() => r'71ef84471237c8191918095094bdfc87d3920e77';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [stickerPack].
|
||||
@ProviderFor(stickerPack)
|
||||
const stickerPackProvider = StickerPackFamily();
|
||||
const stickerPackProvider = StickerPackFamily._();
|
||||
|
||||
/// See also [stickerPack].
|
||||
class StickerPackFamily extends Family<AsyncValue<SnStickerPack?>> {
|
||||
/// See also [stickerPack].
|
||||
const StickerPackFamily();
|
||||
final class StickerPackProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnStickerPack?>,
|
||||
SnStickerPack?,
|
||||
FutureOr<SnStickerPack?>
|
||||
>
|
||||
with $FutureModifier<SnStickerPack?>, $FutureProvider<SnStickerPack?> {
|
||||
const StickerPackProvider._({
|
||||
required StickerPackFamily super.from,
|
||||
required String? super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'stickerPackProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [stickerPack].
|
||||
StickerPackProvider call(String? packId) {
|
||||
return StickerPackProvider(packId);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$stickerPackHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'stickerPackProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
StickerPackProvider getProviderOverride(
|
||||
covariant StickerPackProvider provider,
|
||||
) {
|
||||
return call(provider.packId);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<SnStickerPack?> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'stickerPackProvider';
|
||||
}
|
||||
|
||||
/// See also [stickerPack].
|
||||
class StickerPackProvider extends AutoDisposeFutureProvider<SnStickerPack?> {
|
||||
/// See also [stickerPack].
|
||||
StickerPackProvider(String? packId)
|
||||
: this._internal(
|
||||
(ref) => stickerPack(ref as StickerPackRef, packId),
|
||||
from: stickerPackProvider,
|
||||
name: r'stickerPackProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$stickerPackHash,
|
||||
dependencies: StickerPackFamily._dependencies,
|
||||
allTransitiveDependencies: StickerPackFamily._allTransitiveDependencies,
|
||||
packId: packId,
|
||||
);
|
||||
|
||||
StickerPackProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.packId,
|
||||
}) : super.internal();
|
||||
|
||||
final String? packId;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnStickerPack?> Function(StickerPackRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: StickerPackProvider._internal(
|
||||
(ref) => create(ref as StickerPackRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
packId: packId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnStickerPack?> createElement() {
|
||||
return _StickerPackProviderElement(this);
|
||||
FutureOr<SnStickerPack?> create(Ref ref) {
|
||||
final argument = this.argument as String?;
|
||||
return stickerPack(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is StickerPackProvider && other.packId == packId;
|
||||
return other is StickerPackProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, packId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin StickerPackRef on AutoDisposeFutureProviderRef<SnStickerPack?> {
|
||||
/// The parameter `packId` of this provider.
|
||||
String? get packId;
|
||||
}
|
||||
String _$stickerPackHash() => r'71ef84471237c8191918095094bdfc87d3920e77';
|
||||
|
||||
class _StickerPackProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnStickerPack?>
|
||||
with StickerPackRef {
|
||||
_StickerPackProviderElement(super.provider);
|
||||
final class StickerPackFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnStickerPack?>, String?> {
|
||||
const StickerPackFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'stickerPackProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
StickerPackProvider call(String? packId) =>
|
||||
StickerPackProvider._(argument: packId, from: this);
|
||||
|
||||
@override
|
||||
String? get packId => (origin as StickerPackProvider).packId;
|
||||
String toString() => r'stickerPackProvider';
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -6,183 +6,92 @@ part of 'app_secrets.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$customAppSecretsHash() => r'1bc62ad812487883ce739793b22a76168d656752';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [customAppSecrets].
|
||||
@ProviderFor(customAppSecrets)
|
||||
const customAppSecretsProvider = CustomAppSecretsFamily();
|
||||
const customAppSecretsProvider = CustomAppSecretsFamily._();
|
||||
|
||||
/// See also [customAppSecrets].
|
||||
class CustomAppSecretsFamily extends Family<AsyncValue<List<CustomAppSecret>>> {
|
||||
/// See also [customAppSecrets].
|
||||
const CustomAppSecretsFamily();
|
||||
final class CustomAppSecretsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<CustomAppSecret>>,
|
||||
List<CustomAppSecret>,
|
||||
FutureOr<List<CustomAppSecret>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<List<CustomAppSecret>>,
|
||||
$FutureProvider<List<CustomAppSecret>> {
|
||||
const CustomAppSecretsProvider._({
|
||||
required CustomAppSecretsFamily super.from,
|
||||
required (String, String, String) super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'customAppSecretsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [customAppSecrets].
|
||||
CustomAppSecretsProvider call(
|
||||
String publisherName,
|
||||
String projectId,
|
||||
String appId,
|
||||
) {
|
||||
return CustomAppSecretsProvider(publisherName, projectId, appId);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$customAppSecretsHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'customAppSecretsProvider'
|
||||
''
|
||||
'$argument';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
CustomAppSecretsProvider getProviderOverride(
|
||||
covariant CustomAppSecretsProvider provider,
|
||||
) {
|
||||
return call(provider.publisherName, provider.projectId, provider.appId);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<List<CustomAppSecret>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'customAppSecretsProvider';
|
||||
}
|
||||
|
||||
/// See also [customAppSecrets].
|
||||
class CustomAppSecretsProvider
|
||||
extends AutoDisposeFutureProvider<List<CustomAppSecret>> {
|
||||
/// See also [customAppSecrets].
|
||||
CustomAppSecretsProvider(String publisherName, String projectId, String appId)
|
||||
: this._internal(
|
||||
(ref) => customAppSecrets(
|
||||
ref as CustomAppSecretsRef,
|
||||
publisherName,
|
||||
projectId,
|
||||
appId,
|
||||
),
|
||||
from: customAppSecretsProvider,
|
||||
name: r'customAppSecretsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$customAppSecretsHash,
|
||||
dependencies: CustomAppSecretsFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
CustomAppSecretsFamily._allTransitiveDependencies,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
appId: appId,
|
||||
);
|
||||
|
||||
CustomAppSecretsProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.publisherName,
|
||||
required this.projectId,
|
||||
required this.appId,
|
||||
}) : super.internal();
|
||||
|
||||
final String publisherName;
|
||||
final String projectId;
|
||||
final String appId;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<List<CustomAppSecret>> Function(CustomAppSecretsRef provider)
|
||||
create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: CustomAppSecretsProvider._internal(
|
||||
(ref) => create(ref as CustomAppSecretsRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
appId: appId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<List<CustomAppSecret>> createElement() {
|
||||
return _CustomAppSecretsProviderElement(this);
|
||||
FutureOr<List<CustomAppSecret>> create(Ref ref) {
|
||||
final argument = this.argument as (String, String, String);
|
||||
return customAppSecrets(ref, argument.$1, argument.$2, argument.$3);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is CustomAppSecretsProvider &&
|
||||
other.publisherName == publisherName &&
|
||||
other.projectId == projectId &&
|
||||
other.appId == appId;
|
||||
return other is CustomAppSecretsProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, publisherName.hashCode);
|
||||
hash = _SystemHash.combine(hash, projectId.hashCode);
|
||||
hash = _SystemHash.combine(hash, appId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin CustomAppSecretsRef
|
||||
on AutoDisposeFutureProviderRef<List<CustomAppSecret>> {
|
||||
/// The parameter `publisherName` of this provider.
|
||||
String get publisherName;
|
||||
String _$customAppSecretsHash() => r'1bc62ad812487883ce739793b22a76168d656752';
|
||||
|
||||
/// The parameter `projectId` of this provider.
|
||||
String get projectId;
|
||||
final class CustomAppSecretsFamily extends $Family
|
||||
with
|
||||
$FunctionalFamilyOverride<
|
||||
FutureOr<List<CustomAppSecret>>,
|
||||
(String, String, String)
|
||||
> {
|
||||
const CustomAppSecretsFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'customAppSecretsProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
/// The parameter `appId` of this provider.
|
||||
String get appId;
|
||||
CustomAppSecretsProvider call(
|
||||
String publisherName,
|
||||
String projectId,
|
||||
String appId,
|
||||
) => CustomAppSecretsProvider._(
|
||||
argument: (publisherName, projectId, appId),
|
||||
from: this,
|
||||
);
|
||||
|
||||
@override
|
||||
String toString() => r'customAppSecretsProvider';
|
||||
}
|
||||
|
||||
class _CustomAppSecretsProviderElement
|
||||
extends AutoDisposeFutureProviderElement<List<CustomAppSecret>>
|
||||
with CustomAppSecretsRef {
|
||||
_CustomAppSecretsProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get publisherName =>
|
||||
(origin as CustomAppSecretsProvider).publisherName;
|
||||
@override
|
||||
String get projectId => (origin as CustomAppSecretsProvider).projectId;
|
||||
@override
|
||||
String get appId => (origin as CustomAppSecretsProvider).appId;
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -6,300 +6,165 @@ part of 'apps.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$customAppHash() => r'be05431ba8bf06fd20ee988a61c3663a68e15fc9';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [customApp].
|
||||
@ProviderFor(customApp)
|
||||
const customAppProvider = CustomAppFamily();
|
||||
const customAppProvider = CustomAppFamily._();
|
||||
|
||||
/// See also [customApp].
|
||||
class CustomAppFamily extends Family<AsyncValue<CustomApp>> {
|
||||
/// See also [customApp].
|
||||
const CustomAppFamily();
|
||||
final class CustomAppProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<CustomApp>,
|
||||
CustomApp,
|
||||
FutureOr<CustomApp>
|
||||
>
|
||||
with $FutureModifier<CustomApp>, $FutureProvider<CustomApp> {
|
||||
const CustomAppProvider._({
|
||||
required CustomAppFamily super.from,
|
||||
required (String, String, String) super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'customAppProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [customApp].
|
||||
CustomAppProvider call(String publisherName, String projectId, String appId) {
|
||||
return CustomAppProvider(publisherName, projectId, appId);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$customAppHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'customAppProvider'
|
||||
''
|
||||
'$argument';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
CustomAppProvider getProviderOverride(covariant CustomAppProvider provider) {
|
||||
return call(provider.publisherName, provider.projectId, provider.appId);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<CustomApp> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'customAppProvider';
|
||||
}
|
||||
|
||||
/// See also [customApp].
|
||||
class CustomAppProvider extends AutoDisposeFutureProvider<CustomApp> {
|
||||
/// See also [customApp].
|
||||
CustomAppProvider(String publisherName, String projectId, String appId)
|
||||
: this._internal(
|
||||
(ref) =>
|
||||
customApp(ref as CustomAppRef, publisherName, projectId, appId),
|
||||
from: customAppProvider,
|
||||
name: r'customAppProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$customAppHash,
|
||||
dependencies: CustomAppFamily._dependencies,
|
||||
allTransitiveDependencies: CustomAppFamily._allTransitiveDependencies,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
appId: appId,
|
||||
);
|
||||
|
||||
CustomAppProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.publisherName,
|
||||
required this.projectId,
|
||||
required this.appId,
|
||||
}) : super.internal();
|
||||
|
||||
final String publisherName;
|
||||
final String projectId;
|
||||
final String appId;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<CustomApp> Function(CustomAppRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: CustomAppProvider._internal(
|
||||
(ref) => create(ref as CustomAppRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
appId: appId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<CustomApp> createElement() {
|
||||
return _CustomAppProviderElement(this);
|
||||
FutureOr<CustomApp> create(Ref ref) {
|
||||
final argument = this.argument as (String, String, String);
|
||||
return customApp(ref, argument.$1, argument.$2, argument.$3);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is CustomAppProvider &&
|
||||
other.publisherName == publisherName &&
|
||||
other.projectId == projectId &&
|
||||
other.appId == appId;
|
||||
return other is CustomAppProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, publisherName.hashCode);
|
||||
hash = _SystemHash.combine(hash, projectId.hashCode);
|
||||
hash = _SystemHash.combine(hash, appId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin CustomAppRef on AutoDisposeFutureProviderRef<CustomApp> {
|
||||
/// The parameter `publisherName` of this provider.
|
||||
String get publisherName;
|
||||
String _$customAppHash() => r'be05431ba8bf06fd20ee988a61c3663a68e15fc9';
|
||||
|
||||
/// The parameter `projectId` of this provider.
|
||||
String get projectId;
|
||||
final class CustomAppFamily extends $Family
|
||||
with
|
||||
$FunctionalFamilyOverride<
|
||||
FutureOr<CustomApp>,
|
||||
(String, String, String)
|
||||
> {
|
||||
const CustomAppFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'customAppProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
/// The parameter `appId` of this provider.
|
||||
String get appId;
|
||||
CustomAppProvider call(
|
||||
String publisherName,
|
||||
String projectId,
|
||||
String appId,
|
||||
) => CustomAppProvider._(
|
||||
argument: (publisherName, projectId, appId),
|
||||
from: this,
|
||||
);
|
||||
|
||||
@override
|
||||
String toString() => r'customAppProvider';
|
||||
}
|
||||
|
||||
class _CustomAppProviderElement
|
||||
extends AutoDisposeFutureProviderElement<CustomApp>
|
||||
with CustomAppRef {
|
||||
_CustomAppProviderElement(super.provider);
|
||||
@ProviderFor(customApps)
|
||||
const customAppsProvider = CustomAppsFamily._();
|
||||
|
||||
final class CustomAppsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<CustomApp>>,
|
||||
List<CustomApp>,
|
||||
FutureOr<List<CustomApp>>
|
||||
>
|
||||
with $FutureModifier<List<CustomApp>>, $FutureProvider<List<CustomApp>> {
|
||||
const CustomAppsProvider._({
|
||||
required CustomAppsFamily super.from,
|
||||
required (String, String) super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'customAppsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String get publisherName => (origin as CustomAppProvider).publisherName;
|
||||
String debugGetCreateSourceHash() => _$customAppsHash();
|
||||
|
||||
@override
|
||||
String get projectId => (origin as CustomAppProvider).projectId;
|
||||
String toString() {
|
||||
return r'customAppsProvider'
|
||||
''
|
||||
'$argument';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
String get appId => (origin as CustomAppProvider).appId;
|
||||
$FutureProviderElement<List<CustomApp>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<List<CustomApp>> create(Ref ref) {
|
||||
final argument = this.argument as (String, String);
|
||||
return customApps(ref, argument.$1, argument.$2);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is CustomAppsProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
String _$customAppsHash() => r'450bedaf4220b8963cb44afeb14d4c0e80f01b11';
|
||||
|
||||
/// See also [customApps].
|
||||
@ProviderFor(customApps)
|
||||
const customAppsProvider = CustomAppsFamily();
|
||||
|
||||
/// See also [customApps].
|
||||
class CustomAppsFamily extends Family<AsyncValue<List<CustomApp>>> {
|
||||
/// See also [customApps].
|
||||
const CustomAppsFamily();
|
||||
|
||||
/// See also [customApps].
|
||||
CustomAppsProvider call(String publisherName, String projectId) {
|
||||
return CustomAppsProvider(publisherName, projectId);
|
||||
}
|
||||
|
||||
@override
|
||||
CustomAppsProvider getProviderOverride(
|
||||
covariant CustomAppsProvider provider,
|
||||
) {
|
||||
return call(provider.publisherName, provider.projectId);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'customAppsProvider';
|
||||
}
|
||||
|
||||
/// See also [customApps].
|
||||
class CustomAppsProvider extends AutoDisposeFutureProvider<List<CustomApp>> {
|
||||
/// See also [customApps].
|
||||
CustomAppsProvider(String publisherName, String projectId)
|
||||
: this._internal(
|
||||
(ref) => customApps(ref as CustomAppsRef, publisherName, projectId),
|
||||
from: customAppsProvider,
|
||||
final class CustomAppsFamily extends $Family
|
||||
with
|
||||
$FunctionalFamilyOverride<FutureOr<List<CustomApp>>, (String, String)> {
|
||||
const CustomAppsFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'customAppsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$customAppsHash,
|
||||
dependencies: CustomAppsFamily._dependencies,
|
||||
allTransitiveDependencies: CustomAppsFamily._allTransitiveDependencies,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
CustomAppsProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.publisherName,
|
||||
required this.projectId,
|
||||
}) : super.internal();
|
||||
|
||||
final String publisherName;
|
||||
final String projectId;
|
||||
CustomAppsProvider call(String publisherName, String projectId) =>
|
||||
CustomAppsProvider._(argument: (publisherName, projectId), from: this);
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<List<CustomApp>> Function(CustomAppsRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: CustomAppsProvider._internal(
|
||||
(ref) => create(ref as CustomAppsRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<List<CustomApp>> createElement() {
|
||||
return _CustomAppsProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is CustomAppsProvider &&
|
||||
other.publisherName == publisherName &&
|
||||
other.projectId == projectId;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, publisherName.hashCode);
|
||||
hash = _SystemHash.combine(hash, projectId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
String toString() => r'customAppsProvider';
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin CustomAppsRef on AutoDisposeFutureProviderRef<List<CustomApp>> {
|
||||
/// The parameter `publisherName` of this provider.
|
||||
String get publisherName;
|
||||
|
||||
/// The parameter `projectId` of this provider.
|
||||
String get projectId;
|
||||
}
|
||||
|
||||
class _CustomAppsProviderElement
|
||||
extends AutoDisposeFutureProviderElement<List<CustomApp>>
|
||||
with CustomAppsRef {
|
||||
_CustomAppsProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get publisherName => (origin as CustomAppsProvider).publisherName;
|
||||
@override
|
||||
String get projectId => (origin as CustomAppsProvider).projectId;
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -6,167 +6,89 @@ part of 'bot_keys.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$botKeysHash() => r'f7d1121833dc3da0cbd84b6171c2b2539edeb785';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [botKeys].
|
||||
@ProviderFor(botKeys)
|
||||
const botKeysProvider = BotKeysFamily();
|
||||
const botKeysProvider = BotKeysFamily._();
|
||||
|
||||
/// See also [botKeys].
|
||||
class BotKeysFamily extends Family<AsyncValue<List<SnAccountApiKey>>> {
|
||||
/// See also [botKeys].
|
||||
const BotKeysFamily();
|
||||
final class BotKeysProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnAccountApiKey>>,
|
||||
List<SnAccountApiKey>,
|
||||
FutureOr<List<SnAccountApiKey>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<List<SnAccountApiKey>>,
|
||||
$FutureProvider<List<SnAccountApiKey>> {
|
||||
const BotKeysProvider._({
|
||||
required BotKeysFamily super.from,
|
||||
required (String, String, String) super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'botKeysProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [botKeys].
|
||||
BotKeysProvider call(String publisherName, String projectId, String botId) {
|
||||
return BotKeysProvider(publisherName, projectId, botId);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$botKeysHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'botKeysProvider'
|
||||
''
|
||||
'$argument';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
BotKeysProvider getProviderOverride(covariant BotKeysProvider provider) {
|
||||
return call(provider.publisherName, provider.projectId, provider.botId);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<List<SnAccountApiKey>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'botKeysProvider';
|
||||
}
|
||||
|
||||
/// See also [botKeys].
|
||||
class BotKeysProvider extends AutoDisposeFutureProvider<List<SnAccountApiKey>> {
|
||||
/// See also [botKeys].
|
||||
BotKeysProvider(String publisherName, String projectId, String botId)
|
||||
: this._internal(
|
||||
(ref) => botKeys(ref as BotKeysRef, publisherName, projectId, botId),
|
||||
from: botKeysProvider,
|
||||
name: r'botKeysProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$botKeysHash,
|
||||
dependencies: BotKeysFamily._dependencies,
|
||||
allTransitiveDependencies: BotKeysFamily._allTransitiveDependencies,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
botId: botId,
|
||||
);
|
||||
|
||||
BotKeysProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.publisherName,
|
||||
required this.projectId,
|
||||
required this.botId,
|
||||
}) : super.internal();
|
||||
|
||||
final String publisherName;
|
||||
final String projectId;
|
||||
final String botId;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<List<SnAccountApiKey>> Function(BotKeysRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: BotKeysProvider._internal(
|
||||
(ref) => create(ref as BotKeysRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
botId: botId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<List<SnAccountApiKey>> createElement() {
|
||||
return _BotKeysProviderElement(this);
|
||||
FutureOr<List<SnAccountApiKey>> create(Ref ref) {
|
||||
final argument = this.argument as (String, String, String);
|
||||
return botKeys(ref, argument.$1, argument.$2, argument.$3);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is BotKeysProvider &&
|
||||
other.publisherName == publisherName &&
|
||||
other.projectId == projectId &&
|
||||
other.botId == botId;
|
||||
return other is BotKeysProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, publisherName.hashCode);
|
||||
hash = _SystemHash.combine(hash, projectId.hashCode);
|
||||
hash = _SystemHash.combine(hash, botId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin BotKeysRef on AutoDisposeFutureProviderRef<List<SnAccountApiKey>> {
|
||||
/// The parameter `publisherName` of this provider.
|
||||
String get publisherName;
|
||||
String _$botKeysHash() => r'f7d1121833dc3da0cbd84b6171c2b2539edeb785';
|
||||
|
||||
/// The parameter `projectId` of this provider.
|
||||
String get projectId;
|
||||
final class BotKeysFamily extends $Family
|
||||
with
|
||||
$FunctionalFamilyOverride<
|
||||
FutureOr<List<SnAccountApiKey>>,
|
||||
(String, String, String)
|
||||
> {
|
||||
const BotKeysFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'botKeysProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
/// The parameter `botId` of this provider.
|
||||
String get botId;
|
||||
BotKeysProvider call(String publisherName, String projectId, String botId) =>
|
||||
BotKeysProvider._(
|
||||
argument: (publisherName, projectId, botId),
|
||||
from: this,
|
||||
);
|
||||
|
||||
@override
|
||||
String toString() => r'botKeysProvider';
|
||||
}
|
||||
|
||||
class _BotKeysProviderElement
|
||||
extends AutoDisposeFutureProviderElement<List<SnAccountApiKey>>
|
||||
with BotKeysRef {
|
||||
_BotKeysProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get publisherName => (origin as BotKeysProvider).publisherName;
|
||||
@override
|
||||
String get projectId => (origin as BotKeysProvider).projectId;
|
||||
@override
|
||||
String get botId => (origin as BotKeysProvider).botId;
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -6,151 +6,79 @@ part of 'bots.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$botsHash() => r'15cefd5781350eb68208a342e85fcb0b9e0e3269';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [bots].
|
||||
@ProviderFor(bots)
|
||||
const botsProvider = BotsFamily();
|
||||
const botsProvider = BotsFamily._();
|
||||
|
||||
/// See also [bots].
|
||||
class BotsFamily extends Family<AsyncValue<List<Bot>>> {
|
||||
/// See also [bots].
|
||||
const BotsFamily();
|
||||
final class BotsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<Bot>>,
|
||||
List<Bot>,
|
||||
FutureOr<List<Bot>>
|
||||
>
|
||||
with $FutureModifier<List<Bot>>, $FutureProvider<List<Bot>> {
|
||||
const BotsProvider._({
|
||||
required BotsFamily super.from,
|
||||
required (String, String) super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'botsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [bots].
|
||||
BotsProvider call(String publisherName, String projectId) {
|
||||
return BotsProvider(publisherName, projectId);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$botsHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'botsProvider'
|
||||
''
|
||||
'$argument';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
BotsProvider getProviderOverride(covariant BotsProvider provider) {
|
||||
return call(provider.publisherName, provider.projectId);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<List<Bot>> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'botsProvider';
|
||||
}
|
||||
|
||||
/// See also [bots].
|
||||
class BotsProvider extends AutoDisposeFutureProvider<List<Bot>> {
|
||||
/// See also [bots].
|
||||
BotsProvider(String publisherName, String projectId)
|
||||
: this._internal(
|
||||
(ref) => bots(ref as BotsRef, publisherName, projectId),
|
||||
from: botsProvider,
|
||||
name: r'botsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$botsHash,
|
||||
dependencies: BotsFamily._dependencies,
|
||||
allTransitiveDependencies: BotsFamily._allTransitiveDependencies,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
);
|
||||
|
||||
BotsProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.publisherName,
|
||||
required this.projectId,
|
||||
}) : super.internal();
|
||||
|
||||
final String publisherName;
|
||||
final String projectId;
|
||||
|
||||
@override
|
||||
Override overrideWith(FutureOr<List<Bot>> Function(BotsRef provider) create) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: BotsProvider._internal(
|
||||
(ref) => create(ref as BotsRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<List<Bot>> createElement() {
|
||||
return _BotsProviderElement(this);
|
||||
FutureOr<List<Bot>> create(Ref ref) {
|
||||
final argument = this.argument as (String, String);
|
||||
return bots(ref, argument.$1, argument.$2);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is BotsProvider &&
|
||||
other.publisherName == publisherName &&
|
||||
other.projectId == projectId;
|
||||
return other is BotsProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, publisherName.hashCode);
|
||||
hash = _SystemHash.combine(hash, projectId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin BotsRef on AutoDisposeFutureProviderRef<List<Bot>> {
|
||||
/// The parameter `publisherName` of this provider.
|
||||
String get publisherName;
|
||||
String _$botsHash() => r'15cefd5781350eb68208a342e85fcb0b9e0e3269';
|
||||
|
||||
/// The parameter `projectId` of this provider.
|
||||
String get projectId;
|
||||
}
|
||||
final class BotsFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<List<Bot>>, (String, String)> {
|
||||
const BotsFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'botsProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
class _BotsProviderElement extends AutoDisposeFutureProviderElement<List<Bot>>
|
||||
with BotsRef {
|
||||
_BotsProviderElement(super.provider);
|
||||
BotsProvider call(String publisherName, String projectId) =>
|
||||
BotsProvider._(argument: (publisherName, projectId), from: this);
|
||||
|
||||
@override
|
||||
String get publisherName => (origin as BotsProvider).publisherName;
|
||||
@override
|
||||
String get projectId => (origin as BotsProvider).projectId;
|
||||
String toString() => r'botsProvider';
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -6,167 +6,83 @@ part of 'edit_app.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$customAppHash() => r'8e1b38f3dc9b04fad362ee1141fcbfc53f008c09';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [customApp].
|
||||
@ProviderFor(customApp)
|
||||
const customAppProvider = CustomAppFamily();
|
||||
const customAppProvider = CustomAppFamily._();
|
||||
|
||||
/// See also [customApp].
|
||||
class CustomAppFamily extends Family<AsyncValue<CustomApp?>> {
|
||||
/// See also [customApp].
|
||||
const CustomAppFamily();
|
||||
final class CustomAppProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<CustomApp?>,
|
||||
CustomApp?,
|
||||
FutureOr<CustomApp?>
|
||||
>
|
||||
with $FutureModifier<CustomApp?>, $FutureProvider<CustomApp?> {
|
||||
const CustomAppProvider._({
|
||||
required CustomAppFamily super.from,
|
||||
required (String, String, String) super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'customAppProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [customApp].
|
||||
CustomAppProvider call(String publisherName, String projectId, String id) {
|
||||
return CustomAppProvider(publisherName, projectId, id);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$customAppHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'customAppProvider'
|
||||
''
|
||||
'$argument';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
CustomAppProvider getProviderOverride(covariant CustomAppProvider provider) {
|
||||
return call(provider.publisherName, provider.projectId, provider.id);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<CustomApp?> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'customAppProvider';
|
||||
}
|
||||
|
||||
/// See also [customApp].
|
||||
class CustomAppProvider extends AutoDisposeFutureProvider<CustomApp?> {
|
||||
/// See also [customApp].
|
||||
CustomAppProvider(String publisherName, String projectId, String id)
|
||||
: this._internal(
|
||||
(ref) => customApp(ref as CustomAppRef, publisherName, projectId, id),
|
||||
from: customAppProvider,
|
||||
name: r'customAppProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$customAppHash,
|
||||
dependencies: CustomAppFamily._dependencies,
|
||||
allTransitiveDependencies: CustomAppFamily._allTransitiveDependencies,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
id: id,
|
||||
);
|
||||
|
||||
CustomAppProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.publisherName,
|
||||
required this.projectId,
|
||||
required this.id,
|
||||
}) : super.internal();
|
||||
|
||||
final String publisherName;
|
||||
final String projectId;
|
||||
final String id;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<CustomApp?> Function(CustomAppRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: CustomAppProvider._internal(
|
||||
(ref) => create(ref as CustomAppRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
id: id,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<CustomApp?> createElement() {
|
||||
return _CustomAppProviderElement(this);
|
||||
FutureOr<CustomApp?> create(Ref ref) {
|
||||
final argument = this.argument as (String, String, String);
|
||||
return customApp(ref, argument.$1, argument.$2, argument.$3);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is CustomAppProvider &&
|
||||
other.publisherName == publisherName &&
|
||||
other.projectId == projectId &&
|
||||
other.id == id;
|
||||
return other is CustomAppProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, publisherName.hashCode);
|
||||
hash = _SystemHash.combine(hash, projectId.hashCode);
|
||||
hash = _SystemHash.combine(hash, id.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin CustomAppRef on AutoDisposeFutureProviderRef<CustomApp?> {
|
||||
/// The parameter `publisherName` of this provider.
|
||||
String get publisherName;
|
||||
String _$customAppHash() => r'8e1b38f3dc9b04fad362ee1141fcbfc53f008c09';
|
||||
|
||||
/// The parameter `projectId` of this provider.
|
||||
String get projectId;
|
||||
final class CustomAppFamily extends $Family
|
||||
with
|
||||
$FunctionalFamilyOverride<
|
||||
FutureOr<CustomApp?>,
|
||||
(String, String, String)
|
||||
> {
|
||||
const CustomAppFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'customAppProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
/// The parameter `id` of this provider.
|
||||
String get id;
|
||||
CustomAppProvider call(String publisherName, String projectId, String id) =>
|
||||
CustomAppProvider._(argument: (publisherName, projectId, id), from: this);
|
||||
|
||||
@override
|
||||
String toString() => r'customAppProvider';
|
||||
}
|
||||
|
||||
class _CustomAppProviderElement
|
||||
extends AutoDisposeFutureProviderElement<CustomApp?>
|
||||
with CustomAppRef {
|
||||
_CustomAppProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get publisherName => (origin as CustomAppProvider).publisherName;
|
||||
@override
|
||||
String get projectId => (origin as CustomAppProvider).projectId;
|
||||
@override
|
||||
String get id => (origin as CustomAppProvider).id;
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -6,162 +6,74 @@ part of 'edit_bot.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$botHash() => r'7bec47bb2a4061a5babc6d6d19c3d4c320c91188';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [bot].
|
||||
@ProviderFor(bot)
|
||||
const botProvider = BotFamily();
|
||||
const botProvider = BotFamily._();
|
||||
|
||||
/// See also [bot].
|
||||
class BotFamily extends Family<AsyncValue<Bot?>> {
|
||||
/// See also [bot].
|
||||
const BotFamily();
|
||||
final class BotProvider
|
||||
extends $FunctionalProvider<AsyncValue<Bot?>, Bot?, FutureOr<Bot?>>
|
||||
with $FutureModifier<Bot?>, $FutureProvider<Bot?> {
|
||||
const BotProvider._({
|
||||
required BotFamily super.from,
|
||||
required (String, String, String) super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'botProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [bot].
|
||||
BotProvider call(String publisherName, String projectId, String id) {
|
||||
return BotProvider(publisherName, projectId, id);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$botHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'botProvider'
|
||||
''
|
||||
'$argument';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
BotProvider getProviderOverride(covariant BotProvider provider) {
|
||||
return call(provider.publisherName, provider.projectId, provider.id);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<Bot?> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'botProvider';
|
||||
}
|
||||
|
||||
/// See also [bot].
|
||||
class BotProvider extends AutoDisposeFutureProvider<Bot?> {
|
||||
/// See also [bot].
|
||||
BotProvider(String publisherName, String projectId, String id)
|
||||
: this._internal(
|
||||
(ref) => bot(ref as BotRef, publisherName, projectId, id),
|
||||
from: botProvider,
|
||||
name: r'botProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$botHash,
|
||||
dependencies: BotFamily._dependencies,
|
||||
allTransitiveDependencies: BotFamily._allTransitiveDependencies,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
id: id,
|
||||
);
|
||||
|
||||
BotProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.publisherName,
|
||||
required this.projectId,
|
||||
required this.id,
|
||||
}) : super.internal();
|
||||
|
||||
final String publisherName;
|
||||
final String projectId;
|
||||
final String id;
|
||||
|
||||
@override
|
||||
Override overrideWith(FutureOr<Bot?> Function(BotRef provider) create) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: BotProvider._internal(
|
||||
(ref) => create(ref as BotRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
id: id,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<Bot?> createElement() {
|
||||
return _BotProviderElement(this);
|
||||
FutureOr<Bot?> create(Ref ref) {
|
||||
final argument = this.argument as (String, String, String);
|
||||
return bot(ref, argument.$1, argument.$2, argument.$3);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is BotProvider &&
|
||||
other.publisherName == publisherName &&
|
||||
other.projectId == projectId &&
|
||||
other.id == id;
|
||||
return other is BotProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, publisherName.hashCode);
|
||||
hash = _SystemHash.combine(hash, projectId.hashCode);
|
||||
hash = _SystemHash.combine(hash, id.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin BotRef on AutoDisposeFutureProviderRef<Bot?> {
|
||||
/// The parameter `publisherName` of this provider.
|
||||
String get publisherName;
|
||||
String _$botHash() => r'7bec47bb2a4061a5babc6d6d19c3d4c320c91188';
|
||||
|
||||
/// The parameter `projectId` of this provider.
|
||||
String get projectId;
|
||||
final class BotFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<Bot?>, (String, String, String)> {
|
||||
const BotFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'botProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
/// The parameter `id` of this provider.
|
||||
String get id;
|
||||
BotProvider call(String publisherName, String projectId, String id) =>
|
||||
BotProvider._(argument: (publisherName, projectId, id), from: this);
|
||||
|
||||
@override
|
||||
String toString() => r'botProvider';
|
||||
}
|
||||
|
||||
class _BotProviderElement extends AutoDisposeFutureProviderElement<Bot?>
|
||||
with BotRef {
|
||||
_BotProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get publisherName => (origin as BotProvider).publisherName;
|
||||
@override
|
||||
String get projectId => (origin as BotProvider).projectId;
|
||||
@override
|
||||
String get id => (origin as BotProvider).id;
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -6,158 +6,80 @@ part of 'edit_project.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$devProjectHash() => r'd92be3f5cdc510c2a377615ed5c70622a6842bf2';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [devProject].
|
||||
@ProviderFor(devProject)
|
||||
const devProjectProvider = DevProjectFamily();
|
||||
const devProjectProvider = DevProjectFamily._();
|
||||
|
||||
/// See also [devProject].
|
||||
class DevProjectFamily extends Family<AsyncValue<DevProject?>> {
|
||||
/// See also [devProject].
|
||||
const DevProjectFamily();
|
||||
final class DevProjectProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<DevProject?>,
|
||||
DevProject?,
|
||||
FutureOr<DevProject?>
|
||||
>
|
||||
with $FutureModifier<DevProject?>, $FutureProvider<DevProject?> {
|
||||
const DevProjectProvider._({
|
||||
required DevProjectFamily super.from,
|
||||
required (String, String) super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'devProjectProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [devProject].
|
||||
DevProjectProvider call(String pubName, String id) {
|
||||
return DevProjectProvider(pubName, id);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$devProjectHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'devProjectProvider'
|
||||
''
|
||||
'$argument';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
DevProjectProvider getProviderOverride(
|
||||
covariant DevProjectProvider provider,
|
||||
) {
|
||||
return call(provider.pubName, provider.id);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<DevProject?> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'devProjectProvider';
|
||||
}
|
||||
|
||||
/// See also [devProject].
|
||||
class DevProjectProvider extends AutoDisposeFutureProvider<DevProject?> {
|
||||
/// See also [devProject].
|
||||
DevProjectProvider(String pubName, String id)
|
||||
: this._internal(
|
||||
(ref) => devProject(ref as DevProjectRef, pubName, id),
|
||||
from: devProjectProvider,
|
||||
name: r'devProjectProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$devProjectHash,
|
||||
dependencies: DevProjectFamily._dependencies,
|
||||
allTransitiveDependencies: DevProjectFamily._allTransitiveDependencies,
|
||||
pubName: pubName,
|
||||
id: id,
|
||||
);
|
||||
|
||||
DevProjectProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.pubName,
|
||||
required this.id,
|
||||
}) : super.internal();
|
||||
|
||||
final String pubName;
|
||||
final String id;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<DevProject?> Function(DevProjectRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: DevProjectProvider._internal(
|
||||
(ref) => create(ref as DevProjectRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
pubName: pubName,
|
||||
id: id,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<DevProject?> createElement() {
|
||||
return _DevProjectProviderElement(this);
|
||||
FutureOr<DevProject?> create(Ref ref) {
|
||||
final argument = this.argument as (String, String);
|
||||
return devProject(ref, argument.$1, argument.$2);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is DevProjectProvider &&
|
||||
other.pubName == pubName &&
|
||||
other.id == id;
|
||||
return other is DevProjectProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, pubName.hashCode);
|
||||
hash = _SystemHash.combine(hash, id.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin DevProjectRef on AutoDisposeFutureProviderRef<DevProject?> {
|
||||
/// The parameter `pubName` of this provider.
|
||||
String get pubName;
|
||||
String _$devProjectHash() => r'd92be3f5cdc510c2a377615ed5c70622a6842bf2';
|
||||
|
||||
/// The parameter `id` of this provider.
|
||||
String get id;
|
||||
}
|
||||
final class DevProjectFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<DevProject?>, (String, String)> {
|
||||
const DevProjectFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'devProjectProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
class _DevProjectProviderElement
|
||||
extends AutoDisposeFutureProviderElement<DevProject?>
|
||||
with DevProjectRef {
|
||||
_DevProjectProviderElement(super.provider);
|
||||
DevProjectProvider call(String pubName, String id) =>
|
||||
DevProjectProvider._(argument: (pubName, id), from: this);
|
||||
|
||||
@override
|
||||
String get pubName => (origin as DevProjectProvider).pubName;
|
||||
@override
|
||||
String get id => (origin as DevProjectProvider).id;
|
||||
String toString() => r'devProjectProvider';
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -6,287 +6,196 @@ part of 'hub.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$developerStatsHash() => r'45546f29ec7cd1a9c3a4e0f4e39275e78bf34755';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [developerStats].
|
||||
@ProviderFor(developerStats)
|
||||
const developerStatsProvider = DeveloperStatsFamily();
|
||||
const developerStatsProvider = DeveloperStatsFamily._();
|
||||
|
||||
/// See also [developerStats].
|
||||
class DeveloperStatsFamily extends Family<AsyncValue<DeveloperStats?>> {
|
||||
/// See also [developerStats].
|
||||
const DeveloperStatsFamily();
|
||||
final class DeveloperStatsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<DeveloperStats?>,
|
||||
DeveloperStats?,
|
||||
FutureOr<DeveloperStats?>
|
||||
>
|
||||
with $FutureModifier<DeveloperStats?>, $FutureProvider<DeveloperStats?> {
|
||||
const DeveloperStatsProvider._({
|
||||
required DeveloperStatsFamily super.from,
|
||||
required String? super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'developerStatsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [developerStats].
|
||||
DeveloperStatsProvider call(String? uname) {
|
||||
return DeveloperStatsProvider(uname);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$developerStatsHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'developerStatsProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
DeveloperStatsProvider getProviderOverride(
|
||||
covariant DeveloperStatsProvider provider,
|
||||
) {
|
||||
return call(provider.uname);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<DeveloperStats?> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'developerStatsProvider';
|
||||
}
|
||||
|
||||
/// See also [developerStats].
|
||||
class DeveloperStatsProvider
|
||||
extends AutoDisposeFutureProvider<DeveloperStats?> {
|
||||
/// See also [developerStats].
|
||||
DeveloperStatsProvider(String? uname)
|
||||
: this._internal(
|
||||
(ref) => developerStats(ref as DeveloperStatsRef, uname),
|
||||
from: developerStatsProvider,
|
||||
name: r'developerStatsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$developerStatsHash,
|
||||
dependencies: DeveloperStatsFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
DeveloperStatsFamily._allTransitiveDependencies,
|
||||
uname: uname,
|
||||
);
|
||||
|
||||
DeveloperStatsProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.uname,
|
||||
}) : super.internal();
|
||||
|
||||
final String? uname;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<DeveloperStats?> Function(DeveloperStatsRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: DeveloperStatsProvider._internal(
|
||||
(ref) => create(ref as DeveloperStatsRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
uname: uname,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<DeveloperStats?> createElement() {
|
||||
return _DeveloperStatsProviderElement(this);
|
||||
FutureOr<DeveloperStats?> create(Ref ref) {
|
||||
final argument = this.argument as String?;
|
||||
return developerStats(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is DeveloperStatsProvider && other.uname == uname;
|
||||
return other is DeveloperStatsProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, uname.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin DeveloperStatsRef on AutoDisposeFutureProviderRef<DeveloperStats?> {
|
||||
/// The parameter `uname` of this provider.
|
||||
String? get uname;
|
||||
}
|
||||
String _$developerStatsHash() => r'45546f29ec7cd1a9c3a4e0f4e39275e78bf34755';
|
||||
|
||||
class _DeveloperStatsProviderElement
|
||||
extends AutoDisposeFutureProviderElement<DeveloperStats?>
|
||||
with DeveloperStatsRef {
|
||||
_DeveloperStatsProviderElement(super.provider);
|
||||
final class DeveloperStatsFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<DeveloperStats?>, String?> {
|
||||
const DeveloperStatsFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'developerStatsProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
DeveloperStatsProvider call(String? uname) =>
|
||||
DeveloperStatsProvider._(argument: uname, from: this);
|
||||
|
||||
@override
|
||||
String? get uname => (origin as DeveloperStatsProvider).uname;
|
||||
String toString() => r'developerStatsProvider';
|
||||
}
|
||||
|
||||
@ProviderFor(developers)
|
||||
const developersProvider = DevelopersProvider._();
|
||||
|
||||
final class DevelopersProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnDeveloper>>,
|
||||
List<SnDeveloper>,
|
||||
FutureOr<List<SnDeveloper>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<List<SnDeveloper>>,
|
||||
$FutureProvider<List<SnDeveloper>> {
|
||||
const DevelopersProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'developersProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$developersHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<List<SnDeveloper>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<List<SnDeveloper>> create(Ref ref) {
|
||||
return developers(ref);
|
||||
}
|
||||
}
|
||||
|
||||
String _$developersHash() => r'252341098617ac398ce133994453f318dd3edbd2';
|
||||
|
||||
/// See also [developers].
|
||||
@ProviderFor(developers)
|
||||
final developersProvider =
|
||||
AutoDisposeFutureProvider<List<SnDeveloper>>.internal(
|
||||
developers,
|
||||
name: r'developersProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$developersHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef DevelopersRef = AutoDisposeFutureProviderRef<List<SnDeveloper>>;
|
||||
String _$devProjectsHash() => r'715b395bebda785d38691ffee3b88e50b498c91a';
|
||||
|
||||
/// See also [devProjects].
|
||||
@ProviderFor(devProjects)
|
||||
const devProjectsProvider = DevProjectsFamily();
|
||||
const devProjectsProvider = DevProjectsFamily._();
|
||||
|
||||
/// See also [devProjects].
|
||||
class DevProjectsFamily extends Family<AsyncValue<List<DevProject>>> {
|
||||
/// See also [devProjects].
|
||||
const DevProjectsFamily();
|
||||
final class DevProjectsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<DevProject>>,
|
||||
List<DevProject>,
|
||||
FutureOr<List<DevProject>>
|
||||
>
|
||||
with $FutureModifier<List<DevProject>>, $FutureProvider<List<DevProject>> {
|
||||
const DevProjectsProvider._({
|
||||
required DevProjectsFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'devProjectsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [devProjects].
|
||||
DevProjectsProvider call(String pubName) {
|
||||
return DevProjectsProvider(pubName);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$devProjectsHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'devProjectsProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
DevProjectsProvider getProviderOverride(
|
||||
covariant DevProjectsProvider provider,
|
||||
) {
|
||||
return call(provider.pubName);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<List<DevProject>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'devProjectsProvider';
|
||||
}
|
||||
|
||||
/// See also [devProjects].
|
||||
class DevProjectsProvider extends AutoDisposeFutureProvider<List<DevProject>> {
|
||||
/// See also [devProjects].
|
||||
DevProjectsProvider(String pubName)
|
||||
: this._internal(
|
||||
(ref) => devProjects(ref as DevProjectsRef, pubName),
|
||||
from: devProjectsProvider,
|
||||
name: r'devProjectsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$devProjectsHash,
|
||||
dependencies: DevProjectsFamily._dependencies,
|
||||
allTransitiveDependencies: DevProjectsFamily._allTransitiveDependencies,
|
||||
pubName: pubName,
|
||||
);
|
||||
|
||||
DevProjectsProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.pubName,
|
||||
}) : super.internal();
|
||||
|
||||
final String pubName;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<List<DevProject>> Function(DevProjectsRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: DevProjectsProvider._internal(
|
||||
(ref) => create(ref as DevProjectsRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
pubName: pubName,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<List<DevProject>> createElement() {
|
||||
return _DevProjectsProviderElement(this);
|
||||
FutureOr<List<DevProject>> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return devProjects(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is DevProjectsProvider && other.pubName == pubName;
|
||||
return other is DevProjectsProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, pubName.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin DevProjectsRef on AutoDisposeFutureProviderRef<List<DevProject>> {
|
||||
/// The parameter `pubName` of this provider.
|
||||
String get pubName;
|
||||
}
|
||||
String _$devProjectsHash() => r'715b395bebda785d38691ffee3b88e50b498c91a';
|
||||
|
||||
class _DevProjectsProviderElement
|
||||
extends AutoDisposeFutureProviderElement<List<DevProject>>
|
||||
with DevProjectsRef {
|
||||
_DevProjectsProviderElement(super.provider);
|
||||
final class DevProjectsFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<List<DevProject>>, String> {
|
||||
const DevProjectsFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'devProjectsProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
DevProjectsProvider call(String pubName) =>
|
||||
DevProjectsProvider._(argument: pubName, from: this);
|
||||
|
||||
@override
|
||||
String get pubName => (origin as DevProjectsProvider).pubName;
|
||||
String toString() => r'devProjectsProvider';
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -22,11 +22,13 @@ final articlesListNotifierProvider = AsyncNotifierProvider.family.autoDispose(
|
||||
ArticlesListNotifier.new,
|
||||
);
|
||||
|
||||
class ArticlesListNotifier
|
||||
extends AutoDisposeFamilyAsyncNotifier<List<SnWebArticle>, ArticleListQuery>
|
||||
with FamilyAsyncPaginationController<SnWebArticle, ArticleListQuery> {
|
||||
class ArticlesListNotifier extends AsyncNotifier<List<SnWebArticle>>
|
||||
with AsyncPaginationController<SnWebArticle> {
|
||||
static const int pageSize = 20;
|
||||
|
||||
final ArticleListQuery arg;
|
||||
ArticlesListNotifier(this.arg);
|
||||
|
||||
@override
|
||||
Future<List<SnWebArticle>> fetch() async {
|
||||
final client = ref.read(apiClientProvider);
|
||||
|
||||
@@ -6,24 +6,44 @@ part of 'articles.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$subscribedFeedsHash() => r'5c0c8c30c5f543f6ea1d39786a6778f77ba5b3df';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [subscribedFeeds].
|
||||
@ProviderFor(subscribedFeeds)
|
||||
final subscribedFeedsProvider =
|
||||
AutoDisposeFutureProvider<List<SnWebFeed>>.internal(
|
||||
subscribedFeeds,
|
||||
name: r'subscribedFeedsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$subscribedFeedsHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
const subscribedFeedsProvider = SubscribedFeedsProvider._();
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef SubscribedFeedsRef = AutoDisposeFutureProviderRef<List<SnWebFeed>>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
final class SubscribedFeedsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnWebFeed>>,
|
||||
List<SnWebFeed>,
|
||||
FutureOr<List<SnWebFeed>>
|
||||
>
|
||||
with $FutureModifier<List<SnWebFeed>>, $FutureProvider<List<SnWebFeed>> {
|
||||
const SubscribedFeedsProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'subscribedFeedsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$subscribedFeedsHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<List<SnWebFeed>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<List<SnWebFeed>> create(Ref ref) {
|
||||
return subscribedFeeds(ref);
|
||||
}
|
||||
}
|
||||
|
||||
String _$subscribedFeedsHash() => r'5c0c8c30c5f543f6ea1d39786a6778f77ba5b3df';
|
||||
|
||||
@@ -26,10 +26,13 @@ final marketplaceWebFeedContentNotifierProvider = AsyncNotifierProvider.family
|
||||
.autoDispose(MarketplaceWebFeedContentNotifier.new);
|
||||
|
||||
class MarketplaceWebFeedContentNotifier
|
||||
extends AutoDisposeFamilyAsyncNotifier<List<SnWebArticle>, String>
|
||||
with FamilyAsyncPaginationController<SnWebArticle, String> {
|
||||
extends AsyncNotifier<List<SnWebArticle>>
|
||||
with AsyncPaginationController<SnWebArticle> {
|
||||
static const int pageSize = 20;
|
||||
|
||||
final String arg;
|
||||
MarketplaceWebFeedContentNotifier(this.arg);
|
||||
|
||||
@override
|
||||
Future<List<SnWebArticle>> fetch() async {
|
||||
final client = ref.read(apiClientProvider);
|
||||
|
||||
@@ -6,289 +6,161 @@ part of 'feed_detail.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$marketplaceWebFeedHash() =>
|
||||
r'8383f94f1bc272b903c341b8d95000313b69d14c';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [marketplaceWebFeed].
|
||||
@ProviderFor(marketplaceWebFeed)
|
||||
const marketplaceWebFeedProvider = MarketplaceWebFeedFamily();
|
||||
const marketplaceWebFeedProvider = MarketplaceWebFeedFamily._();
|
||||
|
||||
/// See also [marketplaceWebFeed].
|
||||
class MarketplaceWebFeedFamily extends Family<AsyncValue<SnWebFeed>> {
|
||||
/// See also [marketplaceWebFeed].
|
||||
const MarketplaceWebFeedFamily();
|
||||
final class MarketplaceWebFeedProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnWebFeed>,
|
||||
SnWebFeed,
|
||||
FutureOr<SnWebFeed>
|
||||
>
|
||||
with $FutureModifier<SnWebFeed>, $FutureProvider<SnWebFeed> {
|
||||
const MarketplaceWebFeedProvider._({
|
||||
required MarketplaceWebFeedFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'marketplaceWebFeedProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [marketplaceWebFeed].
|
||||
MarketplaceWebFeedProvider call(String feedId) {
|
||||
return MarketplaceWebFeedProvider(feedId);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$marketplaceWebFeedHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'marketplaceWebFeedProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
MarketplaceWebFeedProvider getProviderOverride(
|
||||
covariant MarketplaceWebFeedProvider provider,
|
||||
) {
|
||||
return call(provider.feedId);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<SnWebFeed> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'marketplaceWebFeedProvider';
|
||||
}
|
||||
|
||||
/// See also [marketplaceWebFeed].
|
||||
class MarketplaceWebFeedProvider extends AutoDisposeFutureProvider<SnWebFeed> {
|
||||
/// See also [marketplaceWebFeed].
|
||||
MarketplaceWebFeedProvider(String feedId)
|
||||
: this._internal(
|
||||
(ref) => marketplaceWebFeed(ref as MarketplaceWebFeedRef, feedId),
|
||||
from: marketplaceWebFeedProvider,
|
||||
name: r'marketplaceWebFeedProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$marketplaceWebFeedHash,
|
||||
dependencies: MarketplaceWebFeedFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
MarketplaceWebFeedFamily._allTransitiveDependencies,
|
||||
feedId: feedId,
|
||||
);
|
||||
|
||||
MarketplaceWebFeedProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.feedId,
|
||||
}) : super.internal();
|
||||
|
||||
final String feedId;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnWebFeed> Function(MarketplaceWebFeedRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: MarketplaceWebFeedProvider._internal(
|
||||
(ref) => create(ref as MarketplaceWebFeedRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
feedId: feedId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnWebFeed> createElement() {
|
||||
return _MarketplaceWebFeedProviderElement(this);
|
||||
FutureOr<SnWebFeed> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return marketplaceWebFeed(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is MarketplaceWebFeedProvider && other.feedId == feedId;
|
||||
return other is MarketplaceWebFeedProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, feedId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin MarketplaceWebFeedRef on AutoDisposeFutureProviderRef<SnWebFeed> {
|
||||
/// The parameter `feedId` of this provider.
|
||||
String get feedId;
|
||||
}
|
||||
String _$marketplaceWebFeedHash() =>
|
||||
r'8383f94f1bc272b903c341b8d95000313b69d14c';
|
||||
|
||||
class _MarketplaceWebFeedProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnWebFeed>
|
||||
with MarketplaceWebFeedRef {
|
||||
_MarketplaceWebFeedProviderElement(super.provider);
|
||||
final class MarketplaceWebFeedFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnWebFeed>, String> {
|
||||
const MarketplaceWebFeedFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'marketplaceWebFeedProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
MarketplaceWebFeedProvider call(String feedId) =>
|
||||
MarketplaceWebFeedProvider._(argument: feedId, from: this);
|
||||
|
||||
@override
|
||||
String get feedId => (origin as MarketplaceWebFeedProvider).feedId;
|
||||
String toString() => r'marketplaceWebFeedProvider';
|
||||
}
|
||||
|
||||
/// Provider for web feed subscription status
|
||||
|
||||
@ProviderFor(marketplaceWebFeedSubscription)
|
||||
const marketplaceWebFeedSubscriptionProvider =
|
||||
MarketplaceWebFeedSubscriptionFamily._();
|
||||
|
||||
/// Provider for web feed subscription status
|
||||
|
||||
final class MarketplaceWebFeedSubscriptionProvider
|
||||
extends $FunctionalProvider<AsyncValue<bool>, bool, FutureOr<bool>>
|
||||
with $FutureModifier<bool>, $FutureProvider<bool> {
|
||||
/// Provider for web feed subscription status
|
||||
const MarketplaceWebFeedSubscriptionProvider._({
|
||||
required MarketplaceWebFeedSubscriptionFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'marketplaceWebFeedSubscriptionProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$marketplaceWebFeedSubscriptionHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'marketplaceWebFeedSubscriptionProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<bool> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<bool> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return marketplaceWebFeedSubscription(ref, feedId: argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is MarketplaceWebFeedSubscriptionProvider &&
|
||||
other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
String _$marketplaceWebFeedSubscriptionHash() =>
|
||||
r'2ff06a48ed7d4236b57412ecca55e94c0a0b6330';
|
||||
|
||||
/// Provider for web feed subscription status
|
||||
///
|
||||
/// Copied from [marketplaceWebFeedSubscription].
|
||||
@ProviderFor(marketplaceWebFeedSubscription)
|
||||
const marketplaceWebFeedSubscriptionProvider =
|
||||
MarketplaceWebFeedSubscriptionFamily();
|
||||
|
||||
/// Provider for web feed subscription status
|
||||
///
|
||||
/// Copied from [marketplaceWebFeedSubscription].
|
||||
class MarketplaceWebFeedSubscriptionFamily extends Family<AsyncValue<bool>> {
|
||||
/// Provider for web feed subscription status
|
||||
///
|
||||
/// Copied from [marketplaceWebFeedSubscription].
|
||||
const MarketplaceWebFeedSubscriptionFamily();
|
||||
|
||||
/// Provider for web feed subscription status
|
||||
///
|
||||
/// Copied from [marketplaceWebFeedSubscription].
|
||||
MarketplaceWebFeedSubscriptionProvider call({required String feedId}) {
|
||||
return MarketplaceWebFeedSubscriptionProvider(feedId: feedId);
|
||||
}
|
||||
|
||||
@override
|
||||
MarketplaceWebFeedSubscriptionProvider getProviderOverride(
|
||||
covariant MarketplaceWebFeedSubscriptionProvider provider,
|
||||
) {
|
||||
return call(feedId: provider.feedId);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'marketplaceWebFeedSubscriptionProvider';
|
||||
}
|
||||
|
||||
/// Provider for web feed subscription status
|
||||
///
|
||||
/// Copied from [marketplaceWebFeedSubscription].
|
||||
class MarketplaceWebFeedSubscriptionProvider
|
||||
extends AutoDisposeFutureProvider<bool> {
|
||||
/// Provider for web feed subscription status
|
||||
///
|
||||
/// Copied from [marketplaceWebFeedSubscription].
|
||||
MarketplaceWebFeedSubscriptionProvider({required String feedId})
|
||||
: this._internal(
|
||||
(ref) => marketplaceWebFeedSubscription(
|
||||
ref as MarketplaceWebFeedSubscriptionRef,
|
||||
feedId: feedId,
|
||||
),
|
||||
from: marketplaceWebFeedSubscriptionProvider,
|
||||
final class MarketplaceWebFeedSubscriptionFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<bool>, String> {
|
||||
const MarketplaceWebFeedSubscriptionFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'marketplaceWebFeedSubscriptionProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$marketplaceWebFeedSubscriptionHash,
|
||||
dependencies: MarketplaceWebFeedSubscriptionFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
MarketplaceWebFeedSubscriptionFamily._allTransitiveDependencies,
|
||||
feedId: feedId,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
MarketplaceWebFeedSubscriptionProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.feedId,
|
||||
}) : super.internal();
|
||||
/// Provider for web feed subscription status
|
||||
|
||||
final String feedId;
|
||||
MarketplaceWebFeedSubscriptionProvider call({required String feedId}) =>
|
||||
MarketplaceWebFeedSubscriptionProvider._(argument: feedId, from: this);
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<bool> Function(MarketplaceWebFeedSubscriptionRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: MarketplaceWebFeedSubscriptionProvider._internal(
|
||||
(ref) => create(ref as MarketplaceWebFeedSubscriptionRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
feedId: feedId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<bool> createElement() {
|
||||
return _MarketplaceWebFeedSubscriptionProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is MarketplaceWebFeedSubscriptionProvider &&
|
||||
other.feedId == feedId;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, feedId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
String toString() => r'marketplaceWebFeedSubscriptionProvider';
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin MarketplaceWebFeedSubscriptionRef on AutoDisposeFutureProviderRef<bool> {
|
||||
/// The parameter `feedId` of this provider.
|
||||
String get feedId;
|
||||
}
|
||||
|
||||
class _MarketplaceWebFeedSubscriptionProviderElement
|
||||
extends AutoDisposeFutureProviderElement<bool>
|
||||
with MarketplaceWebFeedSubscriptionRef {
|
||||
_MarketplaceWebFeedSubscriptionProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get feedId =>
|
||||
(origin as MarketplaceWebFeedSubscriptionProvider).feedId;
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -73,19 +73,21 @@ class ExploreScreen extends HookConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final currentFilter = useState<String?>(null);
|
||||
final notifier = ref.watch(activityListNotifierProvider.notifier);
|
||||
final notifier = ref.watch(activityListProvider.notifier);
|
||||
|
||||
useEffect(() {
|
||||
// Set FAB type to chat
|
||||
|
||||
final fabMenuNotifier = ref.read(fabMenuTypeProvider.notifier);
|
||||
Future(() {
|
||||
fabMenuNotifier.state = FabMenuType.compose;
|
||||
fabMenuNotifier.setMenuType(FabMenuType.compose);
|
||||
});
|
||||
return () {
|
||||
// Clean up: reset FAB type to main
|
||||
final fabMenu = ref.read(fabMenuTypeProvider);
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (fabMenuNotifier.state == FabMenuType.compose) {
|
||||
fabMenuNotifier.state = FabMenuType.main;
|
||||
if (fabMenu == FabMenuType.compose) {
|
||||
fabMenuNotifier.setMenuType(FabMenuType.main);
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -99,7 +101,7 @@ class ExploreScreen extends HookConsumerWidget {
|
||||
// Listen for post creation events to refresh activities
|
||||
useEffect(() {
|
||||
final subscription = eventBus.on<PostCreatedEvent>().listen((event) {
|
||||
ref.invalidate(activityListNotifierProvider);
|
||||
ref.invalidate(activityListProvider);
|
||||
});
|
||||
return subscription.cancel;
|
||||
}, []);
|
||||
@@ -116,9 +118,7 @@ class ExploreScreen extends HookConsumerWidget {
|
||||
|
||||
final user = ref.watch(userInfoProvider);
|
||||
|
||||
final notificationCount = ref.watch(
|
||||
notificationUnreadCountNotifierProvider,
|
||||
);
|
||||
final notificationCount = ref.watch(notificationUnreadCountProvider);
|
||||
|
||||
final isWide = isWideScreen(context);
|
||||
|
||||
@@ -316,8 +316,8 @@ class ExploreScreen extends HookConsumerWidget {
|
||||
final isWide = isWideScreen(context);
|
||||
|
||||
return PaginationWidget(
|
||||
provider: activityListNotifierProvider,
|
||||
notifier: activityListNotifierProvider.notifier,
|
||||
provider: activityListProvider,
|
||||
notifier: activityListProvider.notifier,
|
||||
// Sliver list cannot provide refresh handled by the pagination list
|
||||
isRefreshable: false,
|
||||
isSliver: true,
|
||||
@@ -339,7 +339,7 @@ class ExploreScreen extends HookConsumerWidget {
|
||||
) {
|
||||
final bodyView = _buildActivityList(context, ref);
|
||||
|
||||
final notifier = ref.watch(activityListNotifierProvider.notifier);
|
||||
final notifier = ref.watch(activityListProvider.notifier);
|
||||
|
||||
return Row(
|
||||
spacing: 12,
|
||||
@@ -557,13 +557,11 @@ class ExploreScreen extends HookConsumerWidget {
|
||||
String? currentFilter,
|
||||
) {
|
||||
final user = ref.watch(userInfoProvider);
|
||||
final notificationCount = ref.watch(
|
||||
notificationUnreadCountNotifierProvider,
|
||||
);
|
||||
final notificationCount = ref.watch(notificationUnreadCountProvider);
|
||||
|
||||
final bodyView = _buildActivityList(context, ref);
|
||||
|
||||
final notifier = ref.watch(activityListNotifierProvider.notifier);
|
||||
final notifier = ref.watch(activityListProvider.notifier);
|
||||
|
||||
return Expanded(
|
||||
child: ClipRRect(
|
||||
@@ -737,7 +735,7 @@ class _ActivityListView extends HookConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final notifier = ref.watch(activityListNotifierProvider.notifier);
|
||||
final notifier = ref.watch(activityListProvider.notifier);
|
||||
|
||||
return SliverList.separated(
|
||||
itemCount: data.length + 1,
|
||||
|
||||
@@ -116,7 +116,7 @@ class FileListScreen extends HookConsumerWidget {
|
||||
completer.future
|
||||
.then((uploadedFile) {
|
||||
if (uploadedFile != null) {
|
||||
ref.invalidate(indexedCloudFileListNotifierProvider);
|
||||
ref.invalidate(indexedCloudFileListProvider);
|
||||
}
|
||||
})
|
||||
.catchError((error) {
|
||||
|
||||
@@ -6,302 +6,173 @@ part of 'lottery.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$lotteryTicketsHash() => r'dd17cd721fc3b176ffa0ee0a85d0d850740e5e80';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [lotteryTickets].
|
||||
@ProviderFor(lotteryTickets)
|
||||
const lotteryTicketsProvider = LotteryTicketsFamily();
|
||||
const lotteryTicketsProvider = LotteryTicketsFamily._();
|
||||
|
||||
/// See also [lotteryTickets].
|
||||
class LotteryTicketsFamily extends Family<AsyncValue<List<SnLotteryTicket>>> {
|
||||
/// See also [lotteryTickets].
|
||||
const LotteryTicketsFamily();
|
||||
final class LotteryTicketsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnLotteryTicket>>,
|
||||
List<SnLotteryTicket>,
|
||||
FutureOr<List<SnLotteryTicket>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<List<SnLotteryTicket>>,
|
||||
$FutureProvider<List<SnLotteryTicket>> {
|
||||
const LotteryTicketsProvider._({
|
||||
required LotteryTicketsFamily super.from,
|
||||
required ({int offset, int take}) super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'lotteryTicketsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [lotteryTickets].
|
||||
LotteryTicketsProvider call({int offset = 0, int take = 20}) {
|
||||
return LotteryTicketsProvider(offset: offset, take: take);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$lotteryTicketsHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'lotteryTicketsProvider'
|
||||
''
|
||||
'$argument';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
LotteryTicketsProvider getProviderOverride(
|
||||
covariant LotteryTicketsProvider provider,
|
||||
) {
|
||||
return call(offset: provider.offset, take: provider.take);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<List<SnLotteryTicket>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'lotteryTicketsProvider';
|
||||
}
|
||||
|
||||
/// See also [lotteryTickets].
|
||||
class LotteryTicketsProvider
|
||||
extends AutoDisposeFutureProvider<List<SnLotteryTicket>> {
|
||||
/// See also [lotteryTickets].
|
||||
LotteryTicketsProvider({int offset = 0, int take = 20})
|
||||
: this._internal(
|
||||
(ref) => lotteryTickets(
|
||||
ref as LotteryTicketsRef,
|
||||
offset: offset,
|
||||
take: take,
|
||||
),
|
||||
from: lotteryTicketsProvider,
|
||||
name: r'lotteryTicketsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$lotteryTicketsHash,
|
||||
dependencies: LotteryTicketsFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
LotteryTicketsFamily._allTransitiveDependencies,
|
||||
offset: offset,
|
||||
take: take,
|
||||
);
|
||||
|
||||
LotteryTicketsProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.offset,
|
||||
required this.take,
|
||||
}) : super.internal();
|
||||
|
||||
final int offset;
|
||||
final int take;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<List<SnLotteryTicket>> Function(LotteryTicketsRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: LotteryTicketsProvider._internal(
|
||||
(ref) => create(ref as LotteryTicketsRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
offset: offset,
|
||||
take: take,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<List<SnLotteryTicket>> createElement() {
|
||||
return _LotteryTicketsProviderElement(this);
|
||||
FutureOr<List<SnLotteryTicket>> create(Ref ref) {
|
||||
final argument = this.argument as ({int offset, int take});
|
||||
return lotteryTickets(ref, offset: argument.offset, take: argument.take);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is LotteryTicketsProvider &&
|
||||
other.offset == offset &&
|
||||
other.take == take;
|
||||
return other is LotteryTicketsProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, offset.hashCode);
|
||||
hash = _SystemHash.combine(hash, take.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin LotteryTicketsRef on AutoDisposeFutureProviderRef<List<SnLotteryTicket>> {
|
||||
/// The parameter `offset` of this provider.
|
||||
int get offset;
|
||||
String _$lotteryTicketsHash() => r'dd17cd721fc3b176ffa0ee0a85d0d850740e5e80';
|
||||
|
||||
/// The parameter `take` of this provider.
|
||||
int get take;
|
||||
final class LotteryTicketsFamily extends $Family
|
||||
with
|
||||
$FunctionalFamilyOverride<
|
||||
FutureOr<List<SnLotteryTicket>>,
|
||||
({int offset, int take})
|
||||
> {
|
||||
const LotteryTicketsFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'lotteryTicketsProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
LotteryTicketsProvider call({int offset = 0, int take = 20}) =>
|
||||
LotteryTicketsProvider._(
|
||||
argument: (offset: offset, take: take),
|
||||
from: this,
|
||||
);
|
||||
|
||||
@override
|
||||
String toString() => r'lotteryTicketsProvider';
|
||||
}
|
||||
|
||||
class _LotteryTicketsProviderElement
|
||||
extends AutoDisposeFutureProviderElement<List<SnLotteryTicket>>
|
||||
with LotteryTicketsRef {
|
||||
_LotteryTicketsProviderElement(super.provider);
|
||||
@ProviderFor(lotteryRecords)
|
||||
const lotteryRecordsProvider = LotteryRecordsFamily._();
|
||||
|
||||
final class LotteryRecordsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnLotteryRecord>>,
|
||||
List<SnLotteryRecord>,
|
||||
FutureOr<List<SnLotteryRecord>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<List<SnLotteryRecord>>,
|
||||
$FutureProvider<List<SnLotteryRecord>> {
|
||||
const LotteryRecordsProvider._({
|
||||
required LotteryRecordsFamily super.from,
|
||||
required ({int offset, int take}) super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'lotteryRecordsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
int get offset => (origin as LotteryTicketsProvider).offset;
|
||||
String debugGetCreateSourceHash() => _$lotteryRecordsHash();
|
||||
|
||||
@override
|
||||
int get take => (origin as LotteryTicketsProvider).take;
|
||||
String toString() {
|
||||
return r'lotteryRecordsProvider'
|
||||
''
|
||||
'$argument';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<List<SnLotteryRecord>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<List<SnLotteryRecord>> create(Ref ref) {
|
||||
final argument = this.argument as ({int offset, int take});
|
||||
return lotteryRecords(ref, offset: argument.offset, take: argument.take);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is LotteryRecordsProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
String _$lotteryRecordsHash() => r'55c657460f18d9777741d09013b445ca036863f3';
|
||||
|
||||
/// See also [lotteryRecords].
|
||||
@ProviderFor(lotteryRecords)
|
||||
const lotteryRecordsProvider = LotteryRecordsFamily();
|
||||
|
||||
/// See also [lotteryRecords].
|
||||
class LotteryRecordsFamily extends Family<AsyncValue<List<SnLotteryRecord>>> {
|
||||
/// See also [lotteryRecords].
|
||||
const LotteryRecordsFamily();
|
||||
|
||||
/// See also [lotteryRecords].
|
||||
LotteryRecordsProvider call({int offset = 0, int take = 20}) {
|
||||
return LotteryRecordsProvider(offset: offset, take: take);
|
||||
}
|
||||
|
||||
@override
|
||||
LotteryRecordsProvider getProviderOverride(
|
||||
covariant LotteryRecordsProvider provider,
|
||||
) {
|
||||
return call(offset: provider.offset, take: provider.take);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'lotteryRecordsProvider';
|
||||
}
|
||||
|
||||
/// See also [lotteryRecords].
|
||||
class LotteryRecordsProvider
|
||||
extends AutoDisposeFutureProvider<List<SnLotteryRecord>> {
|
||||
/// See also [lotteryRecords].
|
||||
LotteryRecordsProvider({int offset = 0, int take = 20})
|
||||
: this._internal(
|
||||
(ref) => lotteryRecords(
|
||||
ref as LotteryRecordsRef,
|
||||
offset: offset,
|
||||
take: take,
|
||||
),
|
||||
from: lotteryRecordsProvider,
|
||||
final class LotteryRecordsFamily extends $Family
|
||||
with
|
||||
$FunctionalFamilyOverride<
|
||||
FutureOr<List<SnLotteryRecord>>,
|
||||
({int offset, int take})
|
||||
> {
|
||||
const LotteryRecordsFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'lotteryRecordsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$lotteryRecordsHash,
|
||||
dependencies: LotteryRecordsFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
LotteryRecordsFamily._allTransitiveDependencies,
|
||||
offset: offset,
|
||||
take: take,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
LotteryRecordsProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.offset,
|
||||
required this.take,
|
||||
}) : super.internal();
|
||||
|
||||
final int offset;
|
||||
final int take;
|
||||
LotteryRecordsProvider call({int offset = 0, int take = 20}) =>
|
||||
LotteryRecordsProvider._(
|
||||
argument: (offset: offset, take: take),
|
||||
from: this,
|
||||
);
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<List<SnLotteryRecord>> Function(LotteryRecordsRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: LotteryRecordsProvider._internal(
|
||||
(ref) => create(ref as LotteryRecordsRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
offset: offset,
|
||||
take: take,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<List<SnLotteryRecord>> createElement() {
|
||||
return _LotteryRecordsProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is LotteryRecordsProvider &&
|
||||
other.offset == offset &&
|
||||
other.take == take;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, offset.hashCode);
|
||||
hash = _SystemHash.combine(hash, take.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
String toString() => r'lotteryRecordsProvider';
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin LotteryRecordsRef on AutoDisposeFutureProviderRef<List<SnLotteryRecord>> {
|
||||
/// The parameter `offset` of this provider.
|
||||
int get offset;
|
||||
|
||||
/// The parameter `take` of this provider.
|
||||
int get take;
|
||||
}
|
||||
|
||||
class _LotteryRecordsProviderElement
|
||||
extends AutoDisposeFutureProviderElement<List<SnLotteryRecord>>
|
||||
with LotteryRecordsRef {
|
||||
_LotteryRecordsProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
int get offset => (origin as LotteryRecordsProvider).offset;
|
||||
@override
|
||||
int get take => (origin as LotteryRecordsProvider).take;
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -82,7 +82,7 @@ class NotificationUnreadCountNotifier
|
||||
}
|
||||
}
|
||||
|
||||
final notificationListNotifierProvider = AsyncNotifierProvider(
|
||||
final notificationListProvider = AsyncNotifierProvider(
|
||||
NotificationListNotifier.new,
|
||||
);
|
||||
|
||||
@@ -108,9 +108,7 @@ class NotificationListNotifier extends AsyncNotifier<List<SnNotification>>
|
||||
.toList();
|
||||
|
||||
final unreadCount = notifications.where((n) => n.viewedAt == null).length;
|
||||
ref
|
||||
.read(notificationUnreadCountNotifierProvider.notifier)
|
||||
.decrement(unreadCount);
|
||||
ref.read(notificationUnreadCountProvider.notifier).decrement(unreadCount);
|
||||
|
||||
return notifications;
|
||||
}
|
||||
@@ -147,7 +145,7 @@ class NotificationSheet extends HookConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
// Refresh unread count when sheet opens to sync across devices
|
||||
ref.read(notificationUnreadCountNotifierProvider.notifier).refresh();
|
||||
ref.read(notificationUnreadCountProvider.notifier).refresh();
|
||||
|
||||
Future<void> markAllRead() async {
|
||||
showLoadingModal(context);
|
||||
@@ -155,8 +153,8 @@ class NotificationSheet extends HookConsumerWidget {
|
||||
await apiClient.post('/ring/notifications/all/read');
|
||||
if (!context.mounted) return;
|
||||
hideLoadingModal(context);
|
||||
ref.invalidate(notificationListNotifierProvider);
|
||||
ref.watch(notificationUnreadCountNotifierProvider.notifier).clear();
|
||||
ref.invalidate(notificationListProvider);
|
||||
ref.watch(notificationUnreadCountProvider.notifier).clear();
|
||||
}
|
||||
|
||||
return SheetScaffold(
|
||||
@@ -168,8 +166,8 @@ class NotificationSheet extends HookConsumerWidget {
|
||||
),
|
||||
],
|
||||
child: PaginationList(
|
||||
provider: notificationListNotifierProvider,
|
||||
notifier: notificationListNotifierProvider.notifier,
|
||||
provider: notificationListProvider,
|
||||
notifier: notificationListProvider.notifier,
|
||||
itemBuilder: (context, index, notification) {
|
||||
final pfp = notification.meta['pfp'] as String?;
|
||||
final images = notification.meta['images'] as List?;
|
||||
|
||||
@@ -6,26 +6,52 @@ part of 'notification.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(NotificationUnreadCountNotifier)
|
||||
const notificationUnreadCountProvider =
|
||||
NotificationUnreadCountNotifierProvider._();
|
||||
|
||||
final class NotificationUnreadCountNotifierProvider
|
||||
extends $AsyncNotifierProvider<NotificationUnreadCountNotifier, int> {
|
||||
const NotificationUnreadCountNotifierProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'notificationUnreadCountProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$notificationUnreadCountNotifierHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
NotificationUnreadCountNotifier create() => NotificationUnreadCountNotifier();
|
||||
}
|
||||
|
||||
String _$notificationUnreadCountNotifierHash() =>
|
||||
r'8bff5ad3b65389589b4112add3246afd9b8e38f9';
|
||||
|
||||
/// See also [NotificationUnreadCountNotifier].
|
||||
@ProviderFor(NotificationUnreadCountNotifier)
|
||||
final notificationUnreadCountNotifierProvider =
|
||||
AutoDisposeAsyncNotifierProvider<
|
||||
NotificationUnreadCountNotifier,
|
||||
int
|
||||
>.internal(
|
||||
NotificationUnreadCountNotifier.new,
|
||||
name: r'notificationUnreadCountNotifierProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$notificationUnreadCountNotifierHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$NotificationUnreadCountNotifier = AutoDisposeAsyncNotifier<int>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
abstract class _$NotificationUnreadCountNotifier extends $AsyncNotifier<int> {
|
||||
FutureOr<int> build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final created = build();
|
||||
final ref = this.ref as $Ref<AsyncValue<int>, int>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<AsyncValue<int>, int>,
|
||||
AsyncValue<int>,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, created);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ class ArticleComposeScreen extends HookConsumerWidget {
|
||||
useEffect(() {
|
||||
if (originalPost == null && initialState == null) {
|
||||
// Try to load the most recent article draft
|
||||
final drafts = ref.read(composeStorageNotifierProvider);
|
||||
final drafts = ref.read(composeStorageProvider);
|
||||
if (drafts.isNotEmpty) {
|
||||
final mostRecentDraft = drafts.values.reduce(
|
||||
(a, b) =>
|
||||
|
||||
@@ -11,14 +11,13 @@ import 'package:island/widgets/paging/pagination_list.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
// Post Categories Notifier
|
||||
final postCategoriesNotifierProvider = AsyncNotifierProvider.autoDispose<
|
||||
final postCategoriesProvider = AsyncNotifierProvider.autoDispose<
|
||||
PostCategoriesNotifier,
|
||||
List<SnPostCategory>
|
||||
>(PostCategoriesNotifier.new);
|
||||
|
||||
class PostCategoriesNotifier
|
||||
extends AutoDisposeAsyncNotifier<List<SnPostCategory>>
|
||||
with AutoDisposeAsyncPaginationController<SnPostCategory> {
|
||||
class PostCategoriesNotifier extends AsyncNotifier<List<SnPostCategory>>
|
||||
with AsyncPaginationController<SnPostCategory> {
|
||||
@override
|
||||
Future<List<SnPostCategory>> fetch() async {
|
||||
final client = ref.read(apiClientProvider);
|
||||
@@ -35,13 +34,13 @@ class PostCategoriesNotifier
|
||||
}
|
||||
|
||||
// Post Tags Notifier
|
||||
final postTagsNotifierProvider =
|
||||
final postTagsProvider =
|
||||
AsyncNotifierProvider.autoDispose<PostTagsNotifier, List<SnPostTag>>(
|
||||
PostTagsNotifier.new,
|
||||
);
|
||||
|
||||
class PostTagsNotifier extends AutoDisposeAsyncNotifier<List<SnPostTag>>
|
||||
with AutoDisposeAsyncPaginationController<SnPostTag> {
|
||||
class PostTagsNotifier extends AsyncNotifier<List<SnPostTag>>
|
||||
with AsyncPaginationController<SnPostTag> {
|
||||
@override
|
||||
Future<List<SnPostTag>> fetch() async {
|
||||
final client = ref.read(apiClientProvider);
|
||||
@@ -65,8 +64,8 @@ class PostCategoriesListScreen extends ConsumerWidget {
|
||||
return AppScaffold(
|
||||
appBar: AppBar(title: const Text('categories').tr()),
|
||||
body: PaginationList(
|
||||
provider: postCategoriesNotifierProvider,
|
||||
notifier: postCategoriesNotifierProvider.notifier,
|
||||
provider: postCategoriesProvider,
|
||||
notifier: postCategoriesProvider.notifier,
|
||||
padding: EdgeInsets.zero,
|
||||
itemBuilder: (context, index, category) {
|
||||
return ListTile(
|
||||
@@ -96,8 +95,8 @@ class PostTagsListScreen extends ConsumerWidget {
|
||||
return AppScaffold(
|
||||
appBar: AppBar(title: const Text('tags').tr()),
|
||||
body: PaginationList(
|
||||
provider: postTagsNotifierProvider,
|
||||
notifier: postTagsNotifierProvider.notifier,
|
||||
provider: postTagsProvider,
|
||||
notifier: postTagsProvider.notifier,
|
||||
padding: EdgeInsets.zero,
|
||||
itemBuilder: (context, index, tag) {
|
||||
return ListTile(
|
||||
|
||||
@@ -6,406 +6,229 @@ part of 'post_category_detail.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$postCategoryHash() => r'0df2de729ba96819ee37377314615abef0c99547';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [postCategory].
|
||||
@ProviderFor(postCategory)
|
||||
const postCategoryProvider = PostCategoryFamily();
|
||||
const postCategoryProvider = PostCategoryFamily._();
|
||||
|
||||
/// See also [postCategory].
|
||||
class PostCategoryFamily extends Family<AsyncValue<SnPostCategory>> {
|
||||
/// See also [postCategory].
|
||||
const PostCategoryFamily();
|
||||
final class PostCategoryProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnPostCategory>,
|
||||
SnPostCategory,
|
||||
FutureOr<SnPostCategory>
|
||||
>
|
||||
with $FutureModifier<SnPostCategory>, $FutureProvider<SnPostCategory> {
|
||||
const PostCategoryProvider._({
|
||||
required PostCategoryFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'postCategoryProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [postCategory].
|
||||
PostCategoryProvider call(String slug) {
|
||||
return PostCategoryProvider(slug);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$postCategoryHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'postCategoryProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
PostCategoryProvider getProviderOverride(
|
||||
covariant PostCategoryProvider provider,
|
||||
) {
|
||||
return call(provider.slug);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<SnPostCategory> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'postCategoryProvider';
|
||||
}
|
||||
|
||||
/// See also [postCategory].
|
||||
class PostCategoryProvider extends AutoDisposeFutureProvider<SnPostCategory> {
|
||||
/// See also [postCategory].
|
||||
PostCategoryProvider(String slug)
|
||||
: this._internal(
|
||||
(ref) => postCategory(ref as PostCategoryRef, slug),
|
||||
from: postCategoryProvider,
|
||||
name: r'postCategoryProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$postCategoryHash,
|
||||
dependencies: PostCategoryFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
PostCategoryFamily._allTransitiveDependencies,
|
||||
slug: slug,
|
||||
);
|
||||
|
||||
PostCategoryProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.slug,
|
||||
}) : super.internal();
|
||||
|
||||
final String slug;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnPostCategory> Function(PostCategoryRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PostCategoryProvider._internal(
|
||||
(ref) => create(ref as PostCategoryRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
slug: slug,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnPostCategory> createElement() {
|
||||
return _PostCategoryProviderElement(this);
|
||||
FutureOr<SnPostCategory> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return postCategory(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PostCategoryProvider && other.slug == slug;
|
||||
return other is PostCategoryProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, slug.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PostCategoryRef on AutoDisposeFutureProviderRef<SnPostCategory> {
|
||||
/// The parameter `slug` of this provider.
|
||||
String get slug;
|
||||
}
|
||||
String _$postCategoryHash() => r'0df2de729ba96819ee37377314615abef0c99547';
|
||||
|
||||
class _PostCategoryProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnPostCategory>
|
||||
with PostCategoryRef {
|
||||
_PostCategoryProviderElement(super.provider);
|
||||
final class PostCategoryFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnPostCategory>, String> {
|
||||
const PostCategoryFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'postCategoryProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
PostCategoryProvider call(String slug) =>
|
||||
PostCategoryProvider._(argument: slug, from: this);
|
||||
|
||||
@override
|
||||
String get slug => (origin as PostCategoryProvider).slug;
|
||||
String toString() => r'postCategoryProvider';
|
||||
}
|
||||
|
||||
@ProviderFor(postTag)
|
||||
const postTagProvider = PostTagFamily._();
|
||||
|
||||
final class PostTagProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnPostTag>,
|
||||
SnPostTag,
|
||||
FutureOr<SnPostTag>
|
||||
>
|
||||
with $FutureModifier<SnPostTag>, $FutureProvider<SnPostTag> {
|
||||
const PostTagProvider._({
|
||||
required PostTagFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'postTagProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$postTagHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'postTagProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<SnPostTag> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<SnPostTag> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return postTag(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PostTagProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
String _$postTagHash() => r'e050fdf9af81a843a9abd9cf979dd2672e0a2b93';
|
||||
|
||||
/// See also [postTag].
|
||||
@ProviderFor(postTag)
|
||||
const postTagProvider = PostTagFamily();
|
||||
|
||||
/// See also [postTag].
|
||||
class PostTagFamily extends Family<AsyncValue<SnPostTag>> {
|
||||
/// See also [postTag].
|
||||
const PostTagFamily();
|
||||
|
||||
/// See also [postTag].
|
||||
PostTagProvider call(String slug) {
|
||||
return PostTagProvider(slug);
|
||||
}
|
||||
|
||||
@override
|
||||
PostTagProvider getProviderOverride(covariant PostTagProvider provider) {
|
||||
return call(provider.slug);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'postTagProvider';
|
||||
}
|
||||
|
||||
/// See also [postTag].
|
||||
class PostTagProvider extends AutoDisposeFutureProvider<SnPostTag> {
|
||||
/// See also [postTag].
|
||||
PostTagProvider(String slug)
|
||||
: this._internal(
|
||||
(ref) => postTag(ref as PostTagRef, slug),
|
||||
from: postTagProvider,
|
||||
final class PostTagFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnPostTag>, String> {
|
||||
const PostTagFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'postTagProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$postTagHash,
|
||||
dependencies: PostTagFamily._dependencies,
|
||||
allTransitiveDependencies: PostTagFamily._allTransitiveDependencies,
|
||||
slug: slug,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
PostTagProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.slug,
|
||||
}) : super.internal();
|
||||
|
||||
final String slug;
|
||||
PostTagProvider call(String slug) =>
|
||||
PostTagProvider._(argument: slug, from: this);
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnPostTag> Function(PostTagRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PostTagProvider._internal(
|
||||
(ref) => create(ref as PostTagRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
slug: slug,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnPostTag> createElement() {
|
||||
return _PostTagProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PostTagProvider && other.slug == slug;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, slug.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
String toString() => r'postTagProvider';
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PostTagRef on AutoDisposeFutureProviderRef<SnPostTag> {
|
||||
/// The parameter `slug` of this provider.
|
||||
String get slug;
|
||||
}
|
||||
|
||||
class _PostTagProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnPostTag>
|
||||
with PostTagRef {
|
||||
_PostTagProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get slug => (origin as PostTagProvider).slug;
|
||||
}
|
||||
|
||||
String _$postCategorySubscriptionStatusHash() =>
|
||||
r'407dc7fcaeffc461b591b4ee2418811aa4f0a63f';
|
||||
|
||||
/// See also [postCategorySubscriptionStatus].
|
||||
@ProviderFor(postCategorySubscriptionStatus)
|
||||
const postCategorySubscriptionStatusProvider =
|
||||
PostCategorySubscriptionStatusFamily();
|
||||
PostCategorySubscriptionStatusFamily._();
|
||||
|
||||
/// See also [postCategorySubscriptionStatus].
|
||||
class PostCategorySubscriptionStatusFamily extends Family<AsyncValue<bool>> {
|
||||
/// See also [postCategorySubscriptionStatus].
|
||||
const PostCategorySubscriptionStatusFamily();
|
||||
final class PostCategorySubscriptionStatusProvider
|
||||
extends $FunctionalProvider<AsyncValue<bool>, bool, FutureOr<bool>>
|
||||
with $FutureModifier<bool>, $FutureProvider<bool> {
|
||||
const PostCategorySubscriptionStatusProvider._({
|
||||
required PostCategorySubscriptionStatusFamily super.from,
|
||||
required (String, bool) super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'postCategorySubscriptionStatusProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [postCategorySubscriptionStatus].
|
||||
PostCategorySubscriptionStatusProvider call(String slug, bool isCategory) {
|
||||
return PostCategorySubscriptionStatusProvider(slug, isCategory);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$postCategorySubscriptionStatusHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'postCategorySubscriptionStatusProvider'
|
||||
''
|
||||
'$argument';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
PostCategorySubscriptionStatusProvider getProviderOverride(
|
||||
covariant PostCategorySubscriptionStatusProvider provider,
|
||||
) {
|
||||
return call(provider.slug, provider.isCategory);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<bool> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'postCategorySubscriptionStatusProvider';
|
||||
}
|
||||
|
||||
/// See also [postCategorySubscriptionStatus].
|
||||
class PostCategorySubscriptionStatusProvider
|
||||
extends AutoDisposeFutureProvider<bool> {
|
||||
/// See also [postCategorySubscriptionStatus].
|
||||
PostCategorySubscriptionStatusProvider(String slug, bool isCategory)
|
||||
: this._internal(
|
||||
(ref) => postCategorySubscriptionStatus(
|
||||
ref as PostCategorySubscriptionStatusRef,
|
||||
slug,
|
||||
isCategory,
|
||||
),
|
||||
from: postCategorySubscriptionStatusProvider,
|
||||
name: r'postCategorySubscriptionStatusProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$postCategorySubscriptionStatusHash,
|
||||
dependencies: PostCategorySubscriptionStatusFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
PostCategorySubscriptionStatusFamily._allTransitiveDependencies,
|
||||
slug: slug,
|
||||
isCategory: isCategory,
|
||||
);
|
||||
|
||||
PostCategorySubscriptionStatusProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.slug,
|
||||
required this.isCategory,
|
||||
}) : super.internal();
|
||||
|
||||
final String slug;
|
||||
final bool isCategory;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<bool> Function(PostCategorySubscriptionStatusRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PostCategorySubscriptionStatusProvider._internal(
|
||||
(ref) => create(ref as PostCategorySubscriptionStatusRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
slug: slug,
|
||||
isCategory: isCategory,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<bool> createElement() {
|
||||
return _PostCategorySubscriptionStatusProviderElement(this);
|
||||
FutureOr<bool> create(Ref ref) {
|
||||
final argument = this.argument as (String, bool);
|
||||
return postCategorySubscriptionStatus(ref, argument.$1, argument.$2);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PostCategorySubscriptionStatusProvider &&
|
||||
other.slug == slug &&
|
||||
other.isCategory == isCategory;
|
||||
other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, slug.hashCode);
|
||||
hash = _SystemHash.combine(hash, isCategory.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PostCategorySubscriptionStatusRef on AutoDisposeFutureProviderRef<bool> {
|
||||
/// The parameter `slug` of this provider.
|
||||
String get slug;
|
||||
String _$postCategorySubscriptionStatusHash() =>
|
||||
r'407dc7fcaeffc461b591b4ee2418811aa4f0a63f';
|
||||
|
||||
/// The parameter `isCategory` of this provider.
|
||||
bool get isCategory;
|
||||
}
|
||||
final class PostCategorySubscriptionStatusFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<bool>, (String, bool)> {
|
||||
const PostCategorySubscriptionStatusFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'postCategorySubscriptionStatusProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
class _PostCategorySubscriptionStatusProviderElement
|
||||
extends AutoDisposeFutureProviderElement<bool>
|
||||
with PostCategorySubscriptionStatusRef {
|
||||
_PostCategorySubscriptionStatusProviderElement(super.provider);
|
||||
PostCategorySubscriptionStatusProvider call(String slug, bool isCategory) =>
|
||||
PostCategorySubscriptionStatusProvider._(
|
||||
argument: (slug, isCategory),
|
||||
from: this,
|
||||
);
|
||||
|
||||
@override
|
||||
String get slug => (origin as PostCategorySubscriptionStatusProvider).slug;
|
||||
@override
|
||||
bool get isCategory =>
|
||||
(origin as PostCategorySubscriptionStatusProvider).isCategory;
|
||||
String toString() => r'postCategorySubscriptionStatusProvider';
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -17,8 +17,8 @@ import 'package:island/widgets/post/post_item.dart';
|
||||
import 'package:island/widgets/post/post_award_history_sheet.dart';
|
||||
import 'package:island/widgets/post/post_pin_sheet.dart';
|
||||
import 'package:island/widgets/post/post_quick_reply.dart';
|
||||
import 'package:island/widgets/post/post_replies.dart';
|
||||
import 'package:island/widgets/post/compose_sheet.dart';
|
||||
import 'package:island/widgets/post/post_replies.dart';
|
||||
import 'package:island/widgets/response.dart';
|
||||
import 'package:island/utils/share_utils.dart';
|
||||
import 'package:island/widgets/safety/abuse_report_helper.dart';
|
||||
@@ -38,20 +38,21 @@ Future<SnPost?> post(Ref ref, String id) async {
|
||||
}
|
||||
|
||||
final postStateProvider =
|
||||
StateNotifierProvider.family<PostState, AsyncValue<SnPost?>, String>(
|
||||
(ref, id) => PostState(ref, id),
|
||||
NotifierProvider.family<PostState, AsyncValue<SnPost?>, String>(
|
||||
PostState.new,
|
||||
);
|
||||
|
||||
class PostState extends StateNotifier<AsyncValue<SnPost?>> {
|
||||
final Ref _ref;
|
||||
final String _id;
|
||||
class PostState extends Notifier<AsyncValue<SnPost?>> {
|
||||
final String arg;
|
||||
PostState(this.arg);
|
||||
|
||||
PostState(this._ref, this._id) : super(const AsyncValue.loading()) {
|
||||
// Initialize with the initial post data
|
||||
_ref.listen<AsyncValue<SnPost?>>(
|
||||
postProvider(_id),
|
||||
@override
|
||||
AsyncValue<SnPost?> build() {
|
||||
ref.listen<AsyncValue<SnPost?>>(
|
||||
postProvider(arg),
|
||||
(_, next) => state = next,
|
||||
);
|
||||
return const AsyncValue.loading();
|
||||
}
|
||||
|
||||
void updatePost(SnPost? newPost) {
|
||||
@@ -460,7 +461,7 @@ class PostDetailScreen extends HookConsumerWidget {
|
||||
ExtendedRefreshIndicator(
|
||||
onRefresh: () async {
|
||||
ref.invalidate(postProvider(id));
|
||||
ref.invalidate(postRepliesNotifierProvider(id));
|
||||
ref.read(postRepliesProvider(id).notifier).refresh();
|
||||
},
|
||||
child: CustomScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
@@ -494,7 +495,9 @@ class PostDetailScreen extends HookConsumerWidget {
|
||||
),
|
||||
onRefresh: () {
|
||||
ref.invalidate(postProvider(id));
|
||||
ref.invalidate(postRepliesNotifierProvider(id));
|
||||
ref
|
||||
.read(postRepliesProvider(id).notifier)
|
||||
.refresh();
|
||||
},
|
||||
onUpdate: (newItem) {
|
||||
ref
|
||||
@@ -523,9 +526,9 @@ class PostDetailScreen extends HookConsumerWidget {
|
||||
(post) => PostQuickReply(
|
||||
parent: post!,
|
||||
onPosted: () {
|
||||
ref.invalidate(
|
||||
postRepliesNotifierProvider(id),
|
||||
);
|
||||
ref
|
||||
.read(postRepliesProvider(id).notifier)
|
||||
.refresh();
|
||||
},
|
||||
),
|
||||
loading: () => const SizedBox.shrink(),
|
||||
|
||||
@@ -6,139 +6,73 @@ part of 'post_detail.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$postHash() => r'66c2eb074c6d7467fef81cab70a13356e648e661';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [post].
|
||||
@ProviderFor(post)
|
||||
const postProvider = PostFamily();
|
||||
const postProvider = PostFamily._();
|
||||
|
||||
/// See also [post].
|
||||
class PostFamily extends Family<AsyncValue<SnPost?>> {
|
||||
/// See also [post].
|
||||
const PostFamily();
|
||||
final class PostProvider
|
||||
extends $FunctionalProvider<AsyncValue<SnPost?>, SnPost?, FutureOr<SnPost?>>
|
||||
with $FutureModifier<SnPost?>, $FutureProvider<SnPost?> {
|
||||
const PostProvider._({
|
||||
required PostFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'postProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [post].
|
||||
PostProvider call(String id) {
|
||||
return PostProvider(id);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$postHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'postProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
PostProvider getProviderOverride(covariant PostProvider provider) {
|
||||
return call(provider.id);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<SnPost?> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'postProvider';
|
||||
}
|
||||
|
||||
/// See also [post].
|
||||
class PostProvider extends AutoDisposeFutureProvider<SnPost?> {
|
||||
/// See also [post].
|
||||
PostProvider(String id)
|
||||
: this._internal(
|
||||
(ref) => post(ref as PostRef, id),
|
||||
from: postProvider,
|
||||
name: r'postProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$postHash,
|
||||
dependencies: PostFamily._dependencies,
|
||||
allTransitiveDependencies: PostFamily._allTransitiveDependencies,
|
||||
id: id,
|
||||
);
|
||||
|
||||
PostProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.id,
|
||||
}) : super.internal();
|
||||
|
||||
final String id;
|
||||
|
||||
@override
|
||||
Override overrideWith(FutureOr<SnPost?> Function(PostRef provider) create) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PostProvider._internal(
|
||||
(ref) => create(ref as PostRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
id: id,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnPost?> createElement() {
|
||||
return _PostProviderElement(this);
|
||||
FutureOr<SnPost?> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return post(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PostProvider && other.id == id;
|
||||
return other is PostProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, id.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PostRef on AutoDisposeFutureProviderRef<SnPost?> {
|
||||
/// The parameter `id` of this provider.
|
||||
String get id;
|
||||
}
|
||||
String _$postHash() => r'66c2eb074c6d7467fef81cab70a13356e648e661';
|
||||
|
||||
class _PostProviderElement extends AutoDisposeFutureProviderElement<SnPost?>
|
||||
with PostRef {
|
||||
_PostProviderElement(super.provider);
|
||||
final class PostFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnPost?>, String> {
|
||||
const PostFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'postProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
PostProvider call(String id) => PostProvider._(argument: id, from: this);
|
||||
|
||||
@override
|
||||
String get id => (origin as PostProvider).id;
|
||||
String toString() => r'postProvider';
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -12,13 +12,12 @@ import 'package:island/pods/paging.dart';
|
||||
import 'package:island/widgets/paging/pagination_list.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
final postSearchNotifierProvider =
|
||||
AsyncNotifierProvider.autoDispose<PostSearchNotifier, List<SnPost>>(
|
||||
PostSearchNotifier.new,
|
||||
);
|
||||
final postSearchProvider = AsyncNotifierProvider.autoDispose(
|
||||
PostSearchNotifier.new,
|
||||
);
|
||||
|
||||
class PostSearchNotifier extends AutoDisposeAsyncNotifier<List<SnPost>>
|
||||
with AutoDisposeAsyncPaginationController<SnPost> {
|
||||
class PostSearchNotifier extends AsyncNotifier<List<SnPost>>
|
||||
with AsyncPaginationController<SnPost> {
|
||||
static const int _pageSize = 20;
|
||||
String _currentQuery = '';
|
||||
String? _pubName;
|
||||
@@ -131,7 +130,7 @@ class PostSearchScreen extends HookConsumerWidget {
|
||||
if (debounceTimer.value?.isActive ?? false) debounceTimer.value!.cancel();
|
||||
|
||||
debounceTimer.value = Timer(debounce, () {
|
||||
ref.read(postSearchNotifierProvider.notifier).search(query);
|
||||
ref.read(postSearchProvider.notifier).search(query);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -140,7 +139,7 @@ class PostSearchScreen extends HookConsumerWidget {
|
||||
|
||||
debounceTimer.value = Timer(debounce, () {
|
||||
ref
|
||||
.read(postSearchNotifierProvider.notifier)
|
||||
.read(postSearchProvider.notifier)
|
||||
.search(
|
||||
query,
|
||||
pubName:
|
||||
@@ -303,7 +302,7 @@ class PostSearchScreen extends HookConsumerWidget {
|
||||
),
|
||||
body: Consumer(
|
||||
builder: (context, ref, child) {
|
||||
final searchState = ref.watch(postSearchNotifierProvider);
|
||||
final searchState = ref.watch(postSearchProvider);
|
||||
|
||||
return CustomScrollView(
|
||||
slivers: [
|
||||
@@ -318,8 +317,8 @@ class PostSearchScreen extends HookConsumerWidget {
|
||||
),
|
||||
// Use PaginationList with isSliver=true
|
||||
PaginationList(
|
||||
provider: postSearchNotifierProvider,
|
||||
notifier: postSearchNotifierProvider.notifier,
|
||||
provider: postSearchProvider,
|
||||
notifier: postSearchProvider.notifier,
|
||||
isSliver: true,
|
||||
isRefreshable:
|
||||
false, // CustomScrollView handles refreshing usually, but here we don't have PullToRefresh
|
||||
@@ -338,7 +337,7 @@ class PostSearchScreen extends HookConsumerWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
if (searchState.valueOrNull?.isEmpty == true &&
|
||||
if (searchState.value?.isEmpty == true &&
|
||||
searchController.text.isNotEmpty &&
|
||||
!searchState.isLoading)
|
||||
SliverFillRemaining(
|
||||
|
||||
@@ -6,650 +6,383 @@ part of 'publisher_profile.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$publisherHash() => r'a1da21f0275421382e2882fd52c4e061c4675cf7';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [publisher].
|
||||
@ProviderFor(publisher)
|
||||
const publisherProvider = PublisherFamily();
|
||||
const publisherProvider = PublisherFamily._();
|
||||
|
||||
/// See also [publisher].
|
||||
class PublisherFamily extends Family<AsyncValue<SnPublisher>> {
|
||||
/// See also [publisher].
|
||||
const PublisherFamily();
|
||||
final class PublisherProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnPublisher>,
|
||||
SnPublisher,
|
||||
FutureOr<SnPublisher>
|
||||
>
|
||||
with $FutureModifier<SnPublisher>, $FutureProvider<SnPublisher> {
|
||||
const PublisherProvider._({
|
||||
required PublisherFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'publisherProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [publisher].
|
||||
PublisherProvider call(String uname) {
|
||||
return PublisherProvider(uname);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$publisherHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'publisherProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
PublisherProvider getProviderOverride(covariant PublisherProvider provider) {
|
||||
return call(provider.uname);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<SnPublisher> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'publisherProvider';
|
||||
}
|
||||
|
||||
/// See also [publisher].
|
||||
class PublisherProvider extends AutoDisposeFutureProvider<SnPublisher> {
|
||||
/// See also [publisher].
|
||||
PublisherProvider(String uname)
|
||||
: this._internal(
|
||||
(ref) => publisher(ref as PublisherRef, uname),
|
||||
from: publisherProvider,
|
||||
name: r'publisherProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$publisherHash,
|
||||
dependencies: PublisherFamily._dependencies,
|
||||
allTransitiveDependencies: PublisherFamily._allTransitiveDependencies,
|
||||
uname: uname,
|
||||
);
|
||||
|
||||
PublisherProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.uname,
|
||||
}) : super.internal();
|
||||
|
||||
final String uname;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnPublisher> Function(PublisherRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PublisherProvider._internal(
|
||||
(ref) => create(ref as PublisherRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
uname: uname,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnPublisher> createElement() {
|
||||
return _PublisherProviderElement(this);
|
||||
FutureOr<SnPublisher> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return publisher(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PublisherProvider && other.uname == uname;
|
||||
return other is PublisherProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, uname.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PublisherRef on AutoDisposeFutureProviderRef<SnPublisher> {
|
||||
/// The parameter `uname` of this provider.
|
||||
String get uname;
|
||||
}
|
||||
String _$publisherHash() => r'a1da21f0275421382e2882fd52c4e061c4675cf7';
|
||||
|
||||
class _PublisherProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnPublisher>
|
||||
with PublisherRef {
|
||||
_PublisherProviderElement(super.provider);
|
||||
final class PublisherFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnPublisher>, String> {
|
||||
const PublisherFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'publisherProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
PublisherProvider call(String uname) =>
|
||||
PublisherProvider._(argument: uname, from: this);
|
||||
|
||||
@override
|
||||
String get uname => (origin as PublisherProvider).uname;
|
||||
String toString() => r'publisherProvider';
|
||||
}
|
||||
|
||||
@ProviderFor(publisherBadges)
|
||||
const publisherBadgesProvider = PublisherBadgesFamily._();
|
||||
|
||||
final class PublisherBadgesProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnAccountBadge>>,
|
||||
List<SnAccountBadge>,
|
||||
FutureOr<List<SnAccountBadge>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<List<SnAccountBadge>>,
|
||||
$FutureProvider<List<SnAccountBadge>> {
|
||||
const PublisherBadgesProvider._({
|
||||
required PublisherBadgesFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'publisherBadgesProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$publisherBadgesHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'publisherBadgesProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<List<SnAccountBadge>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<List<SnAccountBadge>> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return publisherBadges(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PublisherBadgesProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
String _$publisherBadgesHash() => r'26776fd6cb611953f52bdb6a7dfa004c34d5cd8e';
|
||||
|
||||
/// See also [publisherBadges].
|
||||
@ProviderFor(publisherBadges)
|
||||
const publisherBadgesProvider = PublisherBadgesFamily();
|
||||
|
||||
/// See also [publisherBadges].
|
||||
class PublisherBadgesFamily extends Family<AsyncValue<List<SnAccountBadge>>> {
|
||||
/// See also [publisherBadges].
|
||||
const PublisherBadgesFamily();
|
||||
|
||||
/// See also [publisherBadges].
|
||||
PublisherBadgesProvider call(String pubName) {
|
||||
return PublisherBadgesProvider(pubName);
|
||||
}
|
||||
|
||||
@override
|
||||
PublisherBadgesProvider getProviderOverride(
|
||||
covariant PublisherBadgesProvider provider,
|
||||
) {
|
||||
return call(provider.pubName);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'publisherBadgesProvider';
|
||||
}
|
||||
|
||||
/// See also [publisherBadges].
|
||||
class PublisherBadgesProvider
|
||||
extends AutoDisposeFutureProvider<List<SnAccountBadge>> {
|
||||
/// See also [publisherBadges].
|
||||
PublisherBadgesProvider(String pubName)
|
||||
: this._internal(
|
||||
(ref) => publisherBadges(ref as PublisherBadgesRef, pubName),
|
||||
from: publisherBadgesProvider,
|
||||
final class PublisherBadgesFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<List<SnAccountBadge>>, String> {
|
||||
const PublisherBadgesFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'publisherBadgesProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$publisherBadgesHash,
|
||||
dependencies: PublisherBadgesFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
PublisherBadgesFamily._allTransitiveDependencies,
|
||||
pubName: pubName,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
PublisherBadgesProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.pubName,
|
||||
}) : super.internal();
|
||||
|
||||
final String pubName;
|
||||
PublisherBadgesProvider call(String pubName) =>
|
||||
PublisherBadgesProvider._(argument: pubName, from: this);
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<List<SnAccountBadge>> Function(PublisherBadgesRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PublisherBadgesProvider._internal(
|
||||
(ref) => create(ref as PublisherBadgesRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
pubName: pubName,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<List<SnAccountBadge>> createElement() {
|
||||
return _PublisherBadgesProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PublisherBadgesProvider && other.pubName == pubName;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, pubName.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
String toString() => r'publisherBadgesProvider';
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PublisherBadgesRef on AutoDisposeFutureProviderRef<List<SnAccountBadge>> {
|
||||
/// The parameter `pubName` of this provider.
|
||||
String get pubName;
|
||||
}
|
||||
|
||||
class _PublisherBadgesProviderElement
|
||||
extends AutoDisposeFutureProviderElement<List<SnAccountBadge>>
|
||||
with PublisherBadgesRef {
|
||||
_PublisherBadgesProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get pubName => (origin as PublisherBadgesProvider).pubName;
|
||||
}
|
||||
|
||||
String _$publisherSubscriptionStatusHash() =>
|
||||
r'634262ce519e1c8288267df11e08e1d4acaa4a44';
|
||||
|
||||
/// See also [publisherSubscriptionStatus].
|
||||
@ProviderFor(publisherSubscriptionStatus)
|
||||
const publisherSubscriptionStatusProvider = PublisherSubscriptionStatusFamily();
|
||||
const publisherSubscriptionStatusProvider =
|
||||
PublisherSubscriptionStatusFamily._();
|
||||
|
||||
/// See also [publisherSubscriptionStatus].
|
||||
class PublisherSubscriptionStatusFamily
|
||||
extends Family<AsyncValue<SnSubscriptionStatus>> {
|
||||
/// See also [publisherSubscriptionStatus].
|
||||
const PublisherSubscriptionStatusFamily();
|
||||
final class PublisherSubscriptionStatusProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnSubscriptionStatus>,
|
||||
SnSubscriptionStatus,
|
||||
FutureOr<SnSubscriptionStatus>
|
||||
>
|
||||
with
|
||||
$FutureModifier<SnSubscriptionStatus>,
|
||||
$FutureProvider<SnSubscriptionStatus> {
|
||||
const PublisherSubscriptionStatusProvider._({
|
||||
required PublisherSubscriptionStatusFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'publisherSubscriptionStatusProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [publisherSubscriptionStatus].
|
||||
PublisherSubscriptionStatusProvider call(String pubName) {
|
||||
return PublisherSubscriptionStatusProvider(pubName);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$publisherSubscriptionStatusHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'publisherSubscriptionStatusProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
PublisherSubscriptionStatusProvider getProviderOverride(
|
||||
covariant PublisherSubscriptionStatusProvider provider,
|
||||
) {
|
||||
return call(provider.pubName);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<SnSubscriptionStatus> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'publisherSubscriptionStatusProvider';
|
||||
}
|
||||
|
||||
/// See also [publisherSubscriptionStatus].
|
||||
class PublisherSubscriptionStatusProvider
|
||||
extends AutoDisposeFutureProvider<SnSubscriptionStatus> {
|
||||
/// See also [publisherSubscriptionStatus].
|
||||
PublisherSubscriptionStatusProvider(String pubName)
|
||||
: this._internal(
|
||||
(ref) => publisherSubscriptionStatus(
|
||||
ref as PublisherSubscriptionStatusRef,
|
||||
pubName,
|
||||
),
|
||||
from: publisherSubscriptionStatusProvider,
|
||||
name: r'publisherSubscriptionStatusProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$publisherSubscriptionStatusHash,
|
||||
dependencies: PublisherSubscriptionStatusFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
PublisherSubscriptionStatusFamily._allTransitiveDependencies,
|
||||
pubName: pubName,
|
||||
);
|
||||
|
||||
PublisherSubscriptionStatusProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.pubName,
|
||||
}) : super.internal();
|
||||
|
||||
final String pubName;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnSubscriptionStatus> Function(
|
||||
PublisherSubscriptionStatusRef provider,
|
||||
)
|
||||
create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PublisherSubscriptionStatusProvider._internal(
|
||||
(ref) => create(ref as PublisherSubscriptionStatusRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
pubName: pubName,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnSubscriptionStatus> createElement() {
|
||||
return _PublisherSubscriptionStatusProviderElement(this);
|
||||
FutureOr<SnSubscriptionStatus> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return publisherSubscriptionStatus(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PublisherSubscriptionStatusProvider &&
|
||||
other.pubName == pubName;
|
||||
other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, pubName.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PublisherSubscriptionStatusRef
|
||||
on AutoDisposeFutureProviderRef<SnSubscriptionStatus> {
|
||||
/// The parameter `pubName` of this provider.
|
||||
String get pubName;
|
||||
}
|
||||
String _$publisherSubscriptionStatusHash() =>
|
||||
r'634262ce519e1c8288267df11e08e1d4acaa4a44';
|
||||
|
||||
class _PublisherSubscriptionStatusProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnSubscriptionStatus>
|
||||
with PublisherSubscriptionStatusRef {
|
||||
_PublisherSubscriptionStatusProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get pubName => (origin as PublisherSubscriptionStatusProvider).pubName;
|
||||
}
|
||||
|
||||
String _$publisherAppbarForcegroundColorHash() =>
|
||||
r'cd9a9816177a6eecc2bc354acebbbd48892ffdd7';
|
||||
|
||||
/// See also [publisherAppbarForcegroundColor].
|
||||
@ProviderFor(publisherAppbarForcegroundColor)
|
||||
const publisherAppbarForcegroundColorProvider =
|
||||
PublisherAppbarForcegroundColorFamily();
|
||||
|
||||
/// See also [publisherAppbarForcegroundColor].
|
||||
class PublisherAppbarForcegroundColorFamily extends Family<AsyncValue<Color?>> {
|
||||
/// See also [publisherAppbarForcegroundColor].
|
||||
const PublisherAppbarForcegroundColorFamily();
|
||||
|
||||
/// See also [publisherAppbarForcegroundColor].
|
||||
PublisherAppbarForcegroundColorProvider call(String pubName) {
|
||||
return PublisherAppbarForcegroundColorProvider(pubName);
|
||||
}
|
||||
|
||||
@override
|
||||
PublisherAppbarForcegroundColorProvider getProviderOverride(
|
||||
covariant PublisherAppbarForcegroundColorProvider provider,
|
||||
) {
|
||||
return call(provider.pubName);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'publisherAppbarForcegroundColorProvider';
|
||||
}
|
||||
|
||||
/// See also [publisherAppbarForcegroundColor].
|
||||
class PublisherAppbarForcegroundColorProvider
|
||||
extends AutoDisposeFutureProvider<Color?> {
|
||||
/// See also [publisherAppbarForcegroundColor].
|
||||
PublisherAppbarForcegroundColorProvider(String pubName)
|
||||
: this._internal(
|
||||
(ref) => publisherAppbarForcegroundColor(
|
||||
ref as PublisherAppbarForcegroundColorRef,
|
||||
pubName,
|
||||
),
|
||||
from: publisherAppbarForcegroundColorProvider,
|
||||
name: r'publisherAppbarForcegroundColorProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$publisherAppbarForcegroundColorHash,
|
||||
dependencies: PublisherAppbarForcegroundColorFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
PublisherAppbarForcegroundColorFamily._allTransitiveDependencies,
|
||||
pubName: pubName,
|
||||
final class PublisherSubscriptionStatusFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnSubscriptionStatus>, String> {
|
||||
const PublisherSubscriptionStatusFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'publisherSubscriptionStatusProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
PublisherAppbarForcegroundColorProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.pubName,
|
||||
}) : super.internal();
|
||||
|
||||
final String pubName;
|
||||
PublisherSubscriptionStatusProvider call(String pubName) =>
|
||||
PublisherSubscriptionStatusProvider._(argument: pubName, from: this);
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<Color?> Function(PublisherAppbarForcegroundColorRef provider)
|
||||
create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PublisherAppbarForcegroundColorProvider._internal(
|
||||
(ref) => create(ref as PublisherAppbarForcegroundColorRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
pubName: pubName,
|
||||
),
|
||||
);
|
||||
String toString() => r'publisherSubscriptionStatusProvider';
|
||||
}
|
||||
|
||||
@ProviderFor(publisherAppbarForcegroundColor)
|
||||
const publisherAppbarForcegroundColorProvider =
|
||||
PublisherAppbarForcegroundColorFamily._();
|
||||
|
||||
final class PublisherAppbarForcegroundColorProvider
|
||||
extends $FunctionalProvider<AsyncValue<Color?>, Color?, FutureOr<Color?>>
|
||||
with $FutureModifier<Color?>, $FutureProvider<Color?> {
|
||||
const PublisherAppbarForcegroundColorProvider._({
|
||||
required PublisherAppbarForcegroundColorFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'publisherAppbarForcegroundColorProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$publisherAppbarForcegroundColorHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'publisherAppbarForcegroundColorProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<Color?> createElement() {
|
||||
return _PublisherAppbarForcegroundColorProviderElement(this);
|
||||
$FutureProviderElement<Color?> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<Color?> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return publisherAppbarForcegroundColor(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PublisherAppbarForcegroundColorProvider &&
|
||||
other.pubName == pubName;
|
||||
other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, pubName.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PublisherAppbarForcegroundColorRef
|
||||
on AutoDisposeFutureProviderRef<Color?> {
|
||||
/// The parameter `pubName` of this provider.
|
||||
String get pubName;
|
||||
}
|
||||
String _$publisherAppbarForcegroundColorHash() =>
|
||||
r'cd9a9816177a6eecc2bc354acebbbd48892ffdd7';
|
||||
|
||||
class _PublisherAppbarForcegroundColorProviderElement
|
||||
extends AutoDisposeFutureProviderElement<Color?>
|
||||
with PublisherAppbarForcegroundColorRef {
|
||||
_PublisherAppbarForcegroundColorProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get pubName =>
|
||||
(origin as PublisherAppbarForcegroundColorProvider).pubName;
|
||||
}
|
||||
|
||||
String _$publisherHeatmapHash() => r'86db275ce3861a2855b5ec35fbfef85fc47b23a6';
|
||||
|
||||
/// See also [publisherHeatmap].
|
||||
@ProviderFor(publisherHeatmap)
|
||||
const publisherHeatmapProvider = PublisherHeatmapFamily();
|
||||
|
||||
/// See also [publisherHeatmap].
|
||||
class PublisherHeatmapFamily extends Family<AsyncValue<SnHeatmap?>> {
|
||||
/// See also [publisherHeatmap].
|
||||
const PublisherHeatmapFamily();
|
||||
|
||||
/// See also [publisherHeatmap].
|
||||
PublisherHeatmapProvider call(String uname) {
|
||||
return PublisherHeatmapProvider(uname);
|
||||
}
|
||||
|
||||
@override
|
||||
PublisherHeatmapProvider getProviderOverride(
|
||||
covariant PublisherHeatmapProvider provider,
|
||||
) {
|
||||
return call(provider.uname);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'publisherHeatmapProvider';
|
||||
}
|
||||
|
||||
/// See also [publisherHeatmap].
|
||||
class PublisherHeatmapProvider extends AutoDisposeFutureProvider<SnHeatmap?> {
|
||||
/// See also [publisherHeatmap].
|
||||
PublisherHeatmapProvider(String uname)
|
||||
: this._internal(
|
||||
(ref) => publisherHeatmap(ref as PublisherHeatmapRef, uname),
|
||||
from: publisherHeatmapProvider,
|
||||
name: r'publisherHeatmapProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$publisherHeatmapHash,
|
||||
dependencies: PublisherHeatmapFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
PublisherHeatmapFamily._allTransitiveDependencies,
|
||||
uname: uname,
|
||||
final class PublisherAppbarForcegroundColorFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<Color?>, String> {
|
||||
const PublisherAppbarForcegroundColorFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'publisherAppbarForcegroundColorProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
PublisherHeatmapProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.uname,
|
||||
}) : super.internal();
|
||||
|
||||
final String uname;
|
||||
PublisherAppbarForcegroundColorProvider call(String pubName) =>
|
||||
PublisherAppbarForcegroundColorProvider._(argument: pubName, from: this);
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnHeatmap?> Function(PublisherHeatmapRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PublisherHeatmapProvider._internal(
|
||||
(ref) => create(ref as PublisherHeatmapRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
uname: uname,
|
||||
),
|
||||
);
|
||||
String toString() => r'publisherAppbarForcegroundColorProvider';
|
||||
}
|
||||
|
||||
@ProviderFor(publisherHeatmap)
|
||||
const publisherHeatmapProvider = PublisherHeatmapFamily._();
|
||||
|
||||
final class PublisherHeatmapProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnHeatmap?>,
|
||||
SnHeatmap?,
|
||||
FutureOr<SnHeatmap?>
|
||||
>
|
||||
with $FutureModifier<SnHeatmap?>, $FutureProvider<SnHeatmap?> {
|
||||
const PublisherHeatmapProvider._({
|
||||
required PublisherHeatmapFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'publisherHeatmapProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$publisherHeatmapHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'publisherHeatmapProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnHeatmap?> createElement() {
|
||||
return _PublisherHeatmapProviderElement(this);
|
||||
$FutureProviderElement<SnHeatmap?> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<SnHeatmap?> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return publisherHeatmap(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PublisherHeatmapProvider && other.uname == uname;
|
||||
return other is PublisherHeatmapProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, uname.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PublisherHeatmapRef on AutoDisposeFutureProviderRef<SnHeatmap?> {
|
||||
/// The parameter `uname` of this provider.
|
||||
String get uname;
|
||||
}
|
||||
String _$publisherHeatmapHash() => r'86db275ce3861a2855b5ec35fbfef85fc47b23a6';
|
||||
|
||||
class _PublisherHeatmapProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnHeatmap?>
|
||||
with PublisherHeatmapRef {
|
||||
_PublisherHeatmapProviderElement(super.provider);
|
||||
final class PublisherHeatmapFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnHeatmap?>, String> {
|
||||
const PublisherHeatmapFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'publisherHeatmapProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
PublisherHeatmapProvider call(String uname) =>
|
||||
PublisherHeatmapProvider._(argument: uname, from: this);
|
||||
|
||||
@override
|
||||
String get uname => (origin as PublisherHeatmapProvider).uname;
|
||||
String toString() => r'publisherHeatmapProvider';
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -529,10 +529,12 @@ final realmMemberListNotifierProvider = AsyncNotifierProvider.autoDispose
|
||||
RealmMemberListNotifier.new,
|
||||
);
|
||||
|
||||
class RealmMemberListNotifier
|
||||
extends AutoDisposeFamilyAsyncNotifier<List<SnRealmMember>, String>
|
||||
with FamilyAsyncPaginationController<SnRealmMember, String> {
|
||||
static const int _pageSize = 20;
|
||||
class RealmMemberListNotifier extends AsyncNotifier<List<SnRealmMember>>
|
||||
with AsyncPaginationController<SnRealmMember> {
|
||||
String arg;
|
||||
RealmMemberListNotifier(this.arg);
|
||||
|
||||
static const int pageSize = 20;
|
||||
|
||||
@override
|
||||
Future<List<SnRealmMember>> fetch() async {
|
||||
@@ -542,7 +544,7 @@ class RealmMemberListNotifier
|
||||
'/pass/realms/$arg/members',
|
||||
queryParameters: {
|
||||
'offset': fetchedCount,
|
||||
'take': _pageSize,
|
||||
'take': pageSize,
|
||||
'withStatus': true,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -47,13 +47,14 @@ class RealmListScreen extends HookConsumerWidget {
|
||||
// Set FAB type to realm
|
||||
final fabMenuNotifier = ref.read(fabMenuTypeProvider.notifier);
|
||||
Future(() {
|
||||
fabMenuNotifier.state = FabMenuType.realm;
|
||||
fabMenuNotifier.setMenuType(FabMenuType.realm);
|
||||
});
|
||||
return () {
|
||||
// Clean up: reset FAB type to main
|
||||
final fabMenu = ref.read(fabMenuTypeProvider);
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (fabMenuNotifier.state == FabMenuType.realm) {
|
||||
fabMenuNotifier.state = FabMenuType.main;
|
||||
if (fabMenu == FabMenuType.realm) {
|
||||
fabMenuNotifier.setMenuType(FabMenuType.main);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -6,174 +6,155 @@ part of 'realms.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$realmsJoinedHash() => r'b15029acd38f03bbbb8708adb78f25ac357a0421';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [realmsJoined].
|
||||
@ProviderFor(realmsJoined)
|
||||
final realmsJoinedProvider = AutoDisposeFutureProvider<List<SnRealm>>.internal(
|
||||
realmsJoined,
|
||||
name: r'realmsJoinedProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$realmsJoinedHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
const realmsJoinedProvider = RealmsJoinedProvider._();
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef RealmsJoinedRef = AutoDisposeFutureProviderRef<List<SnRealm>>;
|
||||
String _$realmHash() => r'71a126ab2810566646e1629290c1ce9ffa0839e3';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [realm].
|
||||
@ProviderFor(realm)
|
||||
const realmProvider = RealmFamily();
|
||||
|
||||
/// See also [realm].
|
||||
class RealmFamily extends Family<AsyncValue<SnRealm?>> {
|
||||
/// See also [realm].
|
||||
const RealmFamily();
|
||||
|
||||
/// See also [realm].
|
||||
RealmProvider call(String? identifier) {
|
||||
return RealmProvider(identifier);
|
||||
}
|
||||
|
||||
@override
|
||||
RealmProvider getProviderOverride(covariant RealmProvider provider) {
|
||||
return call(provider.identifier);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'realmProvider';
|
||||
}
|
||||
|
||||
/// See also [realm].
|
||||
class RealmProvider extends AutoDisposeFutureProvider<SnRealm?> {
|
||||
/// See also [realm].
|
||||
RealmProvider(String? identifier)
|
||||
: this._internal(
|
||||
(ref) => realm(ref as RealmRef, identifier),
|
||||
from: realmProvider,
|
||||
name: r'realmProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$realmHash,
|
||||
dependencies: RealmFamily._dependencies,
|
||||
allTransitiveDependencies: RealmFamily._allTransitiveDependencies,
|
||||
identifier: identifier,
|
||||
final class RealmsJoinedProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnRealm>>,
|
||||
List<SnRealm>,
|
||||
FutureOr<List<SnRealm>>
|
||||
>
|
||||
with $FutureModifier<List<SnRealm>>, $FutureProvider<List<SnRealm>> {
|
||||
const RealmsJoinedProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'realmsJoinedProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
RealmProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.identifier,
|
||||
}) : super.internal();
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$realmsJoinedHash();
|
||||
|
||||
final String? identifier;
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<List<SnRealm>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Override overrideWith(FutureOr<SnRealm?> Function(RealmRef provider) create) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: RealmProvider._internal(
|
||||
(ref) => create(ref as RealmRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
identifier: identifier,
|
||||
),
|
||||
);
|
||||
FutureOr<List<SnRealm>> create(Ref ref) {
|
||||
return realmsJoined(ref);
|
||||
}
|
||||
}
|
||||
|
||||
String _$realmsJoinedHash() => r'b15029acd38f03bbbb8708adb78f25ac357a0421';
|
||||
|
||||
@ProviderFor(realm)
|
||||
const realmProvider = RealmFamily._();
|
||||
|
||||
final class RealmProvider
|
||||
extends
|
||||
$FunctionalProvider<AsyncValue<SnRealm?>, SnRealm?, FutureOr<SnRealm?>>
|
||||
with $FutureModifier<SnRealm?>, $FutureProvider<SnRealm?> {
|
||||
const RealmProvider._({
|
||||
required RealmFamily super.from,
|
||||
required String? super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'realmProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$realmHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'realmProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnRealm?> createElement() {
|
||||
return _RealmProviderElement(this);
|
||||
$FutureProviderElement<SnRealm?> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<SnRealm?> create(Ref ref) {
|
||||
final argument = this.argument as String?;
|
||||
return realm(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is RealmProvider && other.identifier == identifier;
|
||||
return other is RealmProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, identifier.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin RealmRef on AutoDisposeFutureProviderRef<SnRealm?> {
|
||||
/// The parameter `identifier` of this provider.
|
||||
String? get identifier;
|
||||
}
|
||||
String _$realmHash() => r'71a126ab2810566646e1629290c1ce9ffa0839e3';
|
||||
|
||||
class _RealmProviderElement extends AutoDisposeFutureProviderElement<SnRealm?>
|
||||
with RealmRef {
|
||||
_RealmProviderElement(super.provider);
|
||||
final class RealmFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnRealm?>, String?> {
|
||||
const RealmFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'realmProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
RealmProvider call(String? identifier) =>
|
||||
RealmProvider._(argument: identifier, from: this);
|
||||
|
||||
@override
|
||||
String? get identifier => (origin as RealmProvider).identifier;
|
||||
String toString() => r'realmProvider';
|
||||
}
|
||||
|
||||
@ProviderFor(realmInvites)
|
||||
const realmInvitesProvider = RealmInvitesProvider._();
|
||||
|
||||
final class RealmInvitesProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnRealmMember>>,
|
||||
List<SnRealmMember>,
|
||||
FutureOr<List<SnRealmMember>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<List<SnRealmMember>>,
|
||||
$FutureProvider<List<SnRealmMember>> {
|
||||
const RealmInvitesProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'realmInvitesProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$realmInvitesHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<List<SnRealmMember>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<List<SnRealmMember>> create(Ref ref) {
|
||||
return realmInvites(ref);
|
||||
}
|
||||
}
|
||||
|
||||
String _$realmInvitesHash() => r'92cce0978c7ca8813e27ae42fc6f3a93a09a8962';
|
||||
|
||||
/// See also [realmInvites].
|
||||
@ProviderFor(realmInvites)
|
||||
final realmInvitesProvider =
|
||||
AutoDisposeFutureProvider<List<SnRealmMember>>.internal(
|
||||
realmInvites,
|
||||
name: r'realmInvitesProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$realmInvitesHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef RealmInvitesRef = AutoDisposeFutureProviderRef<List<SnRealmMember>>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -52,7 +52,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
final serverUrl = ref.watch(serverUrlProvider);
|
||||
final prefs = ref.watch(sharedPreferencesProvider);
|
||||
final controller = TextEditingController(text: serverUrl);
|
||||
final settings = ref.watch(appSettingsNotifierProvider);
|
||||
final settings = ref.watch(appSettingsProvider);
|
||||
final isDesktop =
|
||||
!kIsWeb && (Platform.isWindows || Platform.isMacOS || Platform.isLinux);
|
||||
final isWide = isWideScreen(context);
|
||||
@@ -137,9 +137,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
value: settings.themeMode,
|
||||
onChanged: (String? value) {
|
||||
if (value != null) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.setThemeMode(value);
|
||||
ref.read(appSettingsProvider.notifier).setThemeMode(value);
|
||||
showSnackBar('settingsApplied'.tr());
|
||||
}
|
||||
},
|
||||
@@ -170,9 +168,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
suffixIcon: IconButton(
|
||||
icon: const Icon(Symbols.restart_alt),
|
||||
onPressed: () {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.setCustomFonts(null);
|
||||
ref.read(appSettingsProvider.notifier).setCustomFonts(null);
|
||||
showSnackBar('settingsApplied'.tr());
|
||||
},
|
||||
),
|
||||
@@ -183,7 +179,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
),
|
||||
onSubmitted: (value) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.read(appSettingsProvider.notifier)
|
||||
.setCustomFonts(value.isEmpty ? null : value);
|
||||
showSnackBar('settingsApplied'.tr());
|
||||
},
|
||||
@@ -218,7 +214,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
onChanged: (String? value) {
|
||||
if (value != null) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.read(appSettingsProvider.notifier)
|
||||
.setMessageDisplayStyle(value);
|
||||
showSnackBar('settingsApplied'.tr());
|
||||
}
|
||||
@@ -280,7 +276,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.read(appSettingsProvider.notifier)
|
||||
.setAppColorScheme(selectedColor.value);
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
@@ -330,7 +326,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
onColorChanged: (color) {
|
||||
final current = settings.customColors ?? ThemeColors();
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.read(appSettingsProvider.notifier)
|
||||
.setCustomColors(current.copyWith(primary: color?.value));
|
||||
},
|
||||
),
|
||||
@@ -344,7 +340,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
onColorChanged: (color) {
|
||||
final current = settings.customColors ?? ThemeColors();
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.read(appSettingsProvider.notifier)
|
||||
.setCustomColors(current.copyWith(secondary: color?.value));
|
||||
},
|
||||
),
|
||||
@@ -358,7 +354,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
onColorChanged: (color) {
|
||||
final current = settings.customColors ?? ThemeColors();
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.read(appSettingsProvider.notifier)
|
||||
.setCustomColors(current.copyWith(tertiary: color?.value));
|
||||
},
|
||||
),
|
||||
@@ -372,7 +368,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
onColorChanged: (color) {
|
||||
final current = settings.customColors ?? ThemeColors();
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.read(appSettingsProvider.notifier)
|
||||
.setCustomColors(current.copyWith(surface: color?.value));
|
||||
},
|
||||
),
|
||||
@@ -386,7 +382,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
onColorChanged: (color) {
|
||||
final current = settings.customColors ?? ThemeColors();
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.read(appSettingsProvider.notifier)
|
||||
.setCustomColors(
|
||||
current.copyWith(background: color?.value),
|
||||
);
|
||||
@@ -402,7 +398,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
onColorChanged: (color) {
|
||||
final current = settings.customColors ?? ThemeColors();
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.read(appSettingsProvider.notifier)
|
||||
.setCustomColors(current.copyWith(error: color?.value));
|
||||
},
|
||||
),
|
||||
@@ -412,9 +408,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
trailing: const Icon(Symbols.restart_alt).padding(right: 2),
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 20),
|
||||
onTap: () {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.setCustomColors(null);
|
||||
ref.read(appSettingsProvider.notifier).setCustomColors(null);
|
||||
showSnackBar('settingsApplied'.tr());
|
||||
},
|
||||
),
|
||||
@@ -448,9 +442,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
value: settings.fabPosition,
|
||||
onChanged: (String? value) {
|
||||
if (value != null) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.setFabPosition(value);
|
||||
ref.read(appSettingsProvider.notifier).setFabPosition(value);
|
||||
showSnackBar('settingsApplied'.tr());
|
||||
}
|
||||
},
|
||||
@@ -481,7 +473,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
label: '${(settings.cardTransparency * 100).round()}%',
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.read(appSettingsProvider.notifier)
|
||||
.setAppTransparentBackground(value);
|
||||
},
|
||||
),
|
||||
@@ -533,7 +525,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
value: settings.showBackgroundImage,
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.read(appSettingsProvider.notifier)
|
||||
.setShowBackgroundImage(value);
|
||||
},
|
||||
),
|
||||
@@ -609,7 +601,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
? colorScheme.primary
|
||||
: colorScheme.primary;
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.read(appSettingsProvider.notifier)
|
||||
.setAppColorScheme(color.value);
|
||||
if (context.mounted) {
|
||||
hideLoadingModal(context);
|
||||
@@ -699,7 +691,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
value: currentPoolId,
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.read(appSettingsProvider.notifier)
|
||||
.setDefaultPoolId(value);
|
||||
showSnackBar('settingsApplied'.tr());
|
||||
},
|
||||
@@ -738,9 +730,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
trailing: Switch(
|
||||
value: settings.autoTranslate,
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.setAutoTranslate(value);
|
||||
ref.read(appSettingsProvider.notifier).setAutoTranslate(value);
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -754,9 +744,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
trailing: Switch(
|
||||
value: settings.soundEffects,
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.setSoundEffects(value);
|
||||
ref.read(appSettingsProvider.notifier).setSoundEffects(value);
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -770,9 +758,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
trailing: Switch(
|
||||
value: settings.aprilFoolFeatures,
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.setAprilFoolFeatures(value);
|
||||
ref.read(appSettingsProvider.notifier).setAprilFoolFeatures(value);
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -790,9 +776,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
trailing: Switch(
|
||||
value: settings.enterToSend,
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.setEnterToSend(value);
|
||||
ref.read(appSettingsProvider.notifier).setEnterToSend(value);
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -806,9 +790,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
trailing: Switch(
|
||||
value: settings.appBarTransparent,
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.setAppBarTransparent(value);
|
||||
ref.read(appSettingsProvider.notifier).setAppBarTransparent(value);
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -820,9 +802,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
trailing: Switch(
|
||||
value: settings.dataSavingMode,
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.setDataSavingMode(value);
|
||||
ref.read(appSettingsProvider.notifier).setDataSavingMode(value);
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -836,9 +816,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
trailing: Switch(
|
||||
value: settings.disableAnimation,
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.setDisableAnimation(value);
|
||||
ref.read(appSettingsProvider.notifier).setDisableAnimation(value);
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -865,7 +843,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
label: '${(settings.windowOpacity * 100).round()}%',
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.read(appSettingsProvider.notifier)
|
||||
.setWindowOpacity(value);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -6,312 +6,173 @@ part of 'pack_detail.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$marketplaceStickerPackContentHash() =>
|
||||
r'886f8305c978dbea6e5d990a7d555048ac704a5d';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
/// Marketplace version of sticker pack detail page (no publisher dependency).
|
||||
/// Shows all stickers in the pack and provides a button to add the sticker.
|
||||
/// API interactions are intentionally left blank per request.
|
||||
///
|
||||
/// Copied from [marketplaceStickerPackContent].
|
||||
|
||||
@ProviderFor(marketplaceStickerPackContent)
|
||||
const marketplaceStickerPackContentProvider =
|
||||
MarketplaceStickerPackContentFamily();
|
||||
MarketplaceStickerPackContentFamily._();
|
||||
|
||||
/// Marketplace version of sticker pack detail page (no publisher dependency).
|
||||
/// Shows all stickers in the pack and provides a button to add the sticker.
|
||||
/// API interactions are intentionally left blank per request.
|
||||
///
|
||||
/// Copied from [marketplaceStickerPackContent].
|
||||
class MarketplaceStickerPackContentFamily
|
||||
extends Family<AsyncValue<List<SnSticker>>> {
|
||||
|
||||
final class MarketplaceStickerPackContentProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnSticker>>,
|
||||
List<SnSticker>,
|
||||
FutureOr<List<SnSticker>>
|
||||
>
|
||||
with $FutureModifier<List<SnSticker>>, $FutureProvider<List<SnSticker>> {
|
||||
/// Marketplace version of sticker pack detail page (no publisher dependency).
|
||||
/// Shows all stickers in the pack and provides a button to add the sticker.
|
||||
/// API interactions are intentionally left blank per request.
|
||||
///
|
||||
/// Copied from [marketplaceStickerPackContent].
|
||||
const MarketplaceStickerPackContentFamily();
|
||||
const MarketplaceStickerPackContentProvider._({
|
||||
required MarketplaceStickerPackContentFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'marketplaceStickerPackContentProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// Marketplace version of sticker pack detail page (no publisher dependency).
|
||||
/// Shows all stickers in the pack and provides a button to add the sticker.
|
||||
/// API interactions are intentionally left blank per request.
|
||||
///
|
||||
/// Copied from [marketplaceStickerPackContent].
|
||||
MarketplaceStickerPackContentProvider call({required String packId}) {
|
||||
return MarketplaceStickerPackContentProvider(packId: packId);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$marketplaceStickerPackContentHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'marketplaceStickerPackContentProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
MarketplaceStickerPackContentProvider getProviderOverride(
|
||||
covariant MarketplaceStickerPackContentProvider provider,
|
||||
) {
|
||||
return call(packId: provider.packId);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<List<SnSticker>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'marketplaceStickerPackContentProvider';
|
||||
}
|
||||
|
||||
/// Marketplace version of sticker pack detail page (no publisher dependency).
|
||||
/// Shows all stickers in the pack and provides a button to add the sticker.
|
||||
/// API interactions are intentionally left blank per request.
|
||||
///
|
||||
/// Copied from [marketplaceStickerPackContent].
|
||||
class MarketplaceStickerPackContentProvider
|
||||
extends AutoDisposeFutureProvider<List<SnSticker>> {
|
||||
/// Marketplace version of sticker pack detail page (no publisher dependency).
|
||||
/// Shows all stickers in the pack and provides a button to add the sticker.
|
||||
/// API interactions are intentionally left blank per request.
|
||||
///
|
||||
/// Copied from [marketplaceStickerPackContent].
|
||||
MarketplaceStickerPackContentProvider({required String packId})
|
||||
: this._internal(
|
||||
(ref) => marketplaceStickerPackContent(
|
||||
ref as MarketplaceStickerPackContentRef,
|
||||
packId: packId,
|
||||
),
|
||||
from: marketplaceStickerPackContentProvider,
|
||||
name: r'marketplaceStickerPackContentProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$marketplaceStickerPackContentHash,
|
||||
dependencies: MarketplaceStickerPackContentFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
MarketplaceStickerPackContentFamily._allTransitiveDependencies,
|
||||
packId: packId,
|
||||
);
|
||||
|
||||
MarketplaceStickerPackContentProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.packId,
|
||||
}) : super.internal();
|
||||
|
||||
final String packId;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<List<SnSticker>> Function(
|
||||
MarketplaceStickerPackContentRef provider,
|
||||
)
|
||||
create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: MarketplaceStickerPackContentProvider._internal(
|
||||
(ref) => create(ref as MarketplaceStickerPackContentRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
packId: packId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<List<SnSticker>> createElement() {
|
||||
return _MarketplaceStickerPackContentProviderElement(this);
|
||||
FutureOr<List<SnSticker>> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return marketplaceStickerPackContent(ref, packId: argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is MarketplaceStickerPackContentProvider &&
|
||||
other.packId == packId;
|
||||
other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, packId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin MarketplaceStickerPackContentRef
|
||||
on AutoDisposeFutureProviderRef<List<SnSticker>> {
|
||||
/// The parameter `packId` of this provider.
|
||||
String get packId;
|
||||
}
|
||||
String _$marketplaceStickerPackContentHash() =>
|
||||
r'886f8305c978dbea6e5d990a7d555048ac704a5d';
|
||||
|
||||
class _MarketplaceStickerPackContentProviderElement
|
||||
extends AutoDisposeFutureProviderElement<List<SnSticker>>
|
||||
with MarketplaceStickerPackContentRef {
|
||||
_MarketplaceStickerPackContentProviderElement(super.provider);
|
||||
/// Marketplace version of sticker pack detail page (no publisher dependency).
|
||||
/// Shows all stickers in the pack and provides a button to add the sticker.
|
||||
/// API interactions are intentionally left blank per request.
|
||||
|
||||
@override
|
||||
String get packId => (origin as MarketplaceStickerPackContentProvider).packId;
|
||||
}
|
||||
|
||||
String _$marketplaceStickerPackOwnershipHash() =>
|
||||
r'e5dd301c309fac958729d13d984ce7a77edbe7e6';
|
||||
|
||||
/// See also [marketplaceStickerPackOwnership].
|
||||
@ProviderFor(marketplaceStickerPackOwnership)
|
||||
const marketplaceStickerPackOwnershipProvider =
|
||||
MarketplaceStickerPackOwnershipFamily();
|
||||
|
||||
/// See also [marketplaceStickerPackOwnership].
|
||||
class MarketplaceStickerPackOwnershipFamily extends Family<AsyncValue<bool>> {
|
||||
/// See also [marketplaceStickerPackOwnership].
|
||||
const MarketplaceStickerPackOwnershipFamily();
|
||||
|
||||
/// See also [marketplaceStickerPackOwnership].
|
||||
MarketplaceStickerPackOwnershipProvider call({required String packId}) {
|
||||
return MarketplaceStickerPackOwnershipProvider(packId: packId);
|
||||
}
|
||||
|
||||
@override
|
||||
MarketplaceStickerPackOwnershipProvider getProviderOverride(
|
||||
covariant MarketplaceStickerPackOwnershipProvider provider,
|
||||
) {
|
||||
return call(packId: provider.packId);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'marketplaceStickerPackOwnershipProvider';
|
||||
}
|
||||
|
||||
/// See also [marketplaceStickerPackOwnership].
|
||||
class MarketplaceStickerPackOwnershipProvider
|
||||
extends AutoDisposeFutureProvider<bool> {
|
||||
/// See also [marketplaceStickerPackOwnership].
|
||||
MarketplaceStickerPackOwnershipProvider({required String packId})
|
||||
: this._internal(
|
||||
(ref) => marketplaceStickerPackOwnership(
|
||||
ref as MarketplaceStickerPackOwnershipRef,
|
||||
packId: packId,
|
||||
),
|
||||
from: marketplaceStickerPackOwnershipProvider,
|
||||
name: r'marketplaceStickerPackOwnershipProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$marketplaceStickerPackOwnershipHash,
|
||||
dependencies: MarketplaceStickerPackOwnershipFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
MarketplaceStickerPackOwnershipFamily._allTransitiveDependencies,
|
||||
packId: packId,
|
||||
final class MarketplaceStickerPackContentFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<List<SnSticker>>, String> {
|
||||
const MarketplaceStickerPackContentFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'marketplaceStickerPackContentProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
MarketplaceStickerPackOwnershipProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.packId,
|
||||
}) : super.internal();
|
||||
/// Marketplace version of sticker pack detail page (no publisher dependency).
|
||||
/// Shows all stickers in the pack and provides a button to add the sticker.
|
||||
/// API interactions are intentionally left blank per request.
|
||||
|
||||
final String packId;
|
||||
MarketplaceStickerPackContentProvider call({required String packId}) =>
|
||||
MarketplaceStickerPackContentProvider._(argument: packId, from: this);
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<bool> Function(MarketplaceStickerPackOwnershipRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: MarketplaceStickerPackOwnershipProvider._internal(
|
||||
(ref) => create(ref as MarketplaceStickerPackOwnershipRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
packId: packId,
|
||||
),
|
||||
);
|
||||
String toString() => r'marketplaceStickerPackContentProvider';
|
||||
}
|
||||
|
||||
@ProviderFor(marketplaceStickerPackOwnership)
|
||||
const marketplaceStickerPackOwnershipProvider =
|
||||
MarketplaceStickerPackOwnershipFamily._();
|
||||
|
||||
final class MarketplaceStickerPackOwnershipProvider
|
||||
extends $FunctionalProvider<AsyncValue<bool>, bool, FutureOr<bool>>
|
||||
with $FutureModifier<bool>, $FutureProvider<bool> {
|
||||
const MarketplaceStickerPackOwnershipProvider._({
|
||||
required MarketplaceStickerPackOwnershipFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'marketplaceStickerPackOwnershipProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$marketplaceStickerPackOwnershipHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'marketplaceStickerPackOwnershipProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<bool> createElement() {
|
||||
return _MarketplaceStickerPackOwnershipProviderElement(this);
|
||||
$FutureProviderElement<bool> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<bool> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return marketplaceStickerPackOwnership(ref, packId: argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is MarketplaceStickerPackOwnershipProvider &&
|
||||
other.packId == packId;
|
||||
other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, packId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin MarketplaceStickerPackOwnershipRef on AutoDisposeFutureProviderRef<bool> {
|
||||
/// The parameter `packId` of this provider.
|
||||
String get packId;
|
||||
}
|
||||
String _$marketplaceStickerPackOwnershipHash() =>
|
||||
r'e5dd301c309fac958729d13d984ce7a77edbe7e6';
|
||||
|
||||
class _MarketplaceStickerPackOwnershipProviderElement
|
||||
extends AutoDisposeFutureProviderElement<bool>
|
||||
with MarketplaceStickerPackOwnershipRef {
|
||||
_MarketplaceStickerPackOwnershipProviderElement(super.provider);
|
||||
final class MarketplaceStickerPackOwnershipFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<bool>, String> {
|
||||
const MarketplaceStickerPackOwnershipFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'marketplaceStickerPackOwnershipProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
MarketplaceStickerPackOwnershipProvider call({required String packId}) =>
|
||||
MarketplaceStickerPackOwnershipProvider._(argument: packId, from: this);
|
||||
|
||||
@override
|
||||
String get packId =>
|
||||
(origin as MarketplaceStickerPackOwnershipProvider).packId;
|
||||
String toString() => r'marketplaceStickerPackOwnershipProvider';
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -3,8 +3,8 @@ import 'dart:ui';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/screens/notification.dart';
|
||||
import 'package:island/services/responsive.dart';
|
||||
@@ -16,7 +16,20 @@ import 'package:styled_widget/styled_widget.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
import 'package:island/pods/chat/chat_summary.dart';
|
||||
|
||||
final currentRouteProvider = StateProvider<String?>((ref) => null);
|
||||
final currentRouteProvider = NotifierProvider<CurrentRouteNotifier, String?>(
|
||||
CurrentRouteNotifier.new,
|
||||
);
|
||||
|
||||
class CurrentRouteNotifier extends Notifier<String?> {
|
||||
@override
|
||||
String? build() {
|
||||
return null;
|
||||
}
|
||||
|
||||
void updateRoute(String? route) {
|
||||
state = route;
|
||||
}
|
||||
}
|
||||
|
||||
const kWideScreenRouteStart = 4;
|
||||
const kTabRoutes = [
|
||||
@@ -42,16 +55,14 @@ class TabsScreen extends HookConsumerWidget {
|
||||
// Update the current route provider whenever the location changes
|
||||
useEffect(() {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
ref.read(currentRouteProvider.notifier).state = currentLocation;
|
||||
ref.read(currentRouteProvider.notifier).updateRoute(currentLocation);
|
||||
});
|
||||
return null;
|
||||
}, [currentLocation]);
|
||||
|
||||
final notificationUnreadCount = ref.watch(
|
||||
notificationUnreadCountNotifierProvider,
|
||||
);
|
||||
final notificationUnreadCount = ref.watch(notificationUnreadCountProvider);
|
||||
|
||||
final chatUnreadCount = ref.watch(chatUnreadCountNotifierProvider);
|
||||
final chatUnreadCount = ref.watch(chatUnreadCountProvider);
|
||||
|
||||
final wideScreen = isWideScreen(context);
|
||||
|
||||
@@ -134,7 +145,7 @@ class TabsScreen extends HookConsumerWidget {
|
||||
isWideScreen(context) ? null : kWideScreenRouteStart,
|
||||
);
|
||||
final shouldShowFab = routes.contains(currentLocation) && !wideScreen;
|
||||
final settings = ref.watch(appSettingsNotifierProvider);
|
||||
final settings = ref.watch(appSettingsProvider);
|
||||
|
||||
if (isWideScreen(context)) {
|
||||
return Container(
|
||||
|
||||
@@ -66,7 +66,7 @@ class ThoughtScreen extends HookConsumerWidget {
|
||||
);
|
||||
|
||||
// Get initial thoughts and topic from provider
|
||||
final initialThoughts = thoughts.valueOrNull;
|
||||
final initialThoughts = thoughts.value;
|
||||
final initialTopic =
|
||||
(initialThoughts?.isNotEmpty ?? false) &&
|
||||
initialThoughts!.first.sequence?.topic != null
|
||||
|
||||
@@ -6,190 +6,157 @@ part of 'think.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(thoughtAvailableStaus)
|
||||
const thoughtAvailableStausProvider = ThoughtAvailableStausProvider._();
|
||||
|
||||
final class ThoughtAvailableStausProvider
|
||||
extends $FunctionalProvider<AsyncValue<bool>, bool, FutureOr<bool>>
|
||||
with $FutureModifier<bool>, $FutureProvider<bool> {
|
||||
const ThoughtAvailableStausProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'thoughtAvailableStausProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$thoughtAvailableStausHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<bool> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<bool> create(Ref ref) {
|
||||
return thoughtAvailableStaus(ref);
|
||||
}
|
||||
}
|
||||
|
||||
String _$thoughtAvailableStausHash() =>
|
||||
r'720e04e56bff8c4d4ca6854ce997da4e7926c84c';
|
||||
|
||||
/// See also [thoughtAvailableStaus].
|
||||
@ProviderFor(thoughtAvailableStaus)
|
||||
final thoughtAvailableStausProvider = AutoDisposeFutureProvider<bool>.internal(
|
||||
thoughtAvailableStaus,
|
||||
name: r'thoughtAvailableStausProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$thoughtAvailableStausHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef ThoughtAvailableStausRef = AutoDisposeFutureProviderRef<bool>;
|
||||
String _$thoughtSequenceHash() => r'2a93c0a04f9a720ba474c02a36502940fb7f3ed7';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [thoughtSequence].
|
||||
@ProviderFor(thoughtSequence)
|
||||
const thoughtSequenceProvider = ThoughtSequenceFamily();
|
||||
const thoughtSequenceProvider = ThoughtSequenceFamily._();
|
||||
|
||||
/// See also [thoughtSequence].
|
||||
class ThoughtSequenceFamily
|
||||
extends Family<AsyncValue<List<SnThinkingThought>>> {
|
||||
/// See also [thoughtSequence].
|
||||
const ThoughtSequenceFamily();
|
||||
final class ThoughtSequenceProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<SnThinkingThought>>,
|
||||
List<SnThinkingThought>,
|
||||
FutureOr<List<SnThinkingThought>>
|
||||
>
|
||||
with
|
||||
$FutureModifier<List<SnThinkingThought>>,
|
||||
$FutureProvider<List<SnThinkingThought>> {
|
||||
const ThoughtSequenceProvider._({
|
||||
required ThoughtSequenceFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'thoughtSequenceProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [thoughtSequence].
|
||||
ThoughtSequenceProvider call(String sequenceId) {
|
||||
return ThoughtSequenceProvider(sequenceId);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$thoughtSequenceHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'thoughtSequenceProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
ThoughtSequenceProvider getProviderOverride(
|
||||
covariant ThoughtSequenceProvider provider,
|
||||
) {
|
||||
return call(provider.sequenceId);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<List<SnThinkingThought>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'thoughtSequenceProvider';
|
||||
}
|
||||
|
||||
/// See also [thoughtSequence].
|
||||
class ThoughtSequenceProvider
|
||||
extends AutoDisposeFutureProvider<List<SnThinkingThought>> {
|
||||
/// See also [thoughtSequence].
|
||||
ThoughtSequenceProvider(String sequenceId)
|
||||
: this._internal(
|
||||
(ref) => thoughtSequence(ref as ThoughtSequenceRef, sequenceId),
|
||||
from: thoughtSequenceProvider,
|
||||
name: r'thoughtSequenceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$thoughtSequenceHash,
|
||||
dependencies: ThoughtSequenceFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
ThoughtSequenceFamily._allTransitiveDependencies,
|
||||
sequenceId: sequenceId,
|
||||
);
|
||||
|
||||
ThoughtSequenceProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.sequenceId,
|
||||
}) : super.internal();
|
||||
|
||||
final String sequenceId;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<List<SnThinkingThought>> Function(ThoughtSequenceRef provider)
|
||||
create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: ThoughtSequenceProvider._internal(
|
||||
(ref) => create(ref as ThoughtSequenceRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
sequenceId: sequenceId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<List<SnThinkingThought>> createElement() {
|
||||
return _ThoughtSequenceProviderElement(this);
|
||||
FutureOr<List<SnThinkingThought>> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return thoughtSequence(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is ThoughtSequenceProvider && other.sequenceId == sequenceId;
|
||||
return other is ThoughtSequenceProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, sequenceId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin ThoughtSequenceRef
|
||||
on AutoDisposeFutureProviderRef<List<SnThinkingThought>> {
|
||||
/// The parameter `sequenceId` of this provider.
|
||||
String get sequenceId;
|
||||
}
|
||||
String _$thoughtSequenceHash() => r'2a93c0a04f9a720ba474c02a36502940fb7f3ed7';
|
||||
|
||||
class _ThoughtSequenceProviderElement
|
||||
extends AutoDisposeFutureProviderElement<List<SnThinkingThought>>
|
||||
with ThoughtSequenceRef {
|
||||
_ThoughtSequenceProviderElement(super.provider);
|
||||
final class ThoughtSequenceFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<List<SnThinkingThought>>, String> {
|
||||
const ThoughtSequenceFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'thoughtSequenceProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
ThoughtSequenceProvider call(String sequenceId) =>
|
||||
ThoughtSequenceProvider._(argument: sequenceId, from: this);
|
||||
|
||||
@override
|
||||
String get sequenceId => (origin as ThoughtSequenceProvider).sequenceId;
|
||||
String toString() => r'thoughtSequenceProvider';
|
||||
}
|
||||
|
||||
@ProviderFor(thoughtServices)
|
||||
const thoughtServicesProvider = ThoughtServicesProvider._();
|
||||
|
||||
final class ThoughtServicesProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<ThoughtServicesResponse>,
|
||||
ThoughtServicesResponse,
|
||||
FutureOr<ThoughtServicesResponse>
|
||||
>
|
||||
with
|
||||
$FutureModifier<ThoughtServicesResponse>,
|
||||
$FutureProvider<ThoughtServicesResponse> {
|
||||
const ThoughtServicesProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'thoughtServicesProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$thoughtServicesHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<ThoughtServicesResponse> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<ThoughtServicesResponse> create(Ref ref) {
|
||||
return thoughtServices(ref);
|
||||
}
|
||||
}
|
||||
|
||||
String _$thoughtServicesHash() => r'0ddeaec713ecfcdc9786c197f3d4cb41d36c26a5';
|
||||
|
||||
/// See also [thoughtServices].
|
||||
@ProviderFor(thoughtServices)
|
||||
final thoughtServicesProvider =
|
||||
AutoDisposeFutureProvider<ThoughtServicesResponse>.internal(
|
||||
thoughtServices,
|
||||
name: r'thoughtServicesProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$thoughtServicesHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef ThoughtServicesRef =
|
||||
AutoDisposeFutureProviderRef<ThoughtServicesResponse>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -991,7 +991,7 @@ class _CreateTransferSheetState extends State<CreateTransferSheet> {
|
||||
}
|
||||
}
|
||||
|
||||
final transactionListNotifierProvider = AsyncNotifierProvider(
|
||||
final transactionListProvider = AsyncNotifierProvider(
|
||||
TransactionListNotifier.new,
|
||||
);
|
||||
|
||||
@@ -1019,9 +1019,7 @@ class TransactionListNotifier extends AsyncNotifier<List<SnTransaction>>
|
||||
}
|
||||
}
|
||||
|
||||
final walletFundsNotifierProvider = AsyncNotifierProvider(
|
||||
WalletFundsNotifier.new,
|
||||
);
|
||||
final walletFundsProvider = AsyncNotifierProvider(WalletFundsNotifier.new);
|
||||
|
||||
class WalletFundsNotifier extends AsyncNotifier<List<SnWalletFund>>
|
||||
with AsyncPaginationController<SnWalletFund> {
|
||||
@@ -1045,7 +1043,7 @@ class WalletFundsNotifier extends AsyncNotifier<List<SnWalletFund>>
|
||||
}
|
||||
}
|
||||
|
||||
final walletFundRecipientsNotifierProvider = AsyncNotifierProvider(
|
||||
final walletFundRecipientsProvider = AsyncNotifierProvider(
|
||||
WalletFundRecipientsNotifier.new,
|
||||
);
|
||||
|
||||
@@ -1428,8 +1426,8 @@ class WalletScreen extends HookConsumerWidget {
|
||||
// Transactions Tab
|
||||
PaginationList(
|
||||
padding: EdgeInsets.zero,
|
||||
provider: transactionListNotifierProvider,
|
||||
notifier: transactionListNotifierProvider.notifier,
|
||||
provider: transactionListProvider,
|
||||
notifier: transactionListProvider.notifier,
|
||||
itemBuilder: (context, index, transaction) {
|
||||
final isIncome =
|
||||
transaction.payeeWalletId == wallet.value?.id;
|
||||
@@ -1519,7 +1517,7 @@ class WalletScreen extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
Widget _buildFundsList(BuildContext context, WidgetRef ref) {
|
||||
final funds = ref.watch(walletFundsNotifierProvider);
|
||||
final funds = ref.watch(walletFundsProvider);
|
||||
|
||||
return funds.when(
|
||||
data: (fundList) {
|
||||
@@ -1781,7 +1779,7 @@ class WalletScreen extends HookConsumerWidget {
|
||||
if (paidOrder != null) {
|
||||
// Wait for server to handle order
|
||||
await Future.delayed(const Duration(seconds: 1));
|
||||
ref.invalidate(walletFundsNotifierProvider);
|
||||
ref.invalidate(walletFundsProvider);
|
||||
ref.invalidate(walletCurrentProvider);
|
||||
if (context.mounted) {
|
||||
showSnackBar('fundCreatedSuccessfully'.tr());
|
||||
@@ -1807,7 +1805,7 @@ class WalletScreen extends HookConsumerWidget {
|
||||
if (context.mounted) hideLoadingModal(context);
|
||||
|
||||
// Invalidate providers to refresh data
|
||||
ref.invalidate(transactionListNotifierProvider);
|
||||
ref.invalidate(transactionListProvider);
|
||||
ref.invalidate(walletCurrentProvider);
|
||||
if (context.mounted) {
|
||||
showSnackBar('transferCreatedSuccessfully'.tr());
|
||||
|
||||
@@ -6,180 +6,157 @@ part of 'wallet.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$walletCurrentHash() => r'bdc7cb27ce2286b561a03522085cc4efc884faad';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [walletCurrent].
|
||||
@ProviderFor(walletCurrent)
|
||||
final walletCurrentProvider = AutoDisposeFutureProvider<SnWallet?>.internal(
|
||||
walletCurrent,
|
||||
name: r'walletCurrentProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$walletCurrentHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
const walletCurrentProvider = WalletCurrentProvider._();
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef WalletCurrentRef = AutoDisposeFutureProviderRef<SnWallet?>;
|
||||
String _$walletStatsHash() => r'2243011937b377a66cdf44cae144021cee69e82f';
|
||||
|
||||
/// See also [walletStats].
|
||||
@ProviderFor(walletStats)
|
||||
final walletStatsProvider = AutoDisposeFutureProvider<SnWalletStats>.internal(
|
||||
walletStats,
|
||||
name: r'walletStatsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$walletStatsHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef WalletStatsRef = AutoDisposeFutureProviderRef<SnWalletStats>;
|
||||
String _$walletFundHash() => r'459efdee5e2775eedaa4312e0d317c218fa7e1fa';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [walletFund].
|
||||
@ProviderFor(walletFund)
|
||||
const walletFundProvider = WalletFundFamily();
|
||||
|
||||
/// See also [walletFund].
|
||||
class WalletFundFamily extends Family<AsyncValue<SnWalletFund>> {
|
||||
/// See also [walletFund].
|
||||
const WalletFundFamily();
|
||||
|
||||
/// See also [walletFund].
|
||||
WalletFundProvider call(String fundId) {
|
||||
return WalletFundProvider(fundId);
|
||||
}
|
||||
|
||||
@override
|
||||
WalletFundProvider getProviderOverride(
|
||||
covariant WalletFundProvider provider,
|
||||
) {
|
||||
return call(provider.fundId);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'walletFundProvider';
|
||||
}
|
||||
|
||||
/// See also [walletFund].
|
||||
class WalletFundProvider extends AutoDisposeFutureProvider<SnWalletFund> {
|
||||
/// See also [walletFund].
|
||||
WalletFundProvider(String fundId)
|
||||
: this._internal(
|
||||
(ref) => walletFund(ref as WalletFundRef, fundId),
|
||||
from: walletFundProvider,
|
||||
name: r'walletFundProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$walletFundHash,
|
||||
dependencies: WalletFundFamily._dependencies,
|
||||
allTransitiveDependencies: WalletFundFamily._allTransitiveDependencies,
|
||||
fundId: fundId,
|
||||
final class WalletCurrentProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnWallet?>,
|
||||
SnWallet?,
|
||||
FutureOr<SnWallet?>
|
||||
>
|
||||
with $FutureModifier<SnWallet?>, $FutureProvider<SnWallet?> {
|
||||
const WalletCurrentProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'walletCurrentProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
WalletFundProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.fundId,
|
||||
}) : super.internal();
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$walletCurrentHash();
|
||||
|
||||
final String fundId;
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<SnWallet?> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnWalletFund> Function(WalletFundRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: WalletFundProvider._internal(
|
||||
(ref) => create(ref as WalletFundRef),
|
||||
from: from,
|
||||
name: null,
|
||||
FutureOr<SnWallet?> create(Ref ref) {
|
||||
return walletCurrent(ref);
|
||||
}
|
||||
}
|
||||
|
||||
String _$walletCurrentHash() => r'bdc7cb27ce2286b561a03522085cc4efc884faad';
|
||||
|
||||
@ProviderFor(walletStats)
|
||||
const walletStatsProvider = WalletStatsProvider._();
|
||||
|
||||
final class WalletStatsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnWalletStats>,
|
||||
SnWalletStats,
|
||||
FutureOr<SnWalletStats>
|
||||
>
|
||||
with $FutureModifier<SnWalletStats>, $FutureProvider<SnWalletStats> {
|
||||
const WalletStatsProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'walletStatsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
fundId: fundId,
|
||||
),
|
||||
);
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$walletStatsHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<SnWalletStats> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<SnWalletStats> create(Ref ref) {
|
||||
return walletStats(ref);
|
||||
}
|
||||
}
|
||||
|
||||
String _$walletStatsHash() => r'2243011937b377a66cdf44cae144021cee69e82f';
|
||||
|
||||
@ProviderFor(walletFund)
|
||||
const walletFundProvider = WalletFundFamily._();
|
||||
|
||||
final class WalletFundProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<SnWalletFund>,
|
||||
SnWalletFund,
|
||||
FutureOr<SnWalletFund>
|
||||
>
|
||||
with $FutureModifier<SnWalletFund>, $FutureProvider<SnWalletFund> {
|
||||
const WalletFundProvider._({
|
||||
required WalletFundFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'walletFundProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$walletFundHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'walletFundProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnWalletFund> createElement() {
|
||||
return _WalletFundProviderElement(this);
|
||||
$FutureProviderElement<SnWalletFund> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<SnWalletFund> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return walletFund(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is WalletFundProvider && other.fundId == fundId;
|
||||
return other is WalletFundProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, fundId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin WalletFundRef on AutoDisposeFutureProviderRef<SnWalletFund> {
|
||||
/// The parameter `fundId` of this provider.
|
||||
String get fundId;
|
||||
}
|
||||
String _$walletFundHash() => r'459efdee5e2775eedaa4312e0d317c218fa7e1fa';
|
||||
|
||||
class _WalletFundProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnWalletFund>
|
||||
with WalletFundRef {
|
||||
_WalletFundProviderElement(super.provider);
|
||||
final class WalletFundFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnWalletFund>, String> {
|
||||
const WalletFundFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'walletFundProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
WalletFundProvider call(String fundId) =>
|
||||
WalletFundProvider._(argument: fundId, from: this);
|
||||
|
||||
@override
|
||||
String get fundId => (origin as WalletFundProvider).fundId;
|
||||
String toString() => r'walletFundProvider';
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
Reference in New Issue
Block a user