Files
cxyz/cxyz-android/lib/ui/widgets/source_logo.dart
T
nsrb a7c6058540 Add cxyz Android project structure and initial configuration
- Introduced a new Flutter project for the cxyz Android manga/comic reader, including essential files such as pubspec.yaml, AndroidManifest.xml, and Gradle configuration.
- Added .gitignore files to exclude unnecessary files and directories for both the main project and Android-specific files.
- Implemented initial README.md with project description, features, setup instructions, and API details for ComicLand, MangaRead, and MangaTown.
- Configured analysis options and dependencies in pubspec.yaml to support Flutter development.
- Established a pnpm workspace and lockfile for dependency management.
- Included various Android resources such as icons, styles, and launch backgrounds for a complete application setup.
2026-08-29 17:50:31 +07:00

35 lines
771 B
Dart

import 'package:flutter/material.dart';
import '../../sources/source.dart';
/// Bundled source favicon from [SourceId.logoAsset].
class SourceLogo extends StatelessWidget {
const SourceLogo({
super.key,
required this.sourceId,
this.size = 32,
this.borderRadius = 6,
});
final SourceId sourceId;
final double size;
final double borderRadius;
@override
Widget build(BuildContext context) {
return ClipRRect(
borderRadius: BorderRadius.circular(borderRadius),
child: Image.asset(
sourceId.logoAsset,
width: size,
height: size,
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) => Icon(
Icons.public,
size: size * 0.75,
),
),
);
}
}