File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -398,6 +398,7 @@ class SupabaseService extends StateHandler {
398398 .from ('User' )
399399 .update ({'profile_picture_url' : publicUrl}).eq ('id' , user.id);
400400 setUserPfp (imageFile);
401+ notifyListeners ();
401402 return publicUrl;
402403 } catch (e) {
403404 print ('Error uploading profile picture: $e ' );
@@ -433,6 +434,7 @@ class SupabaseService extends StateHandler {
433434 final file = File ('${tempDir .path }/pfp_${user .id }.$fileExtension ' );
434435 await file.writeAsBytes (response);
435436 setUserPfp (XFile (file.path));
437+ notifyListeners ();
436438 return ;
437439 } catch (e) {
438440 print ('Error downloading profile picture: $e ' );
Original file line number Diff line number Diff line change @@ -59,28 +59,6 @@ class MyApp extends StatefulWidget {
5959}
6060
6161class _MyAppState extends State <MyApp > {
62- // final UpdateManager _updateManager = UpdateManager();
63- // bool _hasCheckedForUpdates = false;
64-
65- // @override
66- // void initState() {
67- // super.initState();
68- // // Use a post-frame callback to ensure the context is available
69- // WidgetsBinding.instance.addPostFrameCallback((_) {
70- // _checkForUpdates();
71- // });
72- // }
73-
74- // Future<void> _checkForUpdates() async {
75- // if (!_hasCheckedForUpdates) {
76- // _hasCheckedForUpdates = true;
77- // // Wait a short time to let the app finish initializing
78- // await Future.delayed(const Duration(seconds: 3));
79- // if (mounted) {
80- // await _updateManager.checkAndPromptForUpdate(context);
81- // }
82- // }
83- // }
8462
8563 @override
8664 Widget build (BuildContext context) {
You can’t perform that action at this time.
0 commit comments