|
|
|
@ -152,28 +152,30 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Widget build(BuildContext context) { |
|
|
|
|
return Stack( |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
// padding: EdgeInsets.only(top: 40.h), |
|
|
|
|
height:260.h, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
gradient: new LinearGradient( |
|
|
|
|
begin: Alignment.bottomCenter, |
|
|
|
|
end: Alignment.topCenter, |
|
|
|
|
colors: [ |
|
|
|
|
Color(0xFF000000), |
|
|
|
|
Color(0xFF585858), |
|
|
|
|
]), |
|
|
|
|
// border: Border.all(color: Colors.white,width: 0.5), |
|
|
|
|
shape: BoxShape.rectangle, |
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
bottomRight: Radius.circular(35), |
|
|
|
|
bottomLeft: Radius.circular(35), |
|
|
|
|
return Container( |
|
|
|
|
color: Color(0xFFF7F7F7), |
|
|
|
|
child: Stack( |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
// padding: EdgeInsets.only(top: 40.h), |
|
|
|
|
height:260.h, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
gradient: new LinearGradient( |
|
|
|
|
begin: Alignment.bottomCenter, |
|
|
|
|
end: Alignment.topCenter, |
|
|
|
|
colors: [ |
|
|
|
|
Color(0xFF000000), |
|
|
|
|
Color(0xFF585858), |
|
|
|
|
]), |
|
|
|
|
// border: Border.all(color: Colors.white,width: 0.5), |
|
|
|
|
shape: BoxShape.rectangle, |
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
bottomRight: Radius.circular(35), |
|
|
|
|
bottomLeft: Radius.circular(35), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Column( |
|
|
|
|
Column( |
|
|
|
|
children: [ |
|
|
|
|
SizedBox(height: 40), |
|
|
|
|
Container( |
|
|
|
@ -232,48 +234,49 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
child: Column( |
|
|
|
|
children: [ |
|
|
|
|
///会员卡 |
|
|
|
|
Container( |
|
|
|
|
height: (MediaQuery.of(context).size.width) / |
|
|
|
|
1.78 * |
|
|
|
|
AppUtils.textScale(context), |
|
|
|
|
child: Swiper( |
|
|
|
|
viewportFraction: 0.95, |
|
|
|
|
loop: false, |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
controller: controller, |
|
|
|
|
onIndexChanged: (index) { |
|
|
|
|
setState(() { |
|
|
|
|
checkIndex = index; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
|
return MineVipView( |
|
|
|
|
vipLevel: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
? widget.arguments["rankLevel"] |
|
|
|
|
: position + 1, |
|
|
|
|
curLevel: widget.arguments["rankLevel"], |
|
|
|
|
tag: (widget.arguments["rankLevel"] == (position + 1) || |
|
|
|
|
!(ranks != null && ranks.isNotEmpty)) |
|
|
|
|
? "vip" |
|
|
|
|
: "", |
|
|
|
|
padding: 6.w, |
|
|
|
|
// rank: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
// ? 0 |
|
|
|
|
// : widget.arguments["expendAmount"] ?? 0, |
|
|
|
|
rankMax: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
? 0 |
|
|
|
|
: ranks[position].rankOrigin, |
|
|
|
|
createTime: widget.arguments["createTime"], |
|
|
|
|
showRank: false, |
|
|
|
|
price: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
? "0" |
|
|
|
|
: ranks[position].price, |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
itemCount: |
|
|
|
|
(ranks != null && ranks.isNotEmpty) ? ranks.length : 1, |
|
|
|
|
if(ranks.length > 0) |
|
|
|
|
Container( |
|
|
|
|
height: (MediaQuery.of(context).size.width) / |
|
|
|
|
1.78 * |
|
|
|
|
AppUtils.textScale(context), |
|
|
|
|
child: Swiper( |
|
|
|
|
viewportFraction: 0.95, |
|
|
|
|
loop: false, |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
controller: controller, |
|
|
|
|
onIndexChanged: (index) { |
|
|
|
|
setState(() { |
|
|
|
|
checkIndex = index; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
|
return MineVipView( |
|
|
|
|
vipLevel: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
? widget.arguments["rankLevel"] |
|
|
|
|
: position + 1, |
|
|
|
|
curLevel: widget.arguments["rankLevel"], |
|
|
|
|
tag: (widget.arguments["rankLevel"] == (position + 1) || |
|
|
|
|
!(ranks != null && ranks.isNotEmpty)) |
|
|
|
|
? "vip" |
|
|
|
|
: "", |
|
|
|
|
padding: 6.w, |
|
|
|
|
// rank: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
// ? 0 |
|
|
|
|
// : widget.arguments["expendAmount"] ?? 0, |
|
|
|
|
rankMax: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
? 0 |
|
|
|
|
: ranks[position].rankOrigin, |
|
|
|
|
createTime: widget.arguments["createTime"], |
|
|
|
|
showRank: false, |
|
|
|
|
price: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
? "0" |
|
|
|
|
: ranks[position].price, |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
itemCount: |
|
|
|
|
(ranks != null && ranks.isNotEmpty) ? ranks.length : 1, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
///会员权益 |
|
|
|
|
Container( |
|
|
|
@ -528,45 +531,47 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
)), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
if (ranks.length > checkIndex && |
|
|
|
|
widget.arguments["rankLevel"] < ranks[checkIndex].level && |
|
|
|
|
ranks[checkIndex].price != "0.00") |
|
|
|
|
Align( |
|
|
|
|
alignment: Alignment.bottomCenter, |
|
|
|
|
child: InkWell( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
buyRank(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
gradient: new LinearGradient( |
|
|
|
|
begin: Alignment.centerLeft, |
|
|
|
|
end: Alignment.centerRight, |
|
|
|
|
colors: [ |
|
|
|
|
Color(0xFFFFDCA1), |
|
|
|
|
Color(0xFFFAE4C0), |
|
|
|
|
]), |
|
|
|
|
), |
|
|
|
|
width: MediaQuery.of(context).size.width, |
|
|
|
|
padding: EdgeInsets.all(16), |
|
|
|
|
height: 54, |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
child: Text( |
|
|
|
|
"${S.of(context).lijikaitong}¥${ranks.length > checkIndex ? ranks[checkIndex].price : ""}/永久", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Color(0xFF4A4748), |
|
|
|
|
if (ranks.length > checkIndex && |
|
|
|
|
widget.arguments["rankLevel"] < ranks[checkIndex].level && |
|
|
|
|
ranks[checkIndex].price != "0.00") |
|
|
|
|
Align( |
|
|
|
|
alignment: Alignment.bottomCenter, |
|
|
|
|
child: InkWell( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
buyRank(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
gradient: new LinearGradient( |
|
|
|
|
begin: Alignment.centerLeft, |
|
|
|
|
end: Alignment.centerRight, |
|
|
|
|
colors: [ |
|
|
|
|
Color(0xFFFFDCA1), |
|
|
|
|
Color(0xFFFAE4C0), |
|
|
|
|
]), |
|
|
|
|
), |
|
|
|
|
width: MediaQuery.of(context).size.width, |
|
|
|
|
padding: EdgeInsets.all(16), |
|
|
|
|
height: 54, |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
child: Text( |
|
|
|
|
"${S.of(context).lijikaitong}¥${ranks.length > checkIndex ? ranks[checkIndex].price : ""}/永久", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Color(0xFF4A4748), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|