85 lines
2.6 KiB
Dart
85 lines
2.6 KiB
Dart
import 'package:app/config/theme/base/app_theme_ext.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
///banner
|
|
class BannerInfo extends StatelessWidget {
|
|
const BannerInfo({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Stack(
|
|
children: [
|
|
Positioned.fill(
|
|
child: Image.network(
|
|
"https://images.unsplash.com/photo-1505209487757-5114235191e5?w=800",
|
|
fit: BoxFit.cover,
|
|
),
|
|
),
|
|
Positioned.fill(
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
gradient: LinearGradient(
|
|
colors: [
|
|
Theme.of(context).primaryColor,
|
|
Theme.of(context).primaryColor.withValues(alpha: 0.5),
|
|
],
|
|
begin: Alignment.centerLeft,
|
|
end: Alignment.centerRight,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
width: double.infinity,
|
|
padding: EdgeInsets.all(context.pagePadding),
|
|
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,
|
|
),
|
|
),
|
|
Text(
|
|
"进行中",
|
|
style: TextStyle(color: Colors.white, fontSize: 14),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Text(
|
|
"高中数学专场",
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 20,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.only(top: 5),
|
|
child: Text(
|
|
"专业老师在线陪伴,专注高效学习",
|
|
style: TextStyle(color: Colors.white70, fontSize: 14),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
} |