|
|
@ -1,8 +1,10 @@
|
|
|
|
import 'dart:convert';
|
|
|
|
import 'dart:convert';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/pages/activities_page/activities_details_page/activities_details_page.dart';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/pages/goods_details/goods_details_page.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:image_stack/image_stack.dart';
|
|
|
|
import 'package:image_stack/image_stack.dart';
|
|
|
|
import 'package:akuCommunity/utils/screenutil.dart';
|
|
|
|
import 'package:akuCommunity/utils/headers.dart';
|
|
|
|
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
|
|
|
|
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
|
|
|
|
import 'package:akuCommunity/routers/page_routers.dart';
|
|
|
|
import 'package:akuCommunity/routers/page_routers.dart';
|
|
|
|
|
|
|
|
|
|
|
@ -32,29 +34,28 @@ class _HomeCardState extends State<HomeCard> {
|
|
|
|
"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3604827221,1047385274&fm=26&gp=0.jpg",
|
|
|
|
"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3604827221,1047385274&fm=26&gp=0.jpg",
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Widget _button(String buttonName) {
|
|
|
|
Widget _button(String buttonName) {
|
|
|
|
return InkWell(
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
switch (widget.isActivity) {
|
|
|
|
switch (widget.isActivity) {
|
|
|
|
case true:
|
|
|
|
case true:
|
|
|
|
Navigator.pushNamed(
|
|
|
|
ActivitiesDetailsPage(
|
|
|
|
context, PageName.activities_details_page.toString(),
|
|
|
|
bundle: Bundle()
|
|
|
|
arguments: Bundle()
|
|
|
|
..putMap('details', {
|
|
|
|
..putMap('details', {
|
|
|
|
'title': widget.title,
|
|
|
|
'title': widget.title,
|
|
|
|
'imagePath': widget.imagePath,
|
|
|
|
'imagePath': widget.imagePath,
|
|
|
|
'isOver': false,
|
|
|
|
'isOver': false,
|
|
|
|
'isVoteOver': false,
|
|
|
|
'isVoteOver': false,
|
|
|
|
'isVote': false,
|
|
|
|
'isVote': false,
|
|
|
|
'memberList': images
|
|
|
|
'memberList': images
|
|
|
|
}),
|
|
|
|
}));
|
|
|
|
).to;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case false:
|
|
|
|
case false:
|
|
|
|
var shopInfo;
|
|
|
|
var shopInfo;
|
|
|
|
shopInfo = {
|
|
|
|
shopInfo = {
|
|
|
|
'itemid': '1',
|
|
|
|
'itemid': '1',
|
|
|
|
'itemtitle':widget.title,
|
|
|
|
'itemtitle': widget.title,
|
|
|
|
'taobao_image': "${widget.imagePath},${widget.imagePath}",
|
|
|
|
'taobao_image': "${widget.imagePath},${widget.imagePath}",
|
|
|
|
'itemprice': '69.9',
|
|
|
|
'itemprice': '69.9',
|
|
|
|
'itemshorttitle': widget.title,
|
|
|
|
'itemshorttitle': widget.title,
|
|
|
@ -62,10 +63,10 @@ class _HomeCardState extends State<HomeCard> {
|
|
|
|
'itemdesc': widget.title,
|
|
|
|
'itemdesc': widget.title,
|
|
|
|
'itempic': widget.imagePath
|
|
|
|
'itempic': widget.imagePath
|
|
|
|
};
|
|
|
|
};
|
|
|
|
Navigator.pushNamed(context, PageName.goods_details_page.toString(),
|
|
|
|
GoodsDetailsPage(
|
|
|
|
arguments: Bundle()
|
|
|
|
bundle: Bundle()
|
|
|
|
..putString(
|
|
|
|
..putString('shoplist', json.encode(shopInfo).toString()),
|
|
|
|
'shoplist', json.encode(shopInfo).toString()));
|
|
|
|
).to;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -76,8 +77,7 @@ class _HomeCardState extends State<HomeCard> {
|
|
|
|
alignment: Alignment.center,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Color(0xffffc40c),
|
|
|
|
color: Color(0xffffc40c),
|
|
|
|
borderRadius:
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(22.w)),
|
|
|
|
BorderRadius.all(Radius.circular(22.w)),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 8.w),
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 8.w),
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
@ -107,8 +107,7 @@ class _HomeCardState extends State<HomeCard> {
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(8.w)),
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(8.w)),
|
|
|
|
border:
|
|
|
|
border: Border.all(color: Color(0xffe8e8e8), width: 2.w),
|
|
|
|
Border.all(color: Color(0xffe8e8e8), width: 2.w),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
padding: EdgeInsets.only(bottom: 24.w),
|
|
|
|
padding: EdgeInsets.only(bottom: 24.w),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|