This commit is contained in:
zhutao
2025-11-21 18:21:47 +08:00
parent 9c94ee31fd
commit 5784a0a5d4
32 changed files with 734 additions and 441 deletions

View File

@@ -1,5 +1,9 @@
import 'package:app/config/theme/base/app_theme_ext.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../viewmodel/s_home_vm.dart';
///banner
class BannerInfo extends StatelessWidget {
@@ -7,11 +11,12 @@ class BannerInfo extends StatelessWidget {
@override
Widget build(BuildContext context) {
final vm = context.read<SHomeVm>();
return Stack(
children: [
Positioned.fill(
child: Image.network(
"https://images.unsplash.com/photo-1505209487757-5114235191e5?w=800",
child: CachedNetworkImage(
imageUrl: "https://www.gxgif.com/pic/fj/2025115155717.jpg",
fit: BoxFit.cover,
),
),
@@ -35,34 +40,38 @@ class BannerInfo extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
margin: EdgeInsets.only(bottom: 30),
decoration: BoxDecoration(
color: Colors.black26,
borderRadius: BorderRadius.circular(30),
),
child: Row(
mainAxisSize: MainAxisSize.min,
spacing: 5,
children: [
Container(
width: 15,
height: 15,
decoration: BoxDecoration(
color: context.success,
shape: BoxShape.circle,
Visibility(
visible: false,
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
margin: EdgeInsets.only(bottom: 30),
decoration: BoxDecoration(
color: Colors.black26,
borderRadius: BorderRadius.circular(30),
),
child: Row(
mainAxisSize: MainAxisSize.min,
spacing: 5,
children: [
Container(
width: 15,
height: 15,
decoration: BoxDecoration(
color: context.success,
shape: BoxShape.circle,
),
),
),
Text(
"进行中",
style: TextStyle(color: Colors.white, fontSize: 14),
),
],
Text(
"进行中",
style: TextStyle(color: Colors.white, fontSize: 14),
),
],
),
),
),
SizedBox(height: 50),
Text(
"高中数学专场",
vm.roomInfo?.roomName ?? "",
style: TextStyle(
color: Colors.white,
fontSize: 20,
@@ -82,4 +91,4 @@ class BannerInfo extends StatelessWidget {
],
);
}
}
}