hive切换hive_ce

This commit is contained in:
rang 2025-12-22 15:04:04 +08:00
parent 3362a254ff
commit 6efa41e035
30 changed files with 1403 additions and 2566 deletions

3
.vscode/launch.json vendored
View file

@ -8,7 +8,8 @@
"name": "vaani", "name": "vaani",
"request": "launch", "request": "launch",
"program": "lib/main.dart", "program": "lib/main.dart",
"type": "dart" "type": "dart",
"console": "terminal"
}, },
{ {
"name": "vaani (profile mode)", "name": "vaani (profile mode)",

View file

@ -20,7 +20,7 @@ final _logger = Logger('authenticated_users_provider');
class AuthenticatedUsers extends _$AuthenticatedUsers { class AuthenticatedUsers extends _$AuthenticatedUsers {
@override @override
Set<model.AuthenticatedUser> build() { Set<model.AuthenticatedUser> build() {
ref.listenSelf((_, __) { listenSelf((_, __) {
writeStateToBox(); writeStateToBox();
}); });
// get the app settings // get the app settings
@ -35,7 +35,7 @@ class AuthenticatedUsers extends _$AuthenticatedUsers {
Set<model.AuthenticatedUser> readFromBoxOrCreate() { Set<model.AuthenticatedUser> readFromBoxOrCreate() {
if (_box.isNotEmpty) { if (_box.isNotEmpty) {
final foundData = _box.getRange(0, _box.length); final foundData = _box.values.toList();
_logger.fine( _logger.fine(
'found users in box: ${foundData.obfuscate()}', 'found users in box: ${foundData.obfuscate()}',
); );

View file

@ -7,7 +7,7 @@ part of 'authenticated_users_provider.dart';
// ************************************************************************** // **************************************************************************
String _$authenticatedUsersHash() => String _$authenticatedUsersHash() =>
r'5fdd472f62fc3b73ff8417cdce9f02e86c33d00f'; r'4b839cd69be08044e17e540290143c2a3b870b97';
/// provides with a set of authenticated users /// provides with a set of authenticated users
/// ///

View file

@ -188,7 +188,7 @@ final librariesProvider =
); );
typedef _$Libraries = AutoDisposeAsyncNotifier<List<Library>>; typedef _$Libraries = AutoDisposeAsyncNotifier<List<Library>>;
String _$libraryItemsHash() => r'847ff8f5c325a786f257c2b98986098a9664cbb5'; String _$libraryItemsHash() => r'2927603eca709f7444a5d2ab5595dedc8596de78';
/// See also [LibraryItems]. /// See also [LibraryItems].
@ProviderFor(LibraryItems) @ProviderFor(LibraryItems)

View file

@ -29,7 +29,7 @@ class ServerAlreadyExistsException implements Exception {
class AudiobookShelfServer extends _$AudiobookShelfServer { class AudiobookShelfServer extends _$AudiobookShelfServer {
@override @override
Set<model.AudiobookShelfServer> build() { Set<model.AudiobookShelfServer> build() {
ref.listenSelf((_, __) { listenSelf((_, __) {
writeStateToBox(); writeStateToBox();
}); });
// get the app settings // get the app settings
@ -48,7 +48,7 @@ class AudiobookShelfServer extends _$AudiobookShelfServer {
Set<model.AudiobookShelfServer> readFromBoxOrCreate() { Set<model.AudiobookShelfServer> readFromBoxOrCreate() {
if (_box.isNotEmpty) { if (_box.isNotEmpty) {
final foundServers = _box.getRange(0, _box.length); final foundServers = _box.values.toList();
_logger.info('found servers in box: ${foundServers.obfuscate()}'); _logger.info('found servers in box: ${foundServers.obfuscate()}');
return foundServers.nonNulls.toSet(); return foundServers.nonNulls.toSet();
} else { } else {

View file

@ -7,7 +7,7 @@ part of 'server_provider.dart';
// ************************************************************************** // **************************************************************************
String _$audiobookShelfServerHash() => String _$audiobookShelfServerHash() =>
r'31a96b431221965cd586aad670a32ca901539e41'; r'b56be59093e7c7a4df8162fec1bdc9c066887ca2';
/// provides with a set of servers added by the user /// provides with a set of servers added by the user
/// ///

View file

@ -1,5 +1,5 @@
import 'package:flutter/foundation.dart' show immutable; import 'package:flutter/foundation.dart' show immutable;
import 'package:hive/hive.dart'; import 'package:hive_ce/hive.dart';
import 'package:vaani/features/per_book_settings/models/book_settings.dart'; import 'package:vaani/features/per_book_settings/models/book_settings.dart';
import 'package:vaani/features/settings/models/models.dart'; import 'package:vaani/features/settings/models/models.dart';
@ -7,21 +7,41 @@ import 'package:vaani/features/settings/models/models.dart';
class AvailableHiveBoxes { class AvailableHiveBoxes {
const AvailableHiveBoxes._(); const AvailableHiveBoxes._();
static Future<void> init() async {
/// Box for storing user preferences as [AppSettings] /// Box for storing user preferences as [AppSettings]
static final userPrefsBox = Hive.box<AppSettings>(name: 'userPrefs'); await Hive.openBox<AppSettings>('userPrefs');
/// Box for storing [ApiSettings] /// Box for storing [ApiSettings]
static final apiSettingsBox = Hive.box<ApiSettings>(name: 'apiSettings'); await Hive.openBox<ApiSettings>('apiSettings');
/// stores the a list of [AudiobookShelfServer]
await Hive.openBox<AudiobookShelfServer>('audiobookShelfServer');
/// stores the a list of [AuthenticatedUser]
await Hive.openBox<AuthenticatedUser>('authenticatedUser');
/// stores the a list of [BookSettings]
await Hive.openBox<BookSettings>('bookSettings');
}
/// Box for storing user preferences as [AppSettings]
static final userPrefsBox = Hive.box<AppSettings>('userPrefs');
/// Box for storing [ApiSettings]
static final apiSettingsBox = Hive.box<ApiSettings>('apiSettings');
/// stores the a list of [AudiobookShelfServer] /// stores the a list of [AudiobookShelfServer]
static final serverBox = static final serverBox =
Hive.box<AudiobookShelfServer>(name: 'audiobookShelfServer'); Hive.box<AudiobookShelfServer>('audiobookShelfServer');
/// stores the a list of [AuthenticatedUser] /// stores the a list of [AuthenticatedUser]
static final authenticatedUserBox = static final authenticatedUserBox =
Hive.box<AuthenticatedUser>(name: 'authenticatedUser'); Hive.box<AuthenticatedUser>('authenticatedUser');
/// stores the a list of [BookSettings] /// stores the a list of [BookSettings]
static final individualBookSettingsBox = static final individualBookSettingsBox =
Hive.box<BookSettings>(name: 'bookSettings'); Hive.box<BookSettings>('bookSettings');
} }

View file

@ -1,6 +1,4 @@
import 'package:isar/isar.dart'; // part 'image.g.dart';
part 'image.g.dart';
/// Represents a cover image for a library item /// Represents a cover image for a library item
/// ///
@ -11,10 +9,10 @@ part 'image.g.dart';
/// also index the id /// also index the id
/// This is because the image is a part of the library item and the library item /// This is because the image is a part of the library item and the library item
/// is the parent of the image /// is the parent of the image
@Collection(ignore: {'path'}) // @Collection(ignore: {'path'})
@Name('CacheImage') // @Name('CacheImage')
class Image { class Image {
@Id() // @Id()
int id; int id;
String? thumbnailPath; String? thumbnailPath;

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,5 @@
import 'package:hive/hive.dart'; import 'package:hive_ce_flutter/hive_flutter.dart';
import 'package:vaani/db/available_boxes.dart';
import 'package:vaani/globals.dart'; import 'package:vaani/globals.dart';
import 'register_models.dart'; import 'register_models.dart';
@ -13,8 +14,10 @@ Future initStorage() async {
// ); // );
// await storageDir.create(recursive: true); // await storageDir.create(recursive: true);
Hive.defaultDirectory = appDocumentsDir.path; Hive.initFlutter(appName);
appLogger.config('Hive storage directory init: ${Hive.defaultDirectory}'); // Hive.defaultDirectory = appDocumentsDir.path;
// appLogger.config('Hive storage directory init: ${Hive.defaultDirectory}');
await registerModels(); await registerModels();
await AvailableHiveBoxes.init();
} }

View file

@ -1,13 +1,8 @@
// a table to track preferences of player for each book // a table to track preferences of player for each book
import 'package:isar/isar.dart'; // part 'book_prefs.g.dart';
part 'book_prefs.g.dart';
/// stores the preferences of the player for a book /// stores the preferences of the player for a book
@Collection()
@Name('BookPrefs')
class BookPrefs { class BookPrefs {
@Id()
int libItemId; int libItemId;
double? speed; double? speed;

View file

@ -1,496 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'book_prefs.dart';
// **************************************************************************
// _IsarCollectionGenerator
// **************************************************************************
// coverage:ignore-file
// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors
// ignore_for_file: type=lint
extension GetBookPrefsCollection on Isar {
IsarCollection<int, BookPrefs> get bookPrefs => this.collection();
}
const BookPrefsSchema = IsarGeneratedSchema(
schema: IsarSchema(
name: 'BookPrefs',
idName: 'libItemId',
embedded: false,
properties: [
IsarPropertySchema(
name: 'speed',
type: IsarType.double,
),
],
indexes: [],
),
converter: IsarObjectConverter<int, BookPrefs>(
serialize: serializeBookPrefs,
deserialize: deserializeBookPrefs,
deserializeProperty: deserializeBookPrefsProp,
),
embeddedSchemas: [],
);
@isarProtected
int serializeBookPrefs(IsarWriter writer, BookPrefs object) {
IsarCore.writeDouble(writer, 1, object.speed ?? double.nan);
return object.libItemId;
}
@isarProtected
BookPrefs deserializeBookPrefs(IsarReader reader) {
final int _libItemId;
_libItemId = IsarCore.readId(reader);
final double? _speed;
{
final value = IsarCore.readDouble(reader, 1);
if (value.isNaN) {
_speed = null;
} else {
_speed = value;
}
}
final object = BookPrefs(
libItemId: _libItemId,
speed: _speed,
);
return object;
}
@isarProtected
dynamic deserializeBookPrefsProp(IsarReader reader, int property) {
switch (property) {
case 0:
return IsarCore.readId(reader);
case 1:
{
final value = IsarCore.readDouble(reader, 1);
if (value.isNaN) {
return null;
} else {
return value;
}
}
default:
throw ArgumentError('Unknown property: $property');
}
}
sealed class _BookPrefsUpdate {
bool call({
required int libItemId,
double? speed,
});
}
class _BookPrefsUpdateImpl implements _BookPrefsUpdate {
const _BookPrefsUpdateImpl(this.collection);
final IsarCollection<int, BookPrefs> collection;
@override
bool call({
required int libItemId,
Object? speed = ignore,
}) {
return collection.updateProperties([
libItemId
], {
if (speed != ignore) 1: speed as double?,
}) >
0;
}
}
sealed class _BookPrefsUpdateAll {
int call({
required List<int> libItemId,
double? speed,
});
}
class _BookPrefsUpdateAllImpl implements _BookPrefsUpdateAll {
const _BookPrefsUpdateAllImpl(this.collection);
final IsarCollection<int, BookPrefs> collection;
@override
int call({
required List<int> libItemId,
Object? speed = ignore,
}) {
return collection.updateProperties(libItemId, {
if (speed != ignore) 1: speed as double?,
});
}
}
extension BookPrefsUpdate on IsarCollection<int, BookPrefs> {
_BookPrefsUpdate get update => _BookPrefsUpdateImpl(this);
_BookPrefsUpdateAll get updateAll => _BookPrefsUpdateAllImpl(this);
}
sealed class _BookPrefsQueryUpdate {
int call({
double? speed,
});
}
class _BookPrefsQueryUpdateImpl implements _BookPrefsQueryUpdate {
const _BookPrefsQueryUpdateImpl(this.query, {this.limit});
final IsarQuery<BookPrefs> query;
final int? limit;
@override
int call({
Object? speed = ignore,
}) {
return query.updateProperties(limit: limit, {
if (speed != ignore) 1: speed as double?,
});
}
}
extension BookPrefsQueryUpdate on IsarQuery<BookPrefs> {
_BookPrefsQueryUpdate get updateFirst =>
_BookPrefsQueryUpdateImpl(this, limit: 1);
_BookPrefsQueryUpdate get updateAll => _BookPrefsQueryUpdateImpl(this);
}
class _BookPrefsQueryBuilderUpdateImpl implements _BookPrefsQueryUpdate {
const _BookPrefsQueryBuilderUpdateImpl(this.query, {this.limit});
final QueryBuilder<BookPrefs, BookPrefs, QOperations> query;
final int? limit;
@override
int call({
Object? speed = ignore,
}) {
final q = query.build();
try {
return q.updateProperties(limit: limit, {
if (speed != ignore) 1: speed as double?,
});
} finally {
q.close();
}
}
}
extension BookPrefsQueryBuilderUpdate
on QueryBuilder<BookPrefs, BookPrefs, QOperations> {
_BookPrefsQueryUpdate get updateFirst =>
_BookPrefsQueryBuilderUpdateImpl(this, limit: 1);
_BookPrefsQueryUpdate get updateAll => _BookPrefsQueryBuilderUpdateImpl(this);
}
extension BookPrefsQueryFilter
on QueryBuilder<BookPrefs, BookPrefs, QFilterCondition> {
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> libItemIdEqualTo(
int value,
) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(
EqualCondition(
property: 0,
value: value,
),
);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition>
libItemIdGreaterThan(
int value,
) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(
GreaterCondition(
property: 0,
value: value,
),
);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition>
libItemIdGreaterThanOrEqualTo(
int value,
) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(
GreaterOrEqualCondition(
property: 0,
value: value,
),
);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> libItemIdLessThan(
int value,
) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(
LessCondition(
property: 0,
value: value,
),
);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition>
libItemIdLessThanOrEqualTo(
int value,
) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(
LessOrEqualCondition(
property: 0,
value: value,
),
);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> libItemIdBetween(
int lower,
int upper,
) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(
BetweenCondition(
property: 0,
lower: lower,
upper: upper,
),
);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> speedIsNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const IsNullCondition(property: 1));
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> speedIsNotNull() {
return QueryBuilder.apply(not(), (query) {
return query.addFilterCondition(const IsNullCondition(property: 1));
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> speedEqualTo(
double? value, {
double epsilon = Filter.epsilon,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(
EqualCondition(
property: 1,
value: value,
epsilon: epsilon,
),
);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> speedGreaterThan(
double? value, {
double epsilon = Filter.epsilon,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(
GreaterCondition(
property: 1,
value: value,
epsilon: epsilon,
),
);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition>
speedGreaterThanOrEqualTo(
double? value, {
double epsilon = Filter.epsilon,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(
GreaterOrEqualCondition(
property: 1,
value: value,
epsilon: epsilon,
),
);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> speedLessThan(
double? value, {
double epsilon = Filter.epsilon,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(
LessCondition(
property: 1,
value: value,
epsilon: epsilon,
),
);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition>
speedLessThanOrEqualTo(
double? value, {
double epsilon = Filter.epsilon,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(
LessOrEqualCondition(
property: 1,
value: value,
epsilon: epsilon,
),
);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> speedBetween(
double? lower,
double? upper, {
double epsilon = Filter.epsilon,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(
BetweenCondition(
property: 1,
lower: lower,
upper: upper,
epsilon: epsilon,
),
);
});
}
}
extension BookPrefsQueryObject
on QueryBuilder<BookPrefs, BookPrefs, QFilterCondition> {}
extension BookPrefsQuerySortBy on QueryBuilder<BookPrefs, BookPrefs, QSortBy> {
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> sortByLibItemId() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(0);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> sortByLibItemIdDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(0, sort: Sort.desc);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> sortBySpeed() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(1);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> sortBySpeedDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(1, sort: Sort.desc);
});
}
}
extension BookPrefsQuerySortThenBy
on QueryBuilder<BookPrefs, BookPrefs, QSortThenBy> {
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> thenByLibItemId() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(0);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> thenByLibItemIdDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(0, sort: Sort.desc);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> thenBySpeed() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(1);
});
}
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> thenBySpeedDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(1, sort: Sort.desc);
});
}
}
extension BookPrefsQueryWhereDistinct
on QueryBuilder<BookPrefs, BookPrefs, QDistinct> {
QueryBuilder<BookPrefs, BookPrefs, QAfterDistinct> distinctBySpeed() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(1);
});
}
}
extension BookPrefsQueryProperty1
on QueryBuilder<BookPrefs, BookPrefs, QProperty> {
QueryBuilder<BookPrefs, int, QAfterProperty> libItemIdProperty() {
return QueryBuilder.apply(this, (query) {
return query.addProperty(0);
});
}
QueryBuilder<BookPrefs, double?, QAfterProperty> speedProperty() {
return QueryBuilder.apply(this, (query) {
return query.addProperty(1);
});
}
}
extension BookPrefsQueryProperty2<R>
on QueryBuilder<BookPrefs, R, QAfterProperty> {
QueryBuilder<BookPrefs, (R, int), QAfterProperty> libItemIdProperty() {
return QueryBuilder.apply(this, (query) {
return query.addProperty(0);
});
}
QueryBuilder<BookPrefs, (R, double?), QAfterProperty> speedProperty() {
return QueryBuilder.apply(this, (query) {
return query.addProperty(1);
});
}
}
extension BookPrefsQueryProperty3<R1, R2>
on QueryBuilder<BookPrefs, (R1, R2), QAfterProperty> {
QueryBuilder<BookPrefs, (R1, R2, int), QOperations> libItemIdProperty() {
return QueryBuilder.apply(this, (query) {
return query.addProperty(0);
});
}
QueryBuilder<BookPrefs, (R1, R2, double?), QOperations> speedProperty() {
return QueryBuilder.apply(this, (query) {
return query.addProperty(1);
});
}
}

View file

@ -1,31 +1,92 @@
import 'package:hive/hive.dart'; import 'dart:convert';
import 'package:hive_ce/hive.dart';
import 'package:vaani/features/per_book_settings/models/book_settings.dart'; import 'package:vaani/features/per_book_settings/models/book_settings.dart';
import 'package:vaani/features/settings/models/models.dart'; import 'package:vaani/features/settings/models/models.dart';
// register all models to Hive for serialization // register all models to Hive for serialization
Future registerModels() async { Future registerModels() async {
Hive.registerAdapter<AppSettings>( Hive.registerAdapter(
'AppSettings', JsonAdapter<AppSettings>(
((json) => AppSettings.fromJson(json)), id: 1,
fromJson: AppSettings.fromJson,
),
); );
Hive.registerAdapter<ApiSettings>( Hive.registerAdapter(
'ApiSettings', JsonAdapter<ApiSettings>(
((json) => ApiSettings.fromJson(json)), id: 2,
fromJson: ApiSettings.fromJson,
),
); );
Hive.registerAdapter<AudiobookShelfServer>( Hive.registerAdapter(
'AudiobookShelfServer', JsonAdapter<AudiobookShelfServer>(
((json) => AudiobookShelfServer.fromJson(json)), id: 3,
fromJson: AudiobookShelfServer.fromJson,
),
); );
Hive.registerAdapter<AuthenticatedUser>( Hive.registerAdapter(
'AuthenticatedUser', JsonAdapter<AuthenticatedUser>(
((json) => AuthenticatedUser.fromJson(json)), id: 4,
fromJson: AuthenticatedUser.fromJson,
),
); );
Hive.registerAdapter<BookSettings>( Hive.registerAdapter(
'BookSettings', JsonAdapter<BookSettings>(
((json) => BookSettings.fromJson(json)), id: 5,
); fromJson: BookSettings.fromJson,
Hive.registerAdapter<BookSettings>( ),
'_\$BookSettingsImpl', // hack because of freezed
((json) => BookSettings.fromJson(json)),
); );
} }
/// JSON Adapter
class JsonAdapter<T> extends TypeAdapter<T> {
final T Function(Map<String, dynamic>) fromJson;
final int id;
const JsonAdapter({
required this.id,
required this.fromJson,
});
@override
int get typeId => id;
@override
T read(BinaryReader reader) {
final jsonString = reader.readString();
final jsonMap = jsonDecode(jsonString);
return fromJson(jsonMap);
}
@override
void write(BinaryWriter writer, T obj) {
writer.writeString(jsonEncode(obj));
}
}
// Future registerModels() async {
// Hive.registerAdapter<AppSettings>(
// 'AppSettings',
// ((json) => AppSettings.fromJson(json)),
// );
// Hive.registerAdapter<ApiSettings>(
// 'ApiSettings',
// ((json) => ApiSettings.fromJson(json)),
// );
// Hive.registerAdapter<AudiobookShelfServer>(
// 'AudiobookShelfServer',
// ((json) => AudiobookShelfServer.fromJson(json)),
// );
// Hive.registerAdapter<AuthenticatedUser>(
// 'AuthenticatedUser',
// ((json) => AuthenticatedUser.fromJson(json)),
// );
// Hive.registerAdapter<BookSettings>(
// 'BookSettings',
// ((json) => BookSettings.fromJson(json)),
// );
// Hive.registerAdapter<BookSettings>(
// '_\$BookSettingsImpl', // hack because of freezed
// ((json) => BookSettings.fromJson(json)),
// );
// }

View file

@ -2,7 +2,7 @@ import 'package:flutter/foundation.dart';
import 'package:logging/logging.dart'; import 'package:logging/logging.dart';
import 'package:logging_appenders/logging_appenders.dart'; import 'package:logging_appenders/logging_appenders.dart';
import 'package:vaani/globals.dart'; import 'package:vaani/globals.dart';
import 'package:vaani/shared/extensions/duration_format.dart'; // import 'package:vaani/shared/extensions/duration_format.dart';
Future<String> getLoggingFilePath() async { Future<String> getLoggingFilePath() async {
// final Directory directory = await getApplicationDocumentsDirectory(); // final Directory directory = await getApplicationDocumentsDirectory();
@ -24,11 +24,11 @@ Future<void> initLogging() async {
baseFilePath: await getLoggingFilePath(), baseFilePath: await getLoggingFilePath(),
formatter: formatter, formatter: formatter,
).attachToLogger(Logger.root); ).attachToLogger(Logger.root);
Logger.root.onRecord.listen((record) { // Logger.root.onRecord.listen((record) {
// Print log records to the console // // Print log records to the console
debugPrint( // debugPrint(
'${record.loggerName}: ${record.level.name}: ${record.time.time}: ${record.message}', // '${record.loggerName}: ${record.level.name}: ${record.time.time}: ${record.message}',
); // );
}); // });
} }
} }

View file

@ -0,0 +1,45 @@
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:logging/logging.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:shelfsdk/audiobookshelf_api.dart';
import 'package:vaani/api/api_provider.dart';
import 'package:vaani/globals.dart';
import 'package:vaani/shared/extensions/model_conversions.dart';
part 'player_new.g.dart';
final _logger = Logger('player');
@Riverpod(keepAlive: true)
Future<PlaybackSessionExpanded> playback(Ref ref, String id) async {
final api = ref.watch(authenticatedApiProvider);
try {
final session = await api.items.play(
libraryItemId: id,
parameters: PlayItemReqParams(
deviceInfo: DeviceInfoReqParams(
clientVersion: appVersion,
manufacturer: deviceManufacturer,
model: deviceModel,
sdkVersion: deviceSdkVersion,
clientName: appName,
deviceName: deviceName,
),
forceDirectPlay: false,
forceTranscode: false,
supportedMimeTypes: [
"audio/flac",
"audio/mpeg",
"audio/mp4",
"audio/ogg",
"audio/aac",
"audio/webm",
],
),
);
return session!.asExpanded;
} catch (e) {
_logger.severe('Error starting session: $e');
throw StateError('Error starting session');
}
}

View file

@ -0,0 +1,159 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'player_new.dart';
// **************************************************************************
// RiverpodGenerator
// **************************************************************************
String _$playbackHash() => r'd4f270f9c46d6a52b186bc7271d584f28a5547f5';
/// Copied from Dart SDK
class _SystemHash {
_SystemHash._();
static int combine(int hash, int value) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + value);
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
return hash ^ (hash >> 6);
}
static int finish(int hash) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
// ignore: parameter_assignments
hash = hash ^ (hash >> 11);
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
}
}
/// See also [playback].
@ProviderFor(playback)
const playbackProvider = PlaybackFamily();
/// See also [playback].
class PlaybackFamily extends Family<AsyncValue<PlaybackSessionExpanded>> {
/// See also [playback].
const PlaybackFamily();
/// See also [playback].
PlaybackProvider call(
String id,
) {
return PlaybackProvider(
id,
);
}
@override
PlaybackProvider getProviderOverride(
covariant PlaybackProvider provider,
) {
return call(
provider.id,
);
}
static const Iterable<ProviderOrFamily>? _dependencies = null;
@override
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
@override
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
_allTransitiveDependencies;
@override
String? get name => r'playbackProvider';
}
/// See also [playback].
class PlaybackProvider extends FutureProvider<PlaybackSessionExpanded> {
/// See also [playback].
PlaybackProvider(
String id,
) : this._internal(
(ref) => playback(
ref as PlaybackRef,
id,
),
from: playbackProvider,
name: r'playbackProvider',
debugGetCreateSourceHash:
const bool.fromEnvironment('dart.vm.product')
? null
: _$playbackHash,
dependencies: PlaybackFamily._dependencies,
allTransitiveDependencies: PlaybackFamily._allTransitiveDependencies,
id: id,
);
PlaybackProvider._internal(
super._createNotifier, {
required super.name,
required super.dependencies,
required super.allTransitiveDependencies,
required super.debugGetCreateSourceHash,
required super.from,
required this.id,
}) : super.internal();
final String id;
@override
Override overrideWith(
FutureOr<PlaybackSessionExpanded> Function(PlaybackRef provider) create,
) {
return ProviderOverride(
origin: this,
override: PlaybackProvider._internal(
(ref) => create(ref as PlaybackRef),
from: from,
name: null,
dependencies: null,
allTransitiveDependencies: null,
debugGetCreateSourceHash: null,
id: id,
),
);
}
@override
FutureProviderElement<PlaybackSessionExpanded> createElement() {
return _PlaybackProviderElement(this);
}
@override
bool operator ==(Object other) {
return other is PlaybackProvider && other.id == id;
}
@override
int get hashCode {
var hash = _SystemHash.combine(0, runtimeType.hashCode);
hash = _SystemHash.combine(hash, id.hashCode);
return _SystemHash.finish(hash);
}
}
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
mixin PlaybackRef on FutureProviderRef<PlaybackSessionExpanded> {
/// The parameter `id` of this provider.
String get id;
}
class _PlaybackProviderElement
extends FutureProviderElement<PlaybackSessionExpanded> with PlaybackRef {
_PlaybackProviderElement(super.provider);
@override
String get id => (origin as PlaybackProvider).id;
}
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

View file

@ -30,12 +30,12 @@ class ApiSettings extends _$ApiSettings {
var foundSettings = _box.getAt(0); var foundSettings = _box.getAt(0);
// foundSettings.activeServer ??= foundSettings.activeUser?.server; // foundSettings.activeServer ??= foundSettings.activeUser?.server;
// foundSettings =foundSettings.copyWith(activeServer: foundSettings.activeUser?.server); // foundSettings =foundSettings.copyWith(activeServer: foundSettings.activeUser?.server);
if (foundSettings.activeServer == null) { if (foundSettings?.activeServer == null) {
foundSettings = foundSettings.copyWith( foundSettings = foundSettings!.copyWith(
activeServer: foundSettings.activeUser?.server, activeServer: foundSettings.activeUser?.server,
); );
} }
_logger.fine('found api settings in box: ${foundSettings.obfuscate()}'); _logger.fine('found api settings in box: ${foundSettings!.obfuscate()}');
return foundSettings; return foundSettings;
} else { } else {
// create a new settings object // create a new settings object

View file

@ -6,7 +6,7 @@ part of 'api_settings_provider.dart';
// RiverpodGenerator // RiverpodGenerator
// ************************************************************************** // **************************************************************************
String _$apiSettingsHash() => r'5bc1e16e9d72b77fb10637aabadf08e8947da580'; String _$apiSettingsHash() => r'd7aff154cb65b0396df3ccfe25c59dedb56226fa';
/// See also [ApiSettings]. /// See also [ApiSettings].
@ProviderFor(ApiSettings) @ProviderFor(ApiSettings)

View file

@ -34,7 +34,7 @@ class AppSettings extends _$AppSettings {
@override @override
model.AppSettings build() { model.AppSettings build() {
state = loadOrCreateAppSettings(); state = loadOrCreateAppSettings();
ref.listenSelf((_, __) { listenSelf((_, __) {
writeToBox(); writeToBox();
}); });
return state; return state;

View file

@ -6,7 +6,7 @@ part of 'app_settings_provider.dart';
// RiverpodGenerator // RiverpodGenerator
// ************************************************************************** // **************************************************************************
String _$appSettingsHash() => r'314d7936f54550f57d308056a99230402342a6d0'; String _$appSettingsHash() => r'744d7e0157eb3b089c4187b35b845fc78547a44e';
/// See also [AppSettings]. /// See also [AppSettings].
@ProviderFor(AppSettings) @ProviderFor(AppSettings)

View file

@ -3,7 +3,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:vaani/features/downloads/providers/download_manager.dart'; import 'package:vaani/features/downloads/providers/download_manager.dart';
import 'package:vaani/features/playback_reporting/providers/playback_reporter_provider.dart'; import 'package:vaani/features/playback_reporting/providers/playback_reporter_provider.dart';
import 'package:vaani/features/shake_detector/shake_detector_provider.dart'; import 'package:vaani/features/shake_detector/shake_detector_provider.dart';
import 'package:vaani/features/skip_start_end/providers/skip_start_end_provider.dart';
import 'package:vaani/features/sleep_timer/providers/sleep_timer_provider.dart'; import 'package:vaani/features/sleep_timer/providers/sleep_timer_provider.dart';
import 'package:vaani/globals.dart'; import 'package:vaani/globals.dart';
import 'package:vaani/shared/utils/helper.dart'; import 'package:vaani/shared/utils/helper.dart';
@ -24,7 +23,7 @@ class Framework extends ConsumerWidget {
// ref.watch(skipStartEndProvider); // ref.watch(skipStartEndProvider);
ref.watch(playbackReporterProvider); ref.watch(playbackReporterProvider);
} catch (e) { } catch (e) {
debugPrintStack(stackTrace: StackTrace.current, label: e.toString()); // debugPrintStack(stackTrace: StackTrace.current, label: e.toString());
appLogger.severe(e.toString()); appLogger.severe(e.toString());
} }
if (Helper.isDesktop()) return TrayManager(child); if (Helper.isDesktop()) return TrayManager(child);

View file

@ -54,8 +54,10 @@ class MessageLookup extends MessageLookupByLibrary {
"accountDeleteServer": MessageLookupByLibrary.simpleMessage( "accountDeleteServer": MessageLookupByLibrary.simpleMessage(
"Delete Server", "Delete Server",
), ),
"accountInvalidURL": MessageLookupByLibrary.simpleMessage("Invalid URL"), "accountInvalidURL":
"accountManage": MessageLookupByLibrary.simpleMessage("Manage Accounts"), MessageLookupByLibrary.simpleMessage("Invalid URL"),
"accountManage":
MessageLookupByLibrary.simpleMessage("Manage Accounts"),
"accountRegisteredServers": MessageLookupByLibrary.simpleMessage( "accountRegisteredServers": MessageLookupByLibrary.simpleMessage(
"Registered Servers", "Registered Servers",
), ),
@ -94,7 +96,8 @@ class MessageLookup extends MessageLookupByLibrary {
"autoTurnOnTimerAlways": MessageLookupByLibrary.simpleMessage( "autoTurnOnTimerAlways": MessageLookupByLibrary.simpleMessage(
"Always Auto Turn On Timer", "Always Auto Turn On Timer",
), ),
"autoTurnOnTimerAlwaysDescription": MessageLookupByLibrary.simpleMessage( "autoTurnOnTimerAlwaysDescription":
MessageLookupByLibrary.simpleMessage(
"Always turn on the sleep timer, no matter what", "Always turn on the sleep timer, no matter what",
), ),
"autoTurnOnTimerDescription": MessageLookupByLibrary.simpleMessage( "autoTurnOnTimerDescription": MessageLookupByLibrary.simpleMessage(
@ -122,9 +125,11 @@ class MessageLookup extends MessageLookupByLibrary {
"bookAuthors": MessageLookupByLibrary.simpleMessage("Authors"), "bookAuthors": MessageLookupByLibrary.simpleMessage("Authors"),
"bookDownloads": MessageLookupByLibrary.simpleMessage("Downloads"), "bookDownloads": MessageLookupByLibrary.simpleMessage("Downloads"),
"bookGenres": MessageLookupByLibrary.simpleMessage("Genres"), "bookGenres": MessageLookupByLibrary.simpleMessage("Genres"),
"bookMetadataAbridged": MessageLookupByLibrary.simpleMessage("Abridged"), "bookMetadataAbridged":
MessageLookupByLibrary.simpleMessage("Abridged"),
"bookMetadataLength": MessageLookupByLibrary.simpleMessage("Length"), "bookMetadataLength": MessageLookupByLibrary.simpleMessage("Length"),
"bookMetadataPublished": MessageLookupByLibrary.simpleMessage("Published"), "bookMetadataPublished":
MessageLookupByLibrary.simpleMessage("Published"),
"bookMetadataUnabridged": MessageLookupByLibrary.simpleMessage( "bookMetadataUnabridged": MessageLookupByLibrary.simpleMessage(
"Unabridged", "Unabridged",
), ),
@ -178,11 +183,13 @@ class MessageLookup extends MessageLookupByLibrary {
"homeBookContinueSeries": MessageLookupByLibrary.simpleMessage( "homeBookContinueSeries": MessageLookupByLibrary.simpleMessage(
"Continue Series", "Continue Series",
), ),
"homeBookContinueSeriesDescription": MessageLookupByLibrary.simpleMessage( "homeBookContinueSeriesDescription":
MessageLookupByLibrary.simpleMessage(
"Show play button for books in continue series shelf", "Show play button for books in continue series shelf",
), ),
"homeBookDiscover": MessageLookupByLibrary.simpleMessage("Discover"), "homeBookDiscover": MessageLookupByLibrary.simpleMessage("Discover"),
"homeBookListenAgain": MessageLookupByLibrary.simpleMessage("Listen Again"), "homeBookListenAgain":
MessageLookupByLibrary.simpleMessage("Listen Again"),
"homeBookListenAgainDescription": MessageLookupByLibrary.simpleMessage( "homeBookListenAgainDescription": MessageLookupByLibrary.simpleMessage(
"Show play button for all books in listen again shelf", "Show play button for all books in listen again shelf",
), ),
@ -192,7 +199,8 @@ class MessageLookup extends MessageLookupByLibrary {
"homeBookRecentlyAdded": MessageLookupByLibrary.simpleMessage( "homeBookRecentlyAdded": MessageLookupByLibrary.simpleMessage(
"Recently Added", "Recently Added",
), ),
"homeBookRecommended": MessageLookupByLibrary.simpleMessage("Recommended"), "homeBookRecommended":
MessageLookupByLibrary.simpleMessage("Recommended"),
"homeContinueListening": MessageLookupByLibrary.simpleMessage( "homeContinueListening": MessageLookupByLibrary.simpleMessage(
"Continue Listening", "Continue Listening",
), ),
@ -265,7 +273,8 @@ class MessageLookup extends MessageLookupByLibrary {
"nmpSettingsMediaControls": MessageLookupByLibrary.simpleMessage( "nmpSettingsMediaControls": MessageLookupByLibrary.simpleMessage(
"Media Controls", "Media Controls",
), ),
"nmpSettingsMediaControlsDescription": MessageLookupByLibrary.simpleMessage( "nmpSettingsMediaControlsDescription":
MessageLookupByLibrary.simpleMessage(
"Select the media controls to display", "Select the media controls to display",
), ),
"nmpSettingsSelectOne": MessageLookupByLibrary.simpleMessage( "nmpSettingsSelectOne": MessageLookupByLibrary.simpleMessage(
@ -284,27 +293,32 @@ class MessageLookup extends MessageLookupByLibrary {
"nmpSettingsSubTitleDescription": MessageLookupByLibrary.simpleMessage( "nmpSettingsSubTitleDescription": MessageLookupByLibrary.simpleMessage(
"The subtitle of the notification\n", "The subtitle of the notification\n",
), ),
"nmpSettingsTitle": MessageLookupByLibrary.simpleMessage("Primary Title"), "nmpSettingsTitle":
MessageLookupByLibrary.simpleMessage("Primary Title"),
"nmpSettingsTitleDescription": MessageLookupByLibrary.simpleMessage( "nmpSettingsTitleDescription": MessageLookupByLibrary.simpleMessage(
"The title of the notification\n", "The title of the notification\n",
), ),
"no": MessageLookupByLibrary.simpleMessage("No"), "no": MessageLookupByLibrary.simpleMessage("No"),
"notImplemented": MessageLookupByLibrary.simpleMessage("Not implemented"), "notImplemented":
MessageLookupByLibrary.simpleMessage("Not implemented"),
"notificationMediaPlayer": MessageLookupByLibrary.simpleMessage( "notificationMediaPlayer": MessageLookupByLibrary.simpleMessage(
"Notification Media Player", "Notification Media Player",
), ),
"notificationMediaPlayerDescription": MessageLookupByLibrary.simpleMessage( "notificationMediaPlayerDescription":
MessageLookupByLibrary.simpleMessage(
"Customize the media player in notifications", "Customize the media player in notifications",
), ),
"ok": MessageLookupByLibrary.simpleMessage("OK"), "ok": MessageLookupByLibrary.simpleMessage("OK"),
"pause": MessageLookupByLibrary.simpleMessage("Pause"), "pause": MessageLookupByLibrary.simpleMessage("Pause"),
"play": MessageLookupByLibrary.simpleMessage("Play"), "play": MessageLookupByLibrary.simpleMessage("Play"),
"playerSettings": MessageLookupByLibrary.simpleMessage("Player Settings"), "playerSettings":
MessageLookupByLibrary.simpleMessage("Player Settings"),
"playerSettingsCompleteTime": MessageLookupByLibrary.simpleMessage( "playerSettingsCompleteTime": MessageLookupByLibrary.simpleMessage(
"Mark Complete When Time Left", "Mark Complete When Time Left",
), ),
"playerSettingsCompleteTimeDescriptionHead": "playerSettingsCompleteTimeDescriptionHead":
MessageLookupByLibrary.simpleMessage("Mark complete when less than "), MessageLookupByLibrary.simpleMessage(
"Mark complete when less than "),
"playerSettingsCompleteTimeDescriptionTail": "playerSettingsCompleteTimeDescriptionTail":
MessageLookupByLibrary.simpleMessage(" left in the book"), MessageLookupByLibrary.simpleMessage(" left in the book"),
"playerSettingsDescription": MessageLookupByLibrary.simpleMessage( "playerSettingsDescription": MessageLookupByLibrary.simpleMessage(
@ -319,7 +333,8 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage(
"Show the progress of the current chapter in the player", "Show the progress of the current chapter in the player",
), ),
"playerSettingsDisplayTotalProgress": MessageLookupByLibrary.simpleMessage( "playerSettingsDisplayTotalProgress":
MessageLookupByLibrary.simpleMessage(
"Show Total Progress", "Show Total Progress",
), ),
"playerSettingsDisplayTotalProgressDescription": "playerSettingsDisplayTotalProgressDescription":
@ -348,7 +363,8 @@ class MessageLookup extends MessageLookupByLibrary {
), ),
"playerSettingsPlaybackReportingMinimumDescriptionTail": "playerSettingsPlaybackReportingMinimumDescriptionTail":
MessageLookupByLibrary.simpleMessage("of the book"), MessageLookupByLibrary.simpleMessage("of the book"),
"playerSettingsRememberForEveryBook": MessageLookupByLibrary.simpleMessage( "playerSettingsRememberForEveryBook":
MessageLookupByLibrary.simpleMessage(
"Remember Player Settings for Every Book", "Remember Player Settings for Every Book",
), ),
"playerSettingsRememberForEveryBookDescription": "playerSettingsRememberForEveryBookDescription":
@ -362,14 +378,17 @@ class MessageLookup extends MessageLookupByLibrary {
"playerSettingsSpeedOptions": MessageLookupByLibrary.simpleMessage( "playerSettingsSpeedOptions": MessageLookupByLibrary.simpleMessage(
"Speed Options", "Speed Options",
), ),
"playerSettingsSpeedOptionsSelect": MessageLookupByLibrary.simpleMessage( "playerSettingsSpeedOptionsSelect":
MessageLookupByLibrary.simpleMessage(
"Select Speed Options", "Select Speed Options",
), ),
"playerSettingsSpeedOptionsSelectAdd": MessageLookupByLibrary.simpleMessage( "playerSettingsSpeedOptionsSelectAdd":
MessageLookupByLibrary.simpleMessage(
"Add Speed Option", "Add Speed Option",
), ),
"playerSettingsSpeedOptionsSelectAddHelper": "playerSettingsSpeedOptionsSelectAddHelper":
MessageLookupByLibrary.simpleMessage("Enter a new speed option to add"), MessageLookupByLibrary.simpleMessage(
"Enter a new speed option to add"),
"playerSettingsSpeedSelect": MessageLookupByLibrary.simpleMessage( "playerSettingsSpeedSelect": MessageLookupByLibrary.simpleMessage(
"Select Speed", "Select Speed",
), ),
@ -417,7 +436,8 @@ class MessageLookup extends MessageLookupByLibrary {
"shakeActivationThreshold": MessageLookupByLibrary.simpleMessage( "shakeActivationThreshold": MessageLookupByLibrary.simpleMessage(
"Shake Activation Threshold", "Shake Activation Threshold",
), ),
"shakeActivationThresholdDescription": MessageLookupByLibrary.simpleMessage( "shakeActivationThresholdDescription":
MessageLookupByLibrary.simpleMessage(
"The higher the threshold, the harder you need to shake", "The higher the threshold, the harder you need to shake",
), ),
"shakeDetector": MessageLookupByLibrary.simpleMessage("Shake Detector"), "shakeDetector": MessageLookupByLibrary.simpleMessage("Shake Detector"),
@ -455,7 +475,8 @@ class MessageLookup extends MessageLookupByLibrary {
"themeModeHighContrast": MessageLookupByLibrary.simpleMessage( "themeModeHighContrast": MessageLookupByLibrary.simpleMessage(
"High Contrast Mode", "High Contrast Mode",
), ),
"themeModeHighContrastDescription": MessageLookupByLibrary.simpleMessage( "themeModeHighContrastDescription":
MessageLookupByLibrary.simpleMessage(
"Increase the contrast between the background and the text", "Increase the contrast between the background and the text",
), ),
"themeModeLight": MessageLookupByLibrary.simpleMessage("Light"), "themeModeLight": MessageLookupByLibrary.simpleMessage("Light"),
@ -470,7 +491,8 @@ class MessageLookup extends MessageLookupByLibrary {
"themeSettingsColorsBook": MessageLookupByLibrary.simpleMessage( "themeSettingsColorsBook": MessageLookupByLibrary.simpleMessage(
"Adaptive Theme on Item Page", "Adaptive Theme on Item Page",
), ),
"themeSettingsColorsBookDescription": MessageLookupByLibrary.simpleMessage( "themeSettingsColorsBookDescription":
MessageLookupByLibrary.simpleMessage(
"Get fancy with the colors on the item page at the cost of some performance", "Get fancy with the colors on the item page at the cost of some performance",
), ),
"themeSettingsColorsCurrent": MessageLookupByLibrary.simpleMessage( "themeSettingsColorsCurrent": MessageLookupByLibrary.simpleMessage(

View file

@ -50,7 +50,8 @@ class MessageLookup extends MessageLookupByLibrary {
"accountDeleteServer": MessageLookupByLibrary.simpleMessage("删除服务器"), "accountDeleteServer": MessageLookupByLibrary.simpleMessage("删除服务器"),
"accountInvalidURL": MessageLookupByLibrary.simpleMessage("无效网址"), "accountInvalidURL": MessageLookupByLibrary.simpleMessage("无效网址"),
"accountManage": MessageLookupByLibrary.simpleMessage("帐户管理"), "accountManage": MessageLookupByLibrary.simpleMessage("帐户管理"),
"accountRegisteredServers": MessageLookupByLibrary.simpleMessage("已注册服务器"), "accountRegisteredServers":
MessageLookupByLibrary.simpleMessage("已注册服务器"),
"accountRemoveServerAndUsers": MessageLookupByLibrary.simpleMessage( "accountRemoveServerAndUsers": MessageLookupByLibrary.simpleMessage(
"删除服务器和用户", "删除服务器和用户",
), ),
@ -60,7 +61,8 @@ class MessageLookup extends MessageLookupByLibrary {
"accountRemoveServerAndUsersTail": MessageLookupByLibrary.simpleMessage( "accountRemoveServerAndUsersTail": MessageLookupByLibrary.simpleMessage(
" 以及该应用程序中所有用户的登录信息。", " 以及该应用程序中所有用户的登录信息。",
), ),
"accountRemoveUserLogin": MessageLookupByLibrary.simpleMessage("删除用户登录"), "accountRemoveUserLogin":
MessageLookupByLibrary.simpleMessage("删除用户登录"),
"accountRemoveUserLoginHead": MessageLookupByLibrary.simpleMessage( "accountRemoveUserLoginHead": MessageLookupByLibrary.simpleMessage(
"这将删除用户 ", "这将删除用户 ",
), ),
@ -72,11 +74,15 @@ class MessageLookup extends MessageLookupByLibrary {
"accountUsersCount": m1, "accountUsersCount": m1,
"appSettings": MessageLookupByLibrary.simpleMessage("应用设置"), "appSettings": MessageLookupByLibrary.simpleMessage("应用设置"),
"appearance": MessageLookupByLibrary.simpleMessage("外观"), "appearance": MessageLookupByLibrary.simpleMessage("外观"),
"autoSleepTimerSettings": MessageLookupByLibrary.simpleMessage("自动睡眠定时器设置"), "autoSleepTimerSettings":
"autoTurnOnSleepTimer": MessageLookupByLibrary.simpleMessage("自动开启睡眠定时器"), MessageLookupByLibrary.simpleMessage("自动睡眠定时器设置"),
"autoTurnOnSleepTimer":
MessageLookupByLibrary.simpleMessage("自动开启睡眠定时器"),
"autoTurnOnTimer": MessageLookupByLibrary.simpleMessage("自动开启定时器"), "autoTurnOnTimer": MessageLookupByLibrary.simpleMessage("自动开启定时器"),
"autoTurnOnTimerAlways": MessageLookupByLibrary.simpleMessage("始终自动开启定时器"), "autoTurnOnTimerAlways":
"autoTurnOnTimerAlwaysDescription": MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage("始终自动开启定时器"),
"autoTurnOnTimerAlwaysDescription":
MessageLookupByLibrary.simpleMessage(
"总是打开睡眠定时器", "总是打开睡眠定时器",
), ),
"autoTurnOnTimerDescription": MessageLookupByLibrary.simpleMessage( "autoTurnOnTimerDescription": MessageLookupByLibrary.simpleMessage(
@ -118,7 +124,8 @@ class MessageLookup extends MessageLookupByLibrary {
"copyToClipboardDescription": MessageLookupByLibrary.simpleMessage( "copyToClipboardDescription": MessageLookupByLibrary.simpleMessage(
"将应用程序设置复制到剪贴板", "将应用程序设置复制到剪贴板",
), ),
"copyToClipboardToast": MessageLookupByLibrary.simpleMessage("设置已复制到剪贴板"), "copyToClipboardToast":
MessageLookupByLibrary.simpleMessage("设置已复制到剪贴板"),
"delete": MessageLookupByLibrary.simpleMessage("删除"), "delete": MessageLookupByLibrary.simpleMessage("删除"),
"deleteDialog": m2, "deleteDialog": m2,
"deleted": m3, "deleted": m3,
@ -128,11 +135,13 @@ class MessageLookup extends MessageLookupByLibrary {
"general": MessageLookupByLibrary.simpleMessage("通用"), "general": MessageLookupByLibrary.simpleMessage("通用"),
"help": MessageLookupByLibrary.simpleMessage("Help"), "help": MessageLookupByLibrary.simpleMessage("Help"),
"home": MessageLookupByLibrary.simpleMessage("首页"), "home": MessageLookupByLibrary.simpleMessage("首页"),
"homeBookContinueListening": MessageLookupByLibrary.simpleMessage("继续收听"), "homeBookContinueListening":
MessageLookupByLibrary.simpleMessage("继续收听"),
"homeBookContinueListeningDescription": "homeBookContinueListeningDescription":
MessageLookupByLibrary.simpleMessage("继续收听书架上显示播放按钮"), MessageLookupByLibrary.simpleMessage("继续收听书架上显示播放按钮"),
"homeBookContinueSeries": MessageLookupByLibrary.simpleMessage("继续系列"), "homeBookContinueSeries": MessageLookupByLibrary.simpleMessage("继续系列"),
"homeBookContinueSeriesDescription": MessageLookupByLibrary.simpleMessage( "homeBookContinueSeriesDescription":
MessageLookupByLibrary.simpleMessage(
"继续系列书架上显示播放按钮", "继续系列书架上显示播放按钮",
), ),
"homeBookDiscover": MessageLookupByLibrary.simpleMessage("发现"), "homeBookDiscover": MessageLookupByLibrary.simpleMessage("发现"),
@ -154,7 +163,8 @@ class MessageLookup extends MessageLookupByLibrary {
), ),
"homePageSettingsOtherShelvesDescription": "homePageSettingsOtherShelvesDescription":
MessageLookupByLibrary.simpleMessage("显示所有剩余书架上所有书籍的播放按钮"), MessageLookupByLibrary.simpleMessage("显示所有剩余书架上所有书籍的播放按钮"),
"homePageSettingsQuickPlay": MessageLookupByLibrary.simpleMessage("继续播放"), "homePageSettingsQuickPlay":
MessageLookupByLibrary.simpleMessage("继续播放"),
"homeStartListening": MessageLookupByLibrary.simpleMessage("开始收听"), "homeStartListening": MessageLookupByLibrary.simpleMessage("开始收听"),
"language": MessageLookupByLibrary.simpleMessage("语言"), "language": MessageLookupByLibrary.simpleMessage("语言"),
"languageDescription": MessageLookupByLibrary.simpleMessage("语言切换"), "languageDescription": MessageLookupByLibrary.simpleMessage("语言切换"),
@ -171,7 +181,8 @@ class MessageLookup extends MessageLookupByLibrary {
"loginOpenID": MessageLookupByLibrary.simpleMessage("OpenID"), "loginOpenID": MessageLookupByLibrary.simpleMessage("OpenID"),
"loginPassword": MessageLookupByLibrary.simpleMessage("密码"), "loginPassword": MessageLookupByLibrary.simpleMessage("密码"),
"loginServerClick": MessageLookupByLibrary.simpleMessage("单击此处"), "loginServerClick": MessageLookupByLibrary.simpleMessage("单击此处"),
"loginServerConnected": MessageLookupByLibrary.simpleMessage("服务器已连接,请登录"), "loginServerConnected":
MessageLookupByLibrary.simpleMessage("服务器已连接,请登录"),
"loginServerNo": MessageLookupByLibrary.simpleMessage("没有服务器? "), "loginServerNo": MessageLookupByLibrary.simpleMessage("没有服务器? "),
"loginServerNoConnected": MessageLookupByLibrary.simpleMessage( "loginServerNoConnected": MessageLookupByLibrary.simpleMessage(
"请输入您的AudiobookShelf服务器的URL", "请输入您的AudiobookShelf服务器的URL",
@ -184,8 +195,10 @@ class MessageLookup extends MessageLookupByLibrary {
"logs": MessageLookupByLibrary.simpleMessage("日志"), "logs": MessageLookupByLibrary.simpleMessage("日志"),
"nmpSettingsBackward": MessageLookupByLibrary.simpleMessage("快退间隔"), "nmpSettingsBackward": MessageLookupByLibrary.simpleMessage("快退间隔"),
"nmpSettingsForward": MessageLookupByLibrary.simpleMessage("快进间隔"), "nmpSettingsForward": MessageLookupByLibrary.simpleMessage("快进间隔"),
"nmpSettingsMediaControls": MessageLookupByLibrary.simpleMessage("媒体控制"), "nmpSettingsMediaControls":
"nmpSettingsMediaControlsDescription": MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage("媒体控制"),
"nmpSettingsMediaControlsDescription":
MessageLookupByLibrary.simpleMessage(
"选择要显示的媒体控件", "选择要显示的媒体控件",
), ),
"nmpSettingsSelectOne": MessageLookupByLibrary.simpleMessage( "nmpSettingsSelectOne": MessageLookupByLibrary.simpleMessage(
@ -206,8 +219,10 @@ class MessageLookup extends MessageLookupByLibrary {
), ),
"no": MessageLookupByLibrary.simpleMessage(""), "no": MessageLookupByLibrary.simpleMessage(""),
"notImplemented": MessageLookupByLibrary.simpleMessage("未实现"), "notImplemented": MessageLookupByLibrary.simpleMessage("未实现"),
"notificationMediaPlayer": MessageLookupByLibrary.simpleMessage("通知媒体播放器"), "notificationMediaPlayer":
"notificationMediaPlayerDescription": MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage("通知媒体播放器"),
"notificationMediaPlayerDescription":
MessageLookupByLibrary.simpleMessage(
"在通知中自定义媒体播放器", "在通知中自定义媒体播放器",
), ),
"ok": MessageLookupByLibrary.simpleMessage("确定"), "ok": MessageLookupByLibrary.simpleMessage("确定"),
@ -229,7 +244,8 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("显示章节进度"), MessageLookupByLibrary.simpleMessage("显示章节进度"),
"playerSettingsDisplayChapterProgressDescription": "playerSettingsDisplayChapterProgressDescription":
MessageLookupByLibrary.simpleMessage("在播放器中显示当前章节的进度"), MessageLookupByLibrary.simpleMessage("在播放器中显示当前章节的进度"),
"playerSettingsDisplayTotalProgress": MessageLookupByLibrary.simpleMessage( "playerSettingsDisplayTotalProgress":
MessageLookupByLibrary.simpleMessage(
"显示总进度", "显示总进度",
), ),
"playerSettingsDisplayTotalProgressDescription": "playerSettingsDisplayTotalProgressDescription":
@ -252,7 +268,8 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("不要报告本书前 "), MessageLookupByLibrary.simpleMessage("不要报告本书前 "),
"playerSettingsPlaybackReportingMinimumDescriptionTail": "playerSettingsPlaybackReportingMinimumDescriptionTail":
MessageLookupByLibrary.simpleMessage(" 的播放"), MessageLookupByLibrary.simpleMessage(" 的播放"),
"playerSettingsRememberForEveryBook": MessageLookupByLibrary.simpleMessage( "playerSettingsRememberForEveryBook":
MessageLookupByLibrary.simpleMessage(
"记住每本书的播放器设置", "记住每本书的播放器设置",
), ),
"playerSettingsRememberForEveryBookDescription": "playerSettingsRememberForEveryBookDescription":
@ -264,15 +281,18 @@ class MessageLookup extends MessageLookupByLibrary {
"playerSettingsSpeedOptions": MessageLookupByLibrary.simpleMessage( "playerSettingsSpeedOptions": MessageLookupByLibrary.simpleMessage(
"播放速度选项", "播放速度选项",
), ),
"playerSettingsSpeedOptionsSelect": MessageLookupByLibrary.simpleMessage( "playerSettingsSpeedOptionsSelect":
MessageLookupByLibrary.simpleMessage(
"播放速度选项", "播放速度选项",
), ),
"playerSettingsSpeedOptionsSelectAdd": MessageLookupByLibrary.simpleMessage( "playerSettingsSpeedOptionsSelectAdd":
MessageLookupByLibrary.simpleMessage(
"添加一个速度选项", "添加一个速度选项",
), ),
"playerSettingsSpeedOptionsSelectAddHelper": "playerSettingsSpeedOptionsSelectAddHelper":
MessageLookupByLibrary.simpleMessage("输入一个新的速度选项"), MessageLookupByLibrary.simpleMessage("输入一个新的速度选项"),
"playerSettingsSpeedSelect": MessageLookupByLibrary.simpleMessage("选择播放速度"), "playerSettingsSpeedSelect":
MessageLookupByLibrary.simpleMessage("选择播放速度"),
"playerSettingsSpeedSelectHelper": MessageLookupByLibrary.simpleMessage( "playerSettingsSpeedSelectHelper": MessageLookupByLibrary.simpleMessage(
"输入默认的播放速度", "输入默认的播放速度",
), ),
@ -293,8 +313,10 @@ class MessageLookup extends MessageLookupByLibrary {
"restoreBackupHint": MessageLookupByLibrary.simpleMessage("将备份粘贴到此处"), "restoreBackupHint": MessageLookupByLibrary.simpleMessage("将备份粘贴到此处"),
"restoreBackupInvalid": MessageLookupByLibrary.simpleMessage("无效备份"), "restoreBackupInvalid": MessageLookupByLibrary.simpleMessage("无效备份"),
"restoreBackupSuccess": MessageLookupByLibrary.simpleMessage("设置已恢复"), "restoreBackupSuccess": MessageLookupByLibrary.simpleMessage("设置已恢复"),
"restoreBackupValidator": MessageLookupByLibrary.simpleMessage("请将备份粘贴到此处"), "restoreBackupValidator":
"restoreDescription": MessageLookupByLibrary.simpleMessage("从备份中还原应用程序设置"), MessageLookupByLibrary.simpleMessage("请将备份粘贴到此处"),
"restoreDescription":
MessageLookupByLibrary.simpleMessage("从备份中还原应用程序设置"),
"resume": MessageLookupByLibrary.simpleMessage("继续"), "resume": MessageLookupByLibrary.simpleMessage("继续"),
"retry": MessageLookupByLibrary.simpleMessage("重试"), "retry": MessageLookupByLibrary.simpleMessage("重试"),
"settings": MessageLookupByLibrary.simpleMessage("设置"), "settings": MessageLookupByLibrary.simpleMessage("设置"),
@ -302,8 +324,10 @@ class MessageLookup extends MessageLookupByLibrary {
"shakeActionDescription": MessageLookupByLibrary.simpleMessage( "shakeActionDescription": MessageLookupByLibrary.simpleMessage(
"检测到抖动时要执行的操作", "检测到抖动时要执行的操作",
), ),
"shakeActivationThreshold": MessageLookupByLibrary.simpleMessage("抖动激活阈值"), "shakeActivationThreshold":
"shakeActivationThresholdDescription": MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage("抖动激活阈值"),
"shakeActivationThresholdDescription":
MessageLookupByLibrary.simpleMessage(
"门槛越高,你就越难摇晃", "门槛越高,你就越难摇晃",
), ),
"shakeDetector": MessageLookupByLibrary.simpleMessage("抖动检测器"), "shakeDetector": MessageLookupByLibrary.simpleMessage("抖动检测器"),
@ -314,7 +338,8 @@ class MessageLookup extends MessageLookupByLibrary {
"shakeDetectorEnableDescription": MessageLookupByLibrary.simpleMessage( "shakeDetectorEnableDescription": MessageLookupByLibrary.simpleMessage(
"启用抖动检测以执行各种操作", "启用抖动检测以执行各种操作",
), ),
"shakeDetectorSettings": MessageLookupByLibrary.simpleMessage("抖动检测器设置"), "shakeDetectorSettings":
MessageLookupByLibrary.simpleMessage("抖动检测器设置"),
"shakeFeedback": MessageLookupByLibrary.simpleMessage("抖动反馈"), "shakeFeedback": MessageLookupByLibrary.simpleMessage("抖动反馈"),
"shakeFeedbackDescription": MessageLookupByLibrary.simpleMessage( "shakeFeedbackDescription": MessageLookupByLibrary.simpleMessage(
"检测到抖动时给出的反馈", "检测到抖动时给出的反馈",
@ -329,18 +354,21 @@ class MessageLookup extends MessageLookupByLibrary {
"themeMode": MessageLookupByLibrary.simpleMessage("主题模式"), "themeMode": MessageLookupByLibrary.simpleMessage("主题模式"),
"themeModeDark": MessageLookupByLibrary.simpleMessage("深色"), "themeModeDark": MessageLookupByLibrary.simpleMessage("深色"),
"themeModeHighContrast": MessageLookupByLibrary.simpleMessage("高对比度模式"), "themeModeHighContrast": MessageLookupByLibrary.simpleMessage("高对比度模式"),
"themeModeHighContrastDescription": MessageLookupByLibrary.simpleMessage( "themeModeHighContrastDescription":
MessageLookupByLibrary.simpleMessage(
"增加背景和文本之间的对比度", "增加背景和文本之间的对比度",
), ),
"themeModeLight": MessageLookupByLibrary.simpleMessage("浅色"), "themeModeLight": MessageLookupByLibrary.simpleMessage("浅色"),
"themeModeSystem": MessageLookupByLibrary.simpleMessage("跟随系统"), "themeModeSystem": MessageLookupByLibrary.simpleMessage("跟随系统"),
"themeSettings": MessageLookupByLibrary.simpleMessage("主题设置"), "themeSettings": MessageLookupByLibrary.simpleMessage("主题设置"),
"themeSettingsColors": MessageLookupByLibrary.simpleMessage("主题色"), "themeSettingsColors": MessageLookupByLibrary.simpleMessage("主题色"),
"themeSettingsColorsAndroid": MessageLookupByLibrary.simpleMessage("主题色"), "themeSettingsColorsAndroid":
MessageLookupByLibrary.simpleMessage("主题色"),
"themeSettingsColorsBook": MessageLookupByLibrary.simpleMessage( "themeSettingsColorsBook": MessageLookupByLibrary.simpleMessage(
"书籍详情页自适应主题", "书籍详情页自适应主题",
), ),
"themeSettingsColorsBookDescription": MessageLookupByLibrary.simpleMessage( "themeSettingsColorsBookDescription":
MessageLookupByLibrary.simpleMessage(
"以牺牲一些性能为代价,对书籍详情页的颜色进行美化", "以牺牲一些性能为代价,对书籍详情页的颜色进行美化",
), ),
"themeSettingsColorsCurrent": MessageLookupByLibrary.simpleMessage( "themeSettingsColorsCurrent": MessageLookupByLibrary.simpleMessage(
@ -351,7 +379,8 @@ class MessageLookup extends MessageLookupByLibrary {
"themeSettingsColorsDescription": MessageLookupByLibrary.simpleMessage( "themeSettingsColorsDescription": MessageLookupByLibrary.simpleMessage(
"使用应用程序的系统主题色", "使用应用程序的系统主题色",
), ),
"themeSettingsDescription": MessageLookupByLibrary.simpleMessage("自定义应用主题"), "themeSettingsDescription":
MessageLookupByLibrary.simpleMessage("自定义应用主题"),
"timeSecond": m7, "timeSecond": m7,
"unknown": MessageLookupByLibrary.simpleMessage("未知"), "unknown": MessageLookupByLibrary.simpleMessage("未知"),
"webVersion": MessageLookupByLibrary.simpleMessage("Web版本"), "webVersion": MessageLookupByLibrary.simpleMessage("Web版本"),

View file

@ -7,7 +7,6 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <dynamic_color/dynamic_color_plugin.h> #include <dynamic_color/dynamic_color_plugin.h>
#include <isar_flutter_libs/isar_flutter_libs_plugin.h>
#include <media_kit_libs_linux/media_kit_libs_linux_plugin.h> #include <media_kit_libs_linux/media_kit_libs_linux_plugin.h>
#include <screen_retriever_linux/screen_retriever_linux_plugin.h> #include <screen_retriever_linux/screen_retriever_linux_plugin.h>
#include <tray_manager/tray_manager_plugin.h> #include <tray_manager/tray_manager_plugin.h>
@ -18,9 +17,6 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) dynamic_color_registrar = g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar); dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
g_autoptr(FlPluginRegistrar) isar_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "IsarFlutterLibsPlugin");
isar_flutter_libs_plugin_register_with_registrar(isar_flutter_libs_registrar);
g_autoptr(FlPluginRegistrar) media_kit_libs_linux_registrar = g_autoptr(FlPluginRegistrar) media_kit_libs_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitLibsLinuxPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitLibsLinuxPlugin");
media_kit_libs_linux_plugin_register_with_registrar(media_kit_libs_linux_registrar); media_kit_libs_linux_plugin_register_with_registrar(media_kit_libs_linux_registrar);

View file

@ -4,7 +4,6 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
dynamic_color dynamic_color
isar_flutter_libs
media_kit_libs_linux media_kit_libs_linux
screen_retriever_linux screen_retriever_linux
tray_manager tray_manager

View file

@ -9,7 +9,6 @@ import audio_service
import audio_session import audio_session
import device_info_plus import device_info_plus
import dynamic_color import dynamic_color
import isar_flutter_libs
import just_audio import just_audio
import package_info_plus import package_info_plus
import path_provider_foundation import path_provider_foundation
@ -25,7 +24,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin"))
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin")) JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))

File diff suppressed because it is too large Load diff

View file

@ -22,7 +22,7 @@ environment:
sdk: ">=3.3.4 <4.0.0" sdk: ">=3.3.4 <4.0.0"
flutter: 3.32.0 flutter: 3.32.0
isar_version: &isar_version ^4.0.0-dev.14 # define the version to be used # isar_version: &isar_version ^4.0.0-dev.14 # define the version to be used
# Dependencies specify other packages that your package needs in order to work. # Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions # To automatically upgrade your package dependencies to the latest versions
@ -37,8 +37,10 @@ dependencies:
animated_list_plus: ^0.5.2 animated_list_plus: ^0.5.2
animated_theme_switcher: ^2.0.10 animated_theme_switcher: ^2.0.10
archive: ^4.0.5 archive: ^4.0.5 # 用于编码和解码各种归档和压缩格式的Dart库
audio_video_progress_bar: ^2.0.2 audio_video_progress_bar: ^2.0.2 # 播放进度条
hooks_riverpod: ^2.5.1 # riverpod hooks
riverpod_annotation: ^2.3.5
# auto_scroll_text: ^0.0.7 # auto_scroll_text: ^0.0.7
background_downloader: ^9.2.0 background_downloader: ^9.2.0
cached_network_image: ^3.3.1 cached_network_image: ^3.3.1
@ -58,10 +60,11 @@ dependencies:
# font_awesome_flutter: ^10.7.0 # font_awesome_flutter: ^10.7.0
freezed_annotation: ^2.4.1 freezed_annotation: ^2.4.1
go_router: ^14.0.2 go_router: ^14.0.2
hive: ^4.0.0-dev.2 hive_ce: ^2.16.0 # 轻量级且极快的键值数据库
hooks_riverpod: ^2.5.1 hive_ce_flutter: 2.3.3
isar: ^4.0.0-dev.14 # hive: ^4.0.0-dev.2
isar_flutter_libs: ^4.0.0-dev.14 # isar: ^4.0.0-dev.14
# isar_flutter_libs: ^4.0.0-dev.14
json_annotation: ^4.9.0 json_annotation: ^4.9.0
audio_service: ^0.18.15 audio_service: ^0.18.15
audio_session: ^0.1.23 audio_session: ^0.1.23
@ -97,7 +100,7 @@ dependencies:
path: ^1.9.0 path: ^1.9.0
path_provider: ^2.1.0 path_provider: ^2.1.0
permission_handler: ^11.3.1 permission_handler: ^11.3.1
riverpod_annotation: ^2.3.5
scroll_loop_auto_scroll: ^0.0.5 scroll_loop_auto_scroll: ^0.0.5
sensors_plus: ^6.0.1 sensors_plus: ^6.0.1
share_plus: ^10.0.2 share_plus: ^10.0.2
@ -114,6 +117,7 @@ dependencies:
icons_plus: ^5.0.0 icons_plus: ^5.0.0
# http_cache_client: ^1.0.4 # http_cache_client: ^1.0.4
# http_cache_isar_store: ^3.0.0-dev.1 # http_cache_isar_store: ^3.0.0-dev.1
dev_dependencies: dev_dependencies:
build_runner: ^2.4.9 build_runner: ^2.4.9
custom_lint: ^0.7.0 custom_lint: ^0.7.0
@ -124,6 +128,7 @@ dev_dependencies:
json_serializable: ^6.8.0 json_serializable: ^6.8.0
riverpod_generator: ^2.4.2 riverpod_generator: ^2.4.2
riverpod_lint: ^2.3.10 riverpod_lint: ^2.3.10
hive_ce_generator: ^1.8.1
flutter_launcher_icons: "^0.14.4" flutter_launcher_icons: "^0.14.4"
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the

View file

@ -7,7 +7,6 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <dynamic_color/dynamic_color_plugin_c_api.h> #include <dynamic_color/dynamic_color_plugin_c_api.h>
#include <isar_flutter_libs/isar_flutter_libs_plugin.h>
#include <media_kit_libs_windows_audio/media_kit_libs_windows_audio_plugin_c_api.h> #include <media_kit_libs_windows_audio/media_kit_libs_windows_audio_plugin_c_api.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h> #include <permission_handler_windows/permission_handler_windows_plugin.h>
#include <screen_retriever_windows/screen_retriever_windows_plugin_c_api.h> #include <screen_retriever_windows/screen_retriever_windows_plugin_c_api.h>
@ -19,8 +18,6 @@
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
DynamicColorPluginCApiRegisterWithRegistrar( DynamicColorPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
IsarFlutterLibsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin"));
MediaKitLibsWindowsAudioPluginCApiRegisterWithRegistrar( MediaKitLibsWindowsAudioPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("MediaKitLibsWindowsAudioPluginCApi")); registry->GetRegistrarForPlugin("MediaKitLibsWindowsAudioPluginCApi"));
PermissionHandlerWindowsPluginRegisterWithRegistrar( PermissionHandlerWindowsPluginRegisterWithRegistrar(

View file

@ -4,7 +4,6 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
dynamic_color dynamic_color
isar_flutter_libs
media_kit_libs_windows_audio media_kit_libs_windows_audio
permission_handler_windows permission_handler_windows
screen_retriever_windows screen_retriever_windows