Try using a mixin instead

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2025-04-29 16:41:34 +02:00
parent a04038afc3
commit c3eb677b05
+2 -2
View File
@@ -162,9 +162,9 @@ extension ServiceProviderExtension on BuildContext {
/// to notify listeners of changes. Services are typically registered in
/// `ArcaneServiceProvider` and can be accessed using the `service`
/// method on `BuildContext`.
abstract class ArcaneService<T> with ChangeNotifier {}
abstract class ArcaneService with ChangeNotifier, ArcaneServiceLocators {}
extension ArcaneServiceLocators<T> on ArcaneService {
mixin ArcaneServiceLocators<T> {
/// Retrieves a service of the specified type from the context.
///
/// Returns null if no service of type `T` is found.