feat: 简单实现弹幕功能

This commit is contained in:
guozhigq
2023-08-29 23:10:22 +08:00
parent 5f730af347
commit dfbe3b1f6c
23 changed files with 646 additions and 241 deletions

View File

@ -17,8 +17,6 @@ class ApiInterceptor extends Interceptor {
handler.next(options);
}
Box localCache = GStrorage.localCache;
@override
void onResponse(Response response, ResponseInterceptorHandler handler) {
try {
@ -29,8 +27,11 @@ class ApiInterceptor extends Interceptor {
final uri = Uri.parse(locations.first);
final accessKey = uri.queryParameters['access_key'];
final mid = uri.queryParameters['mid'];
localCache
.put(LocalCacheKey.accessKey, {'mid': mid, 'value': accessKey});
try {
Box localCache = GStrorage.localCache;
localCache.put(
LocalCacheKey.accessKey, {'mid': mid, 'value': accessKey});
} catch (_) {}
}
}
}