Commit 153beb76 authored by skeyboy's avatar skeyboy

android 订阅样式修改

parent ac4c07fb
......@@ -6,6 +6,8 @@ class GoodEntity {
String? _goodsName;
String? _goodsDesc;
double? _amount;
double? _originalPrice;
String? _dayDesc;
int? _integral;
String? _createTime;
String? _updateTime;
......@@ -17,8 +19,10 @@ class GoodEntity {
GoodEntity(
{int? id,
String? goodsName,
String? dayDesc,
String? goodsDesc,
double? amount,
double? originalPrice,
int? integral,
String? createTime,
String? updateTime,
......@@ -38,6 +42,9 @@ class GoodEntity {
if (amount != null) {
this._amount = amount;
}
if(originalPrice != null) {
_originalPrice = originalPrice;
}
if (integral != null) {
this._integral = integral;
}
......@@ -59,6 +66,9 @@ class GoodEntity {
if (count != null) {
this._count = count;
}
if(dayDesc != null){
_dayDesc = dayDesc;
}
}
int? get id => _id;
......@@ -69,6 +79,10 @@ class GoodEntity {
set goodsDesc(String? goodsDesc) => _goodsDesc = goodsDesc;
double? get amount => _amount;
set amount(double? amount) => _amount = amount;
double? get originalPrice => _originalPrice;
set originalPrice(double? originalPrice) => _originalPrice = originalPrice;
String? get dayDesc => _dayDesc;
set dayDesc(String? dayDesc) => _dayDesc = dayDesc;
int? get integral => _integral;
set integral(int? integral) => _integral = integral;
String? get createTime => _createTime;
......@@ -97,6 +111,8 @@ class GoodEntity {
_isShelf = json['isShelf'];
_goodsType = json['goodsType'];
_count = json['count'];
_originalPrice = json['originalPrice'];
_dayDesc = json['dayDesc'] ?? "限时特惠";
}
Map<String, dynamic> toJson() {
......
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_barrage/flutter_barrage.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_vibrate/flutter_vibrate.dart';
import 'package:get/get.dart';
import 'package:glassy/glassy_button.dart';
......@@ -200,8 +203,10 @@ class PayItemWidget extends GetView<AndroidPayListController> {
scrollDirection: Axis.horizontal,
child: IntrinsicHeight(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: controller.state.items.reversed
.map((element) => Container(
width: min(Get.width, 375).w / 4,
margin: const EdgeInsets.only(right: 10),
child: InkWell(
borderRadius: BorderRadius.circular(10),
......@@ -212,7 +217,7 @@ class PayItemWidget extends GetView<AndroidPayListController> {
},
child: Ink(
padding: const EdgeInsets.symmetric(
horizontal: 5, vertical: 10),
horizontal: 5, vertical: 20),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
// border: ,Color.argb(255, 62, 67, 95)
......@@ -249,10 +254,11 @@ class PayItemWidget extends GetView<AndroidPayListController> {
)),
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
MainAxisAlignment.start,
children: [
Text(
element.goodsName!,
maxLines: 1,
style: TextStyle(
fontWeight: FontWeight.bold,
color: controller.state
......@@ -264,6 +270,7 @@ class PayItemWidget extends GetView<AndroidPayListController> {
),
Text(
'¥${element.amount!}',
maxLines: 1,
style: TextStyle(
fontWeight: FontWeight.bold,
color: controller.state
......@@ -274,39 +281,67 @@ class PayItemWidget extends GetView<AndroidPayListController> {
: const Color.fromARGB(
255, 241, 197, 131)),
),
Container(
width: Get.width / 3.5,
child: Column(
children: element.goodsDesc!
.split('、')
.map((e) => Text(
e,
textAlign:
TextAlign.center,
style: TextStyle(
fontWeight:
FontWeight.bold,
color: controller
.state
.selectedItem
.id ==
element.id
? const Color
.fromARGB(
255,
230,
31,
32)
: const Color
.fromARGB(
255,
241,
197,
131)),
))
.toList(),
if (element.originalPrice != null)
Text(
'¥${element.originalPrice!}',
maxLines: 1,
style: TextStyle(
decoration:
TextDecoration.combine([
// TextDecoration.underline,
TextDecoration.lineThrough
]),
fontWeight: FontWeight.bold,
color: Color.fromARGB(
255, 140, 145, 151)),
),
),
if (element.dayDesc != null)
Text(
element.dayDesc!,
maxLines: 1,
style: TextStyle(
fontWeight: FontWeight.bold,
color: controller.state
.selectedItem.id ==
element.id
? const Color.fromARGB(
255, 230, 31, 32)
: const Color.fromARGB(
255, 241, 197, 131)),
),
// Container(
// width: Get.width / 3.5,
// child: Column(
// children: element.goodsDesc!
// .split('、')
// .map((e) => Text(
// e,
// textAlign:
// TextAlign.center,
// style: TextStyle(
// fontWeight:
// FontWeight.bold,
// color: controller
// .state
// .selectedItem
// .id ==
// element.id
// ? const Color
// .fromARGB(
// 255,
// 230,
// 31,
// 32)
// : const Color
// .fromARGB(
// 255,
// 241,
// 197,
// 131)),
// ))
// .toList(),
// ),
// ),
// Text(
// '¥${(double.parse(element.goodsDesc!) * 1.2).toStringAsFixed(2)}',
// style: TextStyle(
......
......@@ -690,13 +690,16 @@ class SignInPage extends GetView<SignInController> {
child: Container(
width: Get.width - 40,
height: 45,
child: ElevatedButton(
// style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Color(0xFF6F35A5))),
onPressed: () {
controller.handleSignIn();
},
child: Text(
"登录".toUpperCase(),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: ElevatedButton(
// style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Color(0xFF6F35A5))),
onPressed: () {
controller.handleSignIn();
},
child: Text(
"登录".toUpperCase(),
),
),
),
),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment