From 2ea54c8117de5265d2a3f919406047a5196fc038 Mon Sep 17 00:00:00 2001 From: problematicconsumer Date: Sat, 2 Sep 2023 22:33:29 +0330 Subject: [PATCH] Fix riverpod code generation --- .../profile_detail/notifier/profile_detail_notifier.dart | 4 ++-- lib/features/profile_detail/view/profile_detail_page.dart | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/features/profile_detail/notifier/profile_detail_notifier.dart b/lib/features/profile_detail/notifier/profile_detail_notifier.dart index a24dff2e..1d27570a 100644 --- a/lib/features/profile_detail/notifier/profile_detail_notifier.dart +++ b/lib/features/profile_detail/notifier/profile_detail_notifier.dart @@ -15,14 +15,14 @@ class ProfileDetailNotifier extends _$ProfileDetailNotifier with AppLogger { Future build( String id, { String? url, - String? name, + String? profileName, }) async { if (id == 'new') { return ProfileDetailState( profile: Profile( id: const Uuid().v4(), active: true, - name: name ?? "", + name: profileName ?? "", url: url ?? "", lastUpdate: DateTime.now(), ), diff --git a/lib/features/profile_detail/view/profile_detail_page.dart b/lib/features/profile_detail/view/profile_detail_page.dart index 713b8838..4741de74 100644 --- a/lib/features/profile_detail/view/profile_detail_page.dart +++ b/lib/features/profile_detail/view/profile_detail_page.dart @@ -25,7 +25,8 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger { @override 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 asyncState = ref.watch(provider); final notifier = ref.watch(provider.notifier);