Logging service:

- added: reset()
- added: `skipAutodetection` option for module, method, and metadata
- added: unregisterInterface()
- Created FileAndLineNumber mixin

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2025-04-18 15:21:57 +02:00
parent 5d5970c1ee
commit 0c5b947809
4 changed files with 130 additions and 37 deletions
+3 -5
View File
@@ -38,9 +38,7 @@ class ArcaneServiceProvider extends InheritedNotifier {
/// This always returns `true`, meaning dependents will always be notified
/// when this widget is rebuilt.
@override
bool updateShouldNotify(ArcaneServiceProvider oldWidget) {
return true;
}
bool updateShouldNotify(_) => true;
/// Retrieves the nearest `ArcaneServiceProvider` in the widget tree.
///
@@ -105,7 +103,7 @@ extension ServiceProvider on BuildContext {
/// to notify listeners of changes. Services are typically registered in
/// `ArcaneServiceProvider` and can be accessed using the `serviceOfType`
/// method on `BuildContext`.
abstract class ArcaneService with ChangeNotifier {
abstract class ArcaneService<T> with ChangeNotifier {
static T? of<T extends ArcaneService>(BuildContext context) =>
context.serviceOfType<T>();
context.serviceOfType();
}