@@ -31,10 +31,18 @@ part 'internal_workers/thread_safe.dart';
3131part 'errors.dart' ;
3232part 'internal.dart' ;
3333
34+ /// {@template fmtc.backend.objectbox}
3435/// Implementation of [FMTCBackend] that uses ObjectBox as the storage database
36+ ///
37+ /// On web, this redirects to a no-op implementation that throws
38+ /// [UnsupportedError] s when attempting to use [initialise] or [uninitialise] ,
39+ /// and [RootUnavailable] when trying to use any other method.
40+ /// {@endtemplate}
3541final class FMTCObjectBoxBackend implements FMTCBackend {
3642 /// {@macro fmtc.backend.initialise}
3743 ///
44+ /// {@template fmtc.backend.objectbox.initialise}
45+ ///
3846 /// ---
3947 ///
4048 /// [maxDatabaseSize] is the maximum size the database file can grow
@@ -50,6 +58,7 @@ final class FMTCObjectBoxBackend implements FMTCBackend {
5058 /// thread.
5159 ///
5260 /// Avoid using [useInMemoryDatabase] outside of testing purposes.
61+ /// {@endtemplate}
5362 @override
5463 Future <void > initialise ({
5564 String ? rootDirectory,
@@ -68,11 +77,14 @@ final class FMTCObjectBoxBackend implements FMTCBackend {
6877
6978 /// {@macro fmtc.backend.uninitialise}
7079 ///
80+ /// {@template fmtc.backend.objectbox.uninitialise}
81+ ///
7182 /// If [immediate] is `true` , any operations currently underway will be lost,
7283 /// as the worker will be killed as quickly as possible (not necessarily
7384 /// instantly).
7485 /// If `false` , all operations currently underway will be allowed to complete,
7586 /// but any operations started after this method call will be lost.
87+ /// {@endtemplate}
7688 @override
7789 Future <void > uninitialise ({
7890 bool deleteRoot = false ,
0 commit comments