You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
206 lines
6.9 KiB
206 lines
6.9 KiB
3 years ago
|
import 'package:flutter/material.dart';
|
||
|
import 'package:huixiang/generated/l10n.dart';
|
||
|
import 'package:huixiang/utils/font_weight.dart';
|
||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||
|
|
||
|
class VipDialog extends StatelessWidget {
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return SimpleDialog(
|
||
|
titlePadding: EdgeInsets.all(10),
|
||
|
backgroundColor: Colors.transparent,
|
||
|
elevation: 0,
|
||
|
shape: RoundedRectangleBorder(
|
||
|
borderRadius: BorderRadius.circular(6),
|
||
|
),
|
||
|
children: <Widget>[
|
||
|
Stack(
|
||
|
alignment: Alignment.topCenter,
|
||
|
children: [
|
||
|
Container(
|
||
|
margin: EdgeInsets.only(top: 40.h),
|
||
|
decoration: BoxDecoration(
|
||
|
color: Colors.white,
|
||
|
borderRadius: BorderRadius.circular(8),),
|
||
|
child:SingleChildScrollView(
|
||
|
physics: BouncingScrollPhysics(),
|
||
|
child: Column(
|
||
|
children: [
|
||
|
Container(
|
||
|
alignment: Alignment.center,
|
||
|
width:double.infinity,
|
||
|
height: 92,
|
||
|
padding: EdgeInsets.only(top: 50.h, bottom: 19.h),
|
||
|
decoration: BoxDecoration(
|
||
|
color: Colors.black,
|
||
|
borderRadius: BorderRadius.only(
|
||
|
topLeft: Radius.circular(8),
|
||
|
topRight: Radius.circular(8),
|
||
|
),),
|
||
|
child:Text(
|
||
|
"${S.of(context).gongxinchengwei}银卡会员",
|
||
|
style: TextStyle(
|
||
|
color: Colors.white,
|
||
|
fontSize: 18.sp,
|
||
|
fontWeight: FontWeight.bold,
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
Container(
|
||
|
child: Column(
|
||
|
children: [
|
||
|
Padding(
|
||
|
padding: EdgeInsets.only(top:16.h, bottom: 19.h),
|
||
|
child: Text(
|
||
|
S.of(context).huodequanyi,
|
||
|
style: TextStyle(
|
||
|
color: Colors.black,
|
||
|
fontSize: 14.sp,
|
||
|
fontWeight:MyFontWeight.medium,
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
// vipUpgrade(),
|
||
|
Container(
|
||
|
margin: EdgeInsets.only(left: 32,right: 32,bottom: 20),
|
||
|
decoration: BoxDecoration(
|
||
|
gradient: new LinearGradient(
|
||
|
begin: Alignment.centerLeft,
|
||
|
end: Alignment.centerRight,
|
||
|
colors: [
|
||
|
Color(0xFFFFDCA1),
|
||
|
Color(0xFFFAE4C0),
|
||
|
]),
|
||
|
borderRadius: BorderRadius.circular(22.5),
|
||
|
),
|
||
|
width: MediaQuery.of(context).size.width,
|
||
|
height: 40,
|
||
|
alignment: Alignment.center,
|
||
|
child: Text(
|
||
|
S.of(context).chakanquanyi,
|
||
|
style: TextStyle(
|
||
|
fontWeight: FontWeight.bold,
|
||
|
fontSize: 16.sp,
|
||
|
color: Color(0xFF4A4748),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
Image.asset(
|
||
|
"assets/image/vip_yk.png",
|
||
|
fit: BoxFit.cover,
|
||
|
width: 76,
|
||
|
height: 76,
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
],
|
||
|
);
|
||
|
}
|
||
|
|
||
|
///会员升级权益列表
|
||
|
Widget vipUpgrade() {
|
||
|
return GridView.builder(
|
||
|
itemCount:9,
|
||
|
shrinkWrap: true,
|
||
|
physics: NeverScrollableScrollPhysics(),
|
||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||
|
//一行的Widget数量
|
||
|
crossAxisCount:3,
|
||
|
//水平子Widget之间间距
|
||
|
crossAxisSpacing:10,
|
||
|
//垂直子Widget之间间距
|
||
|
mainAxisSpacing: 10,
|
||
|
),
|
||
|
itemBuilder: (context, index) {
|
||
|
return GestureDetector(
|
||
|
onTap: () {
|
||
|
Navigator.of(context)
|
||
|
.pushNamed('/router/legal_right_details', arguments: {});
|
||
|
},
|
||
|
child: vipUpgradeItem(),
|
||
|
);
|
||
|
},
|
||
|
);
|
||
|
}
|
||
|
|
||
|
Widget vipUpgradeItem() {
|
||
|
return Container(
|
||
|
alignment: Alignment.center,
|
||
|
child: Column(
|
||
|
children: [
|
||
|
Stack(
|
||
|
alignment: Alignment.bottomCenter,
|
||
|
children: [
|
||
|
Opacity(
|
||
|
opacity: 0.3,
|
||
|
// MImage(
|
||
|
// "assets/image/badge_img.png",
|
||
|
// width: 80,
|
||
|
// height: 80,
|
||
|
// fit: BoxFit.cover,
|
||
|
// errorSrc: "assets/image/default_1.png",
|
||
|
// fadeSrc: "assets/image/default_1.png",
|
||
|
// ),
|
||
|
child: Image.asset(
|
||
|
"assets/image/vip_qy.png",
|
||
|
width: 36,
|
||
|
height: 36,
|
||
|
fit: BoxFit.cover,
|
||
|
),
|
||
|
),
|
||
|
Container(
|
||
|
decoration: new BoxDecoration(
|
||
|
color: Color(0xFFA29E9E),
|
||
|
borderRadius: BorderRadius.circular(7.0),
|
||
|
),
|
||
|
width: 52.w,
|
||
|
height: 15.h,
|
||
|
child: Row(
|
||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
children: [
|
||
|
Icon(
|
||
|
Icons.lock,
|
||
|
color: Color(0xFFFFDCA1),
|
||
|
size: 10,
|
||
|
),
|
||
|
Text(
|
||
|
"暂未开放",
|
||
|
style: TextStyle(
|
||
|
color: Color(0xFF181818),
|
||
|
fontWeight: MyFontWeight.regular,
|
||
|
fontSize: 9.sp,
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
)
|
||
|
],
|
||
|
),
|
||
|
SizedBox(
|
||
|
height: 5.h,
|
||
|
),
|
||
|
Text(
|
||
|
"储值优惠",
|
||
|
maxLines: 2,
|
||
|
overflow: TextOverflow.ellipsis,
|
||
|
textAlign: TextAlign.center,
|
||
|
style: TextStyle(
|
||
|
color: Color(0xFF181818),
|
||
|
fontWeight: MyFontWeight.regular,
|
||
|
fontSize: 12.sp,
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
|
||
|
}
|