Fix riverpod code generation

This commit is contained in:
problematicconsumer
2023-09-02 22:33:29 +03:30
parent 9a0728371e
commit 2ea54c8117
2 changed files with 4 additions and 3 deletions

View File

@@ -15,14 +15,14 @@ class ProfileDetailNotifier extends _$ProfileDetailNotifier with AppLogger {
Future<ProfileDetailState> build( Future<ProfileDetailState> build(
String id, { String id, {
String? url, String? url,
String? name, String? profileName,
}) async { }) async {
if (id == 'new') { if (id == 'new') {
return ProfileDetailState( return ProfileDetailState(
profile: Profile( profile: Profile(
id: const Uuid().v4(), id: const Uuid().v4(),
active: true, active: true,
name: name ?? "", name: profileName ?? "",
url: url ?? "", url: url ?? "",
lastUpdate: DateTime.now(), lastUpdate: DateTime.now(),
), ),

View File

@@ -25,7 +25,8 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
@override @override
Widget build(BuildContext context, WidgetRef ref) { Widget build(BuildContext context, WidgetRef ref) {
final provider = profileDetailNotifierProvider(id, url: url, name: name); final provider =
profileDetailNotifierProvider(id, url: url, profileName: name);
final t = ref.watch(translationsProvider); final t = ref.watch(translationsProvider);
final asyncState = ref.watch(provider); final asyncState = ref.watch(provider);
final notifier = ref.watch(provider.notifier); final notifier = ref.watch(provider.notifier);