Initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../core/infra/emby_api/emby_headers.dart';
|
||||
import '../shared/utils/platform_device_name.dart';
|
||||
import 'di_providers.dart';
|
||||
import 'session_provider.dart';
|
||||
|
||||
final embyImageHeadersProvider = FutureProvider<Map<String, String>?>((
|
||||
ref,
|
||||
) async {
|
||||
final session = ref.watch(activeSessionProvider);
|
||||
if (session == null) return null;
|
||||
final deviceId = await ref.watch(deviceIdProvider.future);
|
||||
return EmbyRequestHeaders.image(
|
||||
deviceId: deviceId,
|
||||
deviceName: kEmbyDeviceName,
|
||||
token: session.token,
|
||||
userId: session.userId,
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user