[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Cannot use the Ref of totalChapterCacheSizeStateProvider after it has been disposed. This typically happens if:
- A provider rebuilt, but the previous "build" was still pending and is still performing operations.
You should therefore either use `ref.onDispose` to cancel pending work, or
check `ref.mounted` after async gaps or anything that could invalidate the provider.
- You tried to use Ref inside `onDispose` or other life-cycles.
This is not supported, as the provider is already being disposed.
#0 Ref._throwIfInvalidUsage (package:riverpod/src/core/ref.dart:220:7)
ref.dart:220
#1 AnyNotifier.state= (package:riverpod/src/core/provider/notifier_provider.dart:91:9)
notifier_provider.dart:91
#2 TotalChapterCacheSizeState.build.<anonymous closure> (package:mangayomi/modules/more/data_and_storage/providers/storage_usage.dart:17:42)
storage_usage.dart:17
#3 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:948:45)
future_impl.dart:948
#4 Future._propagateToListeners (dart:async/future_impl.dart:977:13)
future_impl.dart:977
#5 Future._completeWithValue (dart:async/future_impl.dart:720:5)
future_impl.dart:720
<asynchronous suspension>
The initialization of discordRPC on iOS and Android was leading to a grey screen (UnimplementedError), preventing the app to paint the Flutter UI.
The flutter_discord_rpc is only available on macOS, Linux and Windows.
Users can now add Mangas/Animes to a **manually** created Mangayomi/local folder.
Feature as described:
```
App Home Location/
local/
Manga Title/
cover.jpg (optional)
Chapter 1/
1.jpg
...
Chapter 2.cbz
...
Anime Title/
cover.png (optional)
Episode 1.mp4
Episode 2.mkv
```
The folder (if exist) will be scanned once per app start.
**Supported filetypes:** (taken from lib/modules/library/providers/local_archive.dart, line 98)
```
Videotypes: mp4, mov, avi, flv, wmv, mpeg, mkv
Imagetypes: jpg, jpeg, png, webp
Archivetypes: cbz, zip, cbt, tar
```
Flutter already knows how to switch the theme automatically.
No need to listen to onPlatformBrightnessChanged.
This works on cold start.
Works when app is running and system theme changes.
And works when backup was done on different system theme and restore is being done on different system theme.