nc-photos/app/lib/use_case/compat/v46.dart
2024-08-20 01:20:28 +08:00

19 lines
597 B
Dart

import 'package:logging/logging.dart';
import 'package:nc_photos/controller/pref_controller.dart';
import 'package:nc_photos/db/entity_converter.dart';
import 'package:np_codegen/np_codegen.dart';
import 'package:np_db/np_db.dart';
part 'v46.g.dart';
@npLog
class CompatV46 {
static Future<void> insertDbAccounts(
PrefController prefController, NpDb db) async {
_log.info("[insertDbAccounts] Insert current accounts to Sqlite database");
final accounts = prefController.accountsValue;
await db.addAccounts(accounts.toDb());
}
static final _log = _$CompatV46NpLog.log;
}