mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
feature: Improved sync capability
This commit is contained in:
parent
f3e920ac79
commit
c5c7f71b84
31 changed files with 500 additions and 344 deletions
|
|
@ -59,8 +59,9 @@ class _BackgroundImageState extends ConsumerState<BackgroundImage> {
|
|||
if (itemId == null) return;
|
||||
|
||||
final apiResponse = await ref.read(jellyApiProvider).usersUserIdItemsItemIdGet(itemId: itemId);
|
||||
final image =
|
||||
apiResponse.body?.parentBaseModel.getPosters?.randomBackDrop ?? apiResponse.body?.getPosters?.randomBackDrop;
|
||||
final image = apiResponse.body?.parentBaseModel.getPosters?.randomBackDrop ??
|
||||
apiResponse.body?.getPosters?.randomBackDrop ??
|
||||
apiResponse.body?.getPosters?.primary;
|
||||
|
||||
if (mounted) setState(() => backgroundImage = image);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import 'dart:async';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:fladder/screens/shared/animated_fade_size.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:fladder/screens/shared/animated_fade_size.dart';
|
||||
|
||||
class IconButtonAwait extends StatefulWidget {
|
||||
final FutureOr<dynamic> Function() onPressed;
|
||||
final Color? color;
|
||||
|
|
@ -33,7 +34,10 @@ class IconButtonAwaitState extends State<IconButtonAwait> {
|
|||
} catch (e) {
|
||||
log(e.toString());
|
||||
} finally {
|
||||
setState(() => loading = false);
|
||||
setState(() {
|
||||
if (!mounted) return;
|
||||
loading = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
icon: AnimatedFadeSize(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue