1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- import 'package:cpt_main/modules/feedback/feedback_page.dart';
- import 'package:cs_resources/theme/app_colors_theme.dart';
- import 'package:domain/entity/home_list_entity.dart';
- import 'package:flutter/material.dart';
- import 'package:shared/utils/util.dart';
- import 'package:widgets/ext/ex_widget.dart';
- import 'package:widgets/my_load_image.dart';
- import 'package:widgets/my_text_view.dart';
- class LastTransItem extends StatelessWidget {
- HomeListLatestTransactions lastTrans;
- LastTransItem({required this.lastTrans});
- @override
- Widget build(BuildContext context) {
- return Row(
- mainAxisSize: MainAxisSize.max,
- crossAxisAlignment: CrossAxisAlignment.center,
- mainAxisAlignment: MainAxisAlignment.start,
- children: [
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- MyTextView(
- lastTrans.title ?? "",
- fontSize: 15,
- textColor: context.appColors.textBlack,
- isFontMedium: true,
- ),
- MyTextView(
- lastTrans.price ?? "",
- fontSize: 15,
- marginTop: 5,
- textColor: context.appColors.textBlack,
- isFontMedium: true,
- ),
- ],
- ).expanded(),
- Container(
- margin: const EdgeInsets.only(left: 10),
- padding: const EdgeInsets.symmetric(horizontal: 5),
- height: 45,
- decoration: BoxDecoration(
- color: context.appColors.lightPurpleBg,
- borderRadius: BorderRadius.circular(5.0), // 5个圆角
- ),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.center,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- MyTextView(
- "\$${lastTrans.price ?? "-"}",
- fontSize: 17,
- textColor: context.appColors.textBlack,
- isFontMedium: true,
- ),
- //单元,每个月或者没有单元
- // Visibility(
- // visible: Utils.isNotEmpty(lastTrans['unit']),
- // child: MyTextView(
- // lastTrans['unit'],
- // fontSize: 12,
- // textColor: context.appColors.textBlack,
- // isFontRegular: true,
- // ))
- ],
- ),
- ).constrained(minWidth: 92),
- ],
- );
- }
- }
|