Remove yaru dep
This commit is contained in:
parent
a15fae89eb
commit
26a2bd3f5e
21 changed files with 291 additions and 311 deletions
|
|
@ -4,21 +4,29 @@ class Thumbnail extends StatelessWidget {
|
|||
final String url;
|
||||
final VoidCallback onClick;
|
||||
final double radius;
|
||||
final ShapeBorder? border;
|
||||
final Widget? child;
|
||||
const Thumbnail({
|
||||
super.key,
|
||||
required this.url,
|
||||
required this.onClick,
|
||||
this.radius = 16,
|
||||
this.border,
|
||||
this.child,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => ClipRRect(
|
||||
borderRadius: BorderRadius.all(Radius.circular(radius)),
|
||||
child: InkWell(
|
||||
onTap: onClick,
|
||||
child: Image.network(
|
||||
url,
|
||||
fit: BoxFit.fill,
|
||||
)),
|
||||
child: Material(
|
||||
child: Ink.image(
|
||||
image: NetworkImage(url),
|
||||
fit: BoxFit.fill,
|
||||
child: InkWell(
|
||||
onTap: onClick,
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue