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.
128 lines
4.1 KiB
128 lines
4.1 KiB
3 years ago
|
import 'package:flutter/material.dart';
|
||
|
import 'package:huixiang/generated/l10n.dart';
|
||
|
import 'package:huixiang/utils/font_weight.dart';
|
||
3 years ago
|
import 'package:huixiang/view_widget/login_tips_dialog.dart';
|
||
3 years ago
|
import 'package:shared_preferences/shared_preferences.dart';
|
||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||
|
|
||
3 years ago
|
class WalletCoupon extends StatefulWidget {
|
||
3 years ago
|
@override
|
||
|
State<StatefulWidget> createState() {
|
||
3 years ago
|
return _WalletCoupon();
|
||
3 years ago
|
}
|
||
|
}
|
||
|
|
||
3 years ago
|
class _WalletCoupon extends State<WalletCoupon> {
|
||
3 years ago
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Container(
|
||
3 years ago
|
margin: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 6.h),
|
||
3 years ago
|
padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h),
|
||
|
decoration: BoxDecoration(
|
||
|
color: Colors.white,
|
||
|
borderRadius: BorderRadius.circular(8),
|
||
|
boxShadow: [
|
||
|
BoxShadow(
|
||
|
color: Colors.black.withAlpha(12),
|
||
|
offset: Offset(0, 3),
|
||
|
blurRadius: 14,
|
||
|
spreadRadius: 0,
|
||
3 years ago
|
),
|
||
3 years ago
|
],
|
||
|
),
|
||
|
child: Row(
|
||
|
children: [
|
||
|
Expanded(
|
||
|
flex: 1,
|
||
|
child: GestureDetector(
|
||
|
onTap: () {
|
||
|
SharedPreferences.getInstance().then((value) {
|
||
|
if (value.getString("token") == null ||
|
||
|
value.getString("token") == "") {
|
||
3 years ago
|
LoginTipsDialog().show(context);
|
||
3 years ago
|
return;
|
||
|
}
|
||
3 years ago
|
Navigator.of(context).pushNamed('/router/roll_center_page');
|
||
3 years ago
|
});
|
||
|
},
|
||
|
child: Row(
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
children: [
|
||
|
Image.asset(
|
||
3 years ago
|
"assets/image/icon_mine_invoice_assistant.png",
|
||
|
width: 48.h,
|
||
|
height: 48.h,
|
||
3 years ago
|
),
|
||
|
SizedBox(
|
||
|
width: 12.w,
|
||
|
),
|
||
3 years ago
|
Expanded(
|
||
|
child: Text(
|
||
|
S.of(context).lingquanzhongxin,
|
||
|
overflow: TextOverflow.ellipsis,
|
||
|
style: TextStyle(
|
||
|
fontWeight: MyFontWeight.medium,
|
||
|
fontSize: 16.sp,
|
||
|
color: Color(0xFF353535),
|
||
|
),
|
||
3 years ago
|
),
|
||
3 years ago
|
flex: 1,
|
||
|
),
|
||
3 years ago
|
],
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
Container(
|
||
|
width: 2.w,
|
||
|
height: 32.h,
|
||
|
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||
|
color: Color(0xFFF7F7F7),
|
||
|
),
|
||
|
Expanded(
|
||
|
flex: 1,
|
||
|
child: GestureDetector(
|
||
|
onTap: () {
|
||
|
SharedPreferences.getInstance().then((value) {
|
||
|
if (value.getString("token") == null ||
|
||
|
value.getString("token") == "") {
|
||
3 years ago
|
LoginTipsDialog().show(context);
|
||
3 years ago
|
return;
|
||
|
}
|
||
3 years ago
|
Navigator.of(context).pushNamed('/router/mine_wallet');
|
||
3 years ago
|
});
|
||
|
},
|
||
|
child: Row(
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
children: [
|
||
|
Image.asset(
|
||
3 years ago
|
"assets/image/icon_mine_wallet.png",
|
||
|
width: 48.h,
|
||
|
height: 48.h,
|
||
3 years ago
|
),
|
||
|
SizedBox(
|
||
|
width: 12.w,
|
||
|
),
|
||
3 years ago
|
Expanded(
|
||
|
child: Text(
|
||
|
S.of(context).wodeqianbao,
|
||
|
overflow: TextOverflow.ellipsis,
|
||
|
style: TextStyle(
|
||
|
fontWeight: MyFontWeight.medium,
|
||
|
fontSize: 16.sp,
|
||
|
color: Color(0xFF353535),
|
||
|
),
|
||
3 years ago
|
),
|
||
3 years ago
|
flex: 1,
|
||
3 years ago
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|