File tree Expand file tree Collapse file tree 6 files changed +10
-54
lines changed Expand file tree Collapse file tree 6 files changed +10
-54
lines changed Original file line number Diff line number Diff line change @@ -207,18 +207,8 @@ public function getFiles(): array
207
207
],
208
208
[
209
209
'scope ' => 'default ' ,
210
- 'destination ' => '/lib/src/offline_db_io.dart ' ,
211
- 'template ' => 'flutter/lib/src/offline_db_io.dart.twig ' ,
212
- ],
213
- [
214
- 'scope ' => 'default ' ,
215
- 'destination ' => '/lib/src/offline_db_stub.dart ' ,
216
- 'template ' => 'flutter/lib/src/offline_db_stub.dart.twig ' ,
217
- ],
218
- [
219
- 'scope ' => 'default ' ,
220
- 'destination ' => '/lib/src/offline_db_web.dart ' ,
221
- 'template ' => 'flutter/lib/src/offline_db_web.dart.twig ' ,
210
+ 'destination ' => '/lib/src/offline_db.dart ' ,
211
+ 'template ' => 'flutter/lib/src/offline_db.dart.twig ' ,
222
212
],
223
213
[
224
214
'scope ' => 'default ' ,
Original file line number Diff line number Diff line change @@ -10,9 +10,7 @@ import 'package:sembast/utils/value_utils.dart';
10
10
11
11
import 'enums.dart';
12
12
import 'exception.dart';
13
- import 'offline_db_stub.dart'
14
- if (dart.library.html) 'offline_db_web.dart'
15
- if (dart.library.io) 'offline_db_io.dart';
13
+ import 'offline_db.dart';
16
14
import 'response.dart';
17
15
18
16
class AccessTimestamp {
Original file line number Diff line number Diff line change 1
- import 'dart:io';
2
-
1
+ import 'package:flutter/foundation.dart';
3
2
import 'package:sembast/sembast.dart';
4
3
import 'package:sembast_sqflite/sembast_sqflite.dart';
4
+ import 'package:sembast_web/sembast_web.dart';
5
5
import 'package:sqflite/sqflite.dart' as sqflite;
6
- import 'package:sqflite_common_ffi/sqflite_ffi.dart';
7
6
8
7
class OfflineDatabase {
9
8
static final OfflineDatabase instance = OfflineDatabase._internal();
@@ -13,13 +12,11 @@ class OfflineDatabase {
13
12
14
13
Future<Database > db() async {
15
14
if (_db == null) {
16
- final factory = getDatabaseFactorySqflite(
17
- Platform.isLinux || Platform.isWindows
18
- ? databaseFactoryFfi
19
- : sqflite.databaseFactory,
20
- );
21
- _db = await factory.openDatabase('{{ spec .title | caseLower }}.db');
15
+ final factory = kIsWeb
16
+ ? databaseFactoryWeb
17
+ : getDatabaseFactorySqflite(sqflite.databaseFactory);
18
+ _db = await factory.openDatabase('{{spec .title | caseLower }}.db');
22
19
}
23
20
return _db!;
24
21
}
25
- }
22
+ }
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ dependencies:
23
23
path: ^1.8.2
24
24
sembast: ^3.4.0+6
25
25
sembast_sqflite: ^2.1.0+1
26
- sqflite_common_ffi: ^2.2.2
27
26
sembast_web: ^2.1.0+4
28
27
sqflite: ^2.2.2
29
28
You can’t perform that action at this time.
0 commit comments