add a shit ton of feature for the custom srs
This commit is contained in:
@@ -6,6 +6,8 @@ import 'package:sqflite/sqflite.dart';
|
||||
import '../models/kanji_item.dart';
|
||||
import '../api/wk_client.dart';
|
||||
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
|
||||
class DeckRepository {
|
||||
Database? _db;
|
||||
String? _apiKey;
|
||||
@@ -98,6 +100,12 @@ class DeckRepository {
|
||||
}
|
||||
|
||||
Future<String?> loadApiKey() async {
|
||||
final envApiKey = dotenv.env['WANIKANI_API_KEY'];
|
||||
if (envApiKey != null && envApiKey.isNotEmpty) {
|
||||
_apiKey = envApiKey;
|
||||
return _apiKey;
|
||||
}
|
||||
|
||||
final db = await _openDb();
|
||||
final rows = await db.query(
|
||||
'settings',
|
||||
|
||||
Reference in New Issue
Block a user