added cargo files

This commit is contained in:
2026-03-03 10:57:43 -05:00
parent 478a90e01b
commit 169df46bc2
813 changed files with 227273 additions and 9 deletions

View File

@@ -0,0 +1,51 @@
// Copyright 2020 Ben Hills and the project contributors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:pinepods_mobile/ui/widgets/placeholder_builder.dart';
import 'package:pinepods_mobile/ui/widgets/podcast_image.dart';
import 'package:flutter/material.dart';
class TileImage extends StatelessWidget {
const TileImage({
super.key,
required this.url,
required this.size,
this.highlight = false,
});
/// The URL of the image to display.
final String url;
/// The size of the image container; both height and width.
final double size;
final bool highlight;
@override
Widget build(BuildContext context) {
final placeholderBuilder = PlaceholderBuilder.of(context);
return PodcastImage(
key: Key('tile$url'),
highlight: highlight,
url: url,
height: size,
width: size,
borderRadius: 4.0,
fit: BoxFit.contain,
placeholder: placeholderBuilder != null
? placeholderBuilder.builder()(context)
: const Image(
fit: BoxFit.contain,
image: AssetImage('assets/images/favicon.png'),
),
errorPlaceholder: placeholderBuilder != null
? placeholderBuilder.errorBuilder()(context)
: const Image(
fit: BoxFit.contain,
image: AssetImage('assets/images/favicon.png'),
),
);
}
}