upgrade min sdk; run formatter

This commit is contained in:
Fabian Freund
2025-06-02 22:25:10 +02:00
parent 8fccd767af
commit ad03cc9bac
171 changed files with 4817 additions and 4685 deletions
@@ -131,14 +131,12 @@ class _AnimateGradientShaderState extends State<AnimateGradientShader>
animation: _animation!,
builder: (BuildContext context, Widget? child) {
final gradient = LinearGradient(
begin:
widget.animateAlignments
? begin.evaluate(_animation!)
: widget.primaryBegin,
end:
widget.animateAlignments
? end.evaluate(_animation!)
: widget.primaryEnd,
begin: widget.animateAlignments
? begin.evaluate(_animation!)
: widget.primaryBegin,
end: widget.animateAlignments
? end.evaluate(_animation!)
: widget.primaryEnd,
colors: _evaluateColors(_animation!),
);
@@ -176,10 +176,9 @@ class AutoSuggestTextField extends HookWidget {
text: suggestion!.substring(text.length),
style: TextStyle(
height: 1.2,
color:
Theme.of(
context,
).colorScheme.onSurfaceVariant,
color: Theme.of(
context,
).colorScheme.onSurfaceVariant,
backgroundColor:
suggestionHighlightColor ??
Theme.of(
@@ -22,23 +22,21 @@ class FailureWidget extends StatelessWidget {
children: [
ListTile(
title: Text(title ?? 'Something went wrong'),
subtitle:
exception != null
? switch (exception) {
final String string => Text(string),
_ => Text(exception.runtimeType.toString()),
}
: null,
trailing:
compact && onRetry != null
? IconButton.outlined(
onPressed: onRetry,
style: IconButton.styleFrom(
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
icon: const Icon(Icons.refresh_outlined),
)
: null,
subtitle: exception != null
? switch (exception) {
final String string => Text(string),
_ => Text(exception.runtimeType.toString()),
}
: null,
trailing: compact && onRetry != null
? IconButton.outlined(
onPressed: onRetry,
style: IconButton.styleFrom(
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
icon: const Icon(Icons.refresh_outlined),
)
: null,
textColor: Theme.of(context).colorScheme.error,
),
if (!compact && onRetry != null)
@@ -85,12 +85,11 @@ class SelectableChips<T extends S, S, K> extends StatelessWidget {
onDeleted?.call(item);
}
},
onDeleted:
deleteIcon
? () {
onDeleted?.call(item);
}
: null,
onDeleted: deleteIcon
? () {
onDeleted?.call(item);
}
: null,
label: itemLabel.call(item),
avatar: itemAvatar?.call(item),
),
+12 -13
View File
@@ -15,8 +15,8 @@ class UrlIcon extends HookConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
final icon = useCachedFuture(
() =>
// ignore: discarded_futures
ref.read(genericWebsiteServiceProvider.notifier).getUrlIcon(urlList),
// ignore: discarded_futures
ref.read(genericWebsiteServiceProvider.notifier).getUrlIcon(urlList),
[urlList],
);
@@ -24,17 +24,16 @@ class UrlIcon extends HookConsumerWidget {
enabled: !icon.hasData,
child: SizedBox.square(
dimension: iconSize,
child:
(icon.data != null)
? RepaintBoundary(
child: RawImage(
image: icon.data?.image.value,
height: iconSize,
width: iconSize,
fit: BoxFit.fill,
),
)
: Icon(MdiIcons.web, size: iconSize),
child: (icon.data != null)
? RepaintBoundary(
child: RawImage(
image: icon.data?.image.value,
height: iconSize,
width: iconSize,
fit: BoxFit.fill,
),
)
: Icon(MdiIcons.web, size: iconSize),
),
);
}
@@ -61,13 +61,12 @@ class WebsiteFeedTile extends HookConsumerWidget {
// onRetry: () => ref.refresh(pageInfoProvider(url)),
// );
},
loading:
() => const ListTile(
leading: Icon(Icons.rss_feed),
contentPadding: EdgeInsets.zero,
title: Text('Available Web Feeds'),
trailing: Bone.icon(),
),
loading: () => const ListTile(
leading: Icon(Icons.rss_feed),
contentPadding: EdgeInsets.zero,
title: Text('Available Web Feeds'),
trailing: Bone.icon(),
),
),
);
}
@@ -36,28 +36,26 @@ class WebsiteTitleTile extends HookConsumerWidget {
error: (error, stackTrace) {
return FailureWidget(
title: error.toString(),
onRetry:
() => ref.refresh(pageInfoProvider(url, isImageRequest: false)),
onRetry: () =>
ref.refresh(pageInfoProvider(url, isImageRequest: false)),
);
},
loading:
() =>
(precachedInfo != null)
? ListTile(
leading: RawImage(
image: precachedInfo!.favicon?.image.value,
height: 24,
width: 24,
),
contentPadding: EdgeInsets.zero,
title: Text(precachedInfo!.title ?? 'Unknown Title'),
subtitle: Text(url.authority),
)
: const ListTile(
contentPadding: EdgeInsets.zero,
title: Bone.text(),
subtitle: Bone.text(),
),
loading: () => (precachedInfo != null)
? ListTile(
leading: RawImage(
image: precachedInfo!.favicon?.image.value,
height: 24,
width: 24,
),
contentPadding: EdgeInsets.zero,
title: Text(precachedInfo!.title ?? 'Unknown Title'),
subtitle: Text(url.authority),
)
: const ListTile(
contentPadding: EdgeInsets.zero,
title: Bone.text(),
subtitle: Bone.text(),
),
),
);
}