Add user agent

This commit is contained in:
problematicconsumer
2023-08-25 19:07:03 +03:30
parent 55635a579e
commit e38c3e3982
4 changed files with 37 additions and 4 deletions

View File

@@ -23,7 +23,13 @@ SharedPreferences sharedPreferences(SharedPreferencesRef ref) =>
// TODO: set options for dio
@Riverpod(keepAlive: true)
Dio dio(DioRef ref) => Dio();
Dio dio(DioRef ref) => Dio(
BaseOptions(
headers: {
"User-Agent": ref.watch(runtimeDetailsServiceProvider).userAgent,
},
),
);
@Riverpod(keepAlive: true)
ProfilesDao profilesDao(ProfilesDaoRef ref) => ProfilesDao(