mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore: bump line length to 120 (#20191)
This commit is contained in:
parent
977c9b96ba
commit
ad65e9011a
517 changed files with 4520 additions and 9514 deletions
|
|
@ -23,12 +23,10 @@ class MesmerizingSliverAppBar extends ConsumerStatefulWidget {
|
|||
final String title;
|
||||
final IconData icon;
|
||||
@override
|
||||
ConsumerState<MesmerizingSliverAppBar> createState() =>
|
||||
_MesmerizingSliverAppBarState();
|
||||
ConsumerState<MesmerizingSliverAppBar> createState() => _MesmerizingSliverAppBarState();
|
||||
}
|
||||
|
||||
class _MesmerizingSliverAppBarState
|
||||
extends ConsumerState<MesmerizingSliverAppBar> {
|
||||
class _MesmerizingSliverAppBarState extends ConsumerState<MesmerizingSliverAppBar> {
|
||||
double _scrollProgress = 0.0;
|
||||
|
||||
double _calculateScrollProgress(FlexibleSpaceBarSettings? settings) {
|
||||
|
|
@ -41,14 +39,12 @@ class _MesmerizingSliverAppBarState
|
|||
return 1.0;
|
||||
}
|
||||
|
||||
return (1.0 - (settings.currentExtent - settings.minExtent) / deltaExtent)
|
||||
.clamp(0.0, 1.0);
|
||||
return (1.0 - (settings.currentExtent - settings.minExtent) / deltaExtent).clamp(0.0, 1.0);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isMultiSelectEnabled =
|
||||
ref.watch(multiSelectProvider.select((s) => s.isEnabled));
|
||||
final isMultiSelectEnabled = ref.watch(multiSelectProvider.select((s) => s.isEnabled));
|
||||
|
||||
return isMultiSelectEnabled
|
||||
? SliverToBoxAdapter(
|
||||
|
|
@ -65,9 +61,7 @@ class _MesmerizingSliverAppBarState
|
|||
elevation: 0,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Platform.isIOS
|
||||
? Icons.arrow_back_ios_new_rounded
|
||||
: Icons.arrow_back,
|
||||
Platform.isIOS ? Icons.arrow_back_ios_new_rounded : Icons.arrow_back,
|
||||
color: Color.lerp(
|
||||
Colors.white,
|
||||
context.primaryColor,
|
||||
|
|
@ -93,8 +87,7 @@ class _MesmerizingSliverAppBarState
|
|||
),
|
||||
flexibleSpace: Builder(
|
||||
builder: (context) {
|
||||
final settings = context.dependOnInheritedWidgetOfExactType<
|
||||
FlexibleSpaceBarSettings>();
|
||||
final settings = context.dependOnInheritedWidgetOfExactType<FlexibleSpaceBarSettings>();
|
||||
final scrollProgress = _calculateScrollProgress(settings);
|
||||
|
||||
// Update scroll progress for the leading button
|
||||
|
|
@ -145,12 +138,10 @@ class _ExpandedBackground extends ConsumerStatefulWidget {
|
|||
});
|
||||
|
||||
@override
|
||||
ConsumerState<_ExpandedBackground> createState() =>
|
||||
_ExpandedBackgroundState();
|
||||
ConsumerState<_ExpandedBackground> createState() => _ExpandedBackgroundState();
|
||||
}
|
||||
|
||||
class _ExpandedBackgroundState extends ConsumerState<_ExpandedBackground>
|
||||
with SingleTickerProviderStateMixin {
|
||||
class _ExpandedBackgroundState extends ConsumerState<_ExpandedBackground> with SingleTickerProviderStateMixin {
|
||||
late AnimationController _slideController;
|
||||
late Animation<Offset> _slideAnimation;
|
||||
|
||||
|
|
@ -278,8 +269,7 @@ class _ItemCountTextState extends ConsumerState<_ItemCountText> {
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_reloadSubscription =
|
||||
EventStream.shared.listen<TimelineReloadEvent>((_) => setState(() {}));
|
||||
_reloadSubscription = EventStream.shared.listen<TimelineReloadEvent>((_) => setState(() {}));
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -328,8 +318,7 @@ class _RandomAssetBackground extends StatefulWidget {
|
|||
State<_RandomAssetBackground> createState() => _RandomAssetBackgroundState();
|
||||
}
|
||||
|
||||
class _RandomAssetBackgroundState extends State<_RandomAssetBackground>
|
||||
with TickerProviderStateMixin {
|
||||
class _RandomAssetBackgroundState extends State<_RandomAssetBackground> with TickerProviderStateMixin {
|
||||
late AnimationController _zoomController;
|
||||
late AnimationController _crossFadeController;
|
||||
late Animation<double> _zoomAnimation;
|
||||
|
|
@ -500,8 +489,7 @@ class _RandomAssetBackgroundState extends State<_RandomAssetBackground>
|
|||
alignment: Alignment.topRight,
|
||||
image: getFullImageProvider(_currentAsset!),
|
||||
fit: BoxFit.cover,
|
||||
frameBuilder:
|
||||
(context, child, frame, wasSynchronouslyLoaded) {
|
||||
frameBuilder: (context, child, frame, wasSynchronouslyLoaded) {
|
||||
if (wasSynchronouslyLoaded || frame != null) {
|
||||
return child;
|
||||
}
|
||||
|
|
@ -532,8 +520,7 @@ class _RandomAssetBackgroundState extends State<_RandomAssetBackground>
|
|||
alignment: Alignment.topRight,
|
||||
image: getFullImageProvider(_nextAsset!),
|
||||
fit: BoxFit.cover,
|
||||
frameBuilder:
|
||||
(context, child, frame, wasSynchronouslyLoaded) {
|
||||
frameBuilder: (context, child, frame, wasSynchronouslyLoaded) {
|
||||
if (wasSynchronouslyLoaded || frame != null) {
|
||||
return child;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue