|
|
@@ -1,6 +1,7 @@
|
|
|
import 'package:electronic_assistant/base/base_page.dart';
|
|
|
import 'package:electronic_assistant/data/consts/Constants.dart';
|
|
|
import 'package:electronic_assistant/module/browser/view.dart';
|
|
|
+import 'package:electronic_assistant/router/app_pages.dart';
|
|
|
import 'package:electronic_assistant/utils/expand.dart';
|
|
|
import 'package:electronic_assistant/utils/toast_util.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
|
@@ -26,65 +27,73 @@ class MainDrawerView extends BasePage<MainDrawerController> {
|
|
|
SizedBox(height: 12.h),
|
|
|
buildUserInfoView(),
|
|
|
SizedBox(height: 12.h),
|
|
|
- Container(
|
|
|
- height: 72.w,
|
|
|
- decoration: BoxDecoration(
|
|
|
- borderRadius: BorderRadius.circular(12.w),
|
|
|
- border: Border.all(color: ColorName.white20, width: 2.w),
|
|
|
- gradient: LinearGradient(
|
|
|
- colors: ['#5B618D'.toColor(), '#283B58'.toColor()],
|
|
|
- begin: Alignment.centerLeft,
|
|
|
- end: Alignment.centerRight,
|
|
|
- transform: const GradientRotation(-1.64061),
|
|
|
- stops: const [0, 1.0],
|
|
|
- ),
|
|
|
- ),
|
|
|
- child: Row(
|
|
|
- children: [
|
|
|
- SizedBox(width: 16.w),
|
|
|
- IntrinsicHeight(
|
|
|
- child: Column(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
- children: [
|
|
|
- SizedBox(
|
|
|
- height: 18.h,
|
|
|
- child: Assets.images.iconChargeCenterTxt.image()),
|
|
|
- SizedBox(height: 4.h),
|
|
|
- Row(
|
|
|
- children: [
|
|
|
- Text(StringName.mainLoginChargeTips.tr,
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 12.sp, color: ColorName.white)),
|
|
|
- Text(
|
|
|
- '${controller.userInfo?.memberInfo?.electric ?? '0'}',
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 12.sp, color: ColorName.white))
|
|
|
- ],
|
|
|
- )
|
|
|
- ],
|
|
|
- ),
|
|
|
+ GestureDetector(
|
|
|
+ onTap: () {
|
|
|
+ Get.toNamed(RoutePath.store);
|
|
|
+ },
|
|
|
+ child: Container(
|
|
|
+ height: 72.w,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ borderRadius: BorderRadius.circular(12.w),
|
|
|
+ border: Border.all(color: ColorName.white20, width: 2.w),
|
|
|
+ gradient: LinearGradient(
|
|
|
+ colors: ['#5B618D'.toColor(), '#283B58'.toColor()],
|
|
|
+ begin: Alignment.centerLeft,
|
|
|
+ end: Alignment.centerRight,
|
|
|
+ transform: const GradientRotation(-1.64061),
|
|
|
+ stops: const [0, 1.0],
|
|
|
),
|
|
|
- const Spacer(),
|
|
|
- DecoratedBox(
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: Colors.white,
|
|
|
- borderRadius: BorderRadius.circular(12.w),
|
|
|
+ ),
|
|
|
+ child: Row(
|
|
|
+ children: [
|
|
|
+ SizedBox(width: 16.w),
|
|
|
+ IntrinsicHeight(
|
|
|
+ child: Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ SizedBox(
|
|
|
+ height: 18.h,
|
|
|
+ child: Assets.images.iconChargeCenterTxt.image()),
|
|
|
+ SizedBox(height: 4.h),
|
|
|
+ Row(
|
|
|
+ children: [
|
|
|
+ Text(StringName.mainLoginChargeTips.tr,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 12.sp, color: ColorName.white)),
|
|
|
+ Obx(() {
|
|
|
+ return Text(
|
|
|
+ '${controller.userInfo?.memberInfo?.electric ?? '0'}',
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 12.sp,
|
|
|
+ color: ColorName.white));
|
|
|
+ })
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
- child: Padding(
|
|
|
- padding: const EdgeInsets.symmetric(
|
|
|
- vertical: 4, horizontal: 11)
|
|
|
- .w,
|
|
|
- child: Text(
|
|
|
- StringName.mainGoCharge.tr,
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 14.sp,
|
|
|
- color: '#374668'.toColor(),
|
|
|
- fontWeight: FontWeight.bold),
|
|
|
+ const Spacer(),
|
|
|
+ DecoratedBox(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: Colors.white,
|
|
|
+ borderRadius: BorderRadius.circular(12.w),
|
|
|
+ ),
|
|
|
+ child: Padding(
|
|
|
+ padding: const EdgeInsets.symmetric(
|
|
|
+ vertical: 4, horizontal: 11)
|
|
|
+ .w,
|
|
|
+ child: Text(
|
|
|
+ StringName.mainGoCharge.tr,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 14.sp,
|
|
|
+ color: '#374668'.toColor(),
|
|
|
+ fontWeight: FontWeight.bold),
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
- ),
|
|
|
- SizedBox(width: 18.w),
|
|
|
- ],
|
|
|
+ SizedBox(width: 18.w),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
SizedBox(height: 12.h),
|