Skip to content

Commit

Permalink
add(icon)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuchuancong committed Oct 16, 2023
1 parent f14844b commit d5bb027
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 84 deletions.
Binary file removed assets/images/alipay.jpg
Binary file not shown.
Binary file removed assets/images/wechat.png
Binary file not shown.
167 changes: 83 additions & 84 deletions lib/modules/areas/widgets/area_card.dart
Original file line number Diff line number Diff line change
@@ -1,84 +1,83 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:pure_live/common/index.dart';
import 'package:pure_live/routes/app_pages.dart';

class AreaCard extends StatelessWidget {
const AreaCard({
Key? key,
required this.area,
}) : super(key: key);

final LiveArea area;

@override
Widget build(BuildContext context) {
return Card(
margin: const EdgeInsets.all(7.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
child: InkWell(
borderRadius: BorderRadius.circular(15.0),
onTap: () => AppPages.toAreaRooms(area),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
AspectRatio(
aspectRatio: 1,
child: Card(
margin: const EdgeInsets.all(0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
clipBehavior: Clip.antiAlias,
color: Colors.white,
elevation: 0,
child: CachedNetworkImage(
imageUrl: area.areaPic,
cacheManager: CustomCacheManager.instance,
fit: BoxFit.fill,
errorWidget: (context, error, stackTrace) => const Center(
child: Text(
'Cover\nNot Found',
textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.w500),
),
),
),
),
),
ListTile(
dense: true,
contentPadding: const EdgeInsets.symmetric(horizontal: 10),
title: Text(
area.areaName,
maxLines: 1,
overflow: TextOverflow.clip,
style: const TextStyle(fontWeight: FontWeight.w500),
),
subtitle: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
area.typeName,
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 10,
),
),
Text(
area.platform.toUpperCase(),
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 10,
),
),
],
),
)
],
),
),
);
}
}
import 'package:cached_network_image/cached_network_image.dart';
import 'package:pure_live/common/index.dart';
import 'package:pure_live/routes/app_pages.dart';

class AreaCard extends StatelessWidget {
const AreaCard({
Key? key,
required this.area,
}) : super(key: key);

final LiveArea area;

@override
Widget build(BuildContext context) {
return Card(
margin: const EdgeInsets.all(7.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
child: InkWell(
borderRadius: BorderRadius.circular(15.0),
onTap: () => AppPages.toAreaRooms(area),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
AspectRatio(
aspectRatio: 1,
child: Card(
margin: const EdgeInsets.all(0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
clipBehavior: Clip.antiAlias,
color: Colors.white,
elevation: 0,
child: CachedNetworkImage(
imageUrl: area.areaPic,
cacheManager: CustomCacheManager.instance,
fit: BoxFit.fill,
errorWidget: (context, error, stackTrace) => const Center(
child: Icon(
Icons.live_tv_rounded,
size: 38,
),
),
),
),
),
ListTile(
dense: true,
contentPadding: const EdgeInsets.symmetric(horizontal: 10),
title: Text(
area.areaName,
maxLines: 1,
overflow: TextOverflow.clip,
style: const TextStyle(fontWeight: FontWeight.w500),
),
subtitle: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
area.typeName,
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 10,
),
),
Text(
area.platform.toUpperCase(),
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 10,
),
),
],
),
)
],
),
),
);
}
}

0 comments on commit d5bb027

Please sign in to comment.