mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-01 00:39:34 +01:00
14 lines
512 B
Dart
14 lines
512 B
Dart
|
import 'package:famedlysdk/famedlysdk.dart';
|
||
|
import 'package:moor/moor_web.dart';
|
||
|
import 'package:flutter/material.dart';
|
||
|
import 'dart:html';
|
||
|
|
||
|
Database constructDb({bool logStatements = false, String filename = 'database.sqlite', String password = ''}) {
|
||
|
debugPrint('[Moor] Using moor web');
|
||
|
return Database(WebDatabase.withStorage(MoorWebStorage.indexedDbIfSupported(filename), logStatements: logStatements));
|
||
|
}
|
||
|
|
||
|
Future<String> getLocalstorage(String key) async {
|
||
|
return await window.localStorage[key];
|
||
|
}
|