# Conflicts:
#	lib/pages/life_pay/life_pay_page.dart
hmxc
张萌 4 years ago
commit 7fd20e9b98

@ -32,7 +32,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 29
compileSdkVersion 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@ -46,7 +46,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.akuCommunity.app"
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
ndk {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,78 +0,0 @@
//TODO CLEAN BOTTOM CODES.
@Deprecated("sh*t assets_image need to be cleaned.")
class AssetsImage {
static const LOCATION = 'assets/icons/location.png';
static const HOUSE = 'assets/icons/house.png';
static const PHONE = 'assets/icons/phone.png';
static const IMAGEADD = 'assets/icons/img_add.png';
static const PROPERTY = 'assets/icons/property.png';
static const SYSTEMNOTICE = 'assets/icons/system_notice.png';
static const COMMENTNOTICE = 'assets/icons/comment_notice.png';
static const SHOPNOTICE = 'assets/icons/shop_notice.png';
static const MINEBG = 'assets/images/mine_bg.png';
static const MEMBERBG = 'assets/images/member_bg.png';
static const HOUSEHEADER = 'assets/images/house_header.png';
static const HOUSEATTESTATION = 'assets/images/house_attestation.png';
static const CARHEADER = 'assets/images/car_header.png';
static const LOGO = 'assets/images/logo.png';
static const PHONELOGO = 'assets/images/phone_logo.png';
static const CODELOGO = 'assets/images/code_logo.png';
static const LICENSE = 'assets/images/license.png';
static const LICENSEBACK = 'assets/images/license_back.png';
static const DRAWINGS = 'assets/images/drawings.png';
static const APPLICATION = 'assets/images/application.png';
static const COMMITMENT = 'assets/images/commitment.png';
static const WXPAY = 'assets/images/wxpay.png';
static const APPADD = 'assets/icons/app_add.png';
static const APPREDUCE = 'assets/icons/app_reduce.png';
static const COMPLAINT = 'assets/icons/complaint.png';
static const CONSULT = 'assets/icons/consult.png';
static const LIKE = 'assets/icons/like.png';
static const PROPOSAL = 'assets/icons/proposal.png';
static const List<Map<String, dynamic>> shopGridList = [
{'title': '居家生活', 'imagePath': 'assets/icons/tool_jjsh.png'},
{'title': '数码家电', 'imagePath': 'assets/icons/tool_smjd.png'},
{'title': '休闲副食', 'imagePath': 'assets/icons/tool_xxfs.png'},
{'title': '滋补保健', 'imagePath': 'assets/icons/tool_zbbj.png'},
{'title': '彩妆香水', 'imagePath': 'assets/icons/tool_czxs.png'},
{'title': '服饰箱包', 'imagePath': 'assets/icons/tool_fsxb.png'},
{'title': '母婴玩具', 'imagePath': 'assets/icons/tool_mywj.png'},
{'title': '饮料酒水', 'imagePath': 'assets/icons/tool_yljs.png'},
];
static const List<Map<String, dynamic>> orderGridList = [
{'title': '待付款', 'imagePath': 'assets/icons/user_icon_dfk.png'},
{'title': '待发货', 'imagePath': 'assets/icons/user_icon_dfh.png'},
{'title': '待收货', 'imagePath': 'assets/icons/user_icon_dsh.png'},
{'title': '待评价', 'imagePath': 'assets/icons/user_icon_dpj.png'},
{'title': '售后', 'imagePath': 'assets/icons/user_icon_sh.png'},
];
}

@ -444,36 +444,6 @@ class R {
/// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/images/wxpay.png)
static const String ASSETS_IMAGES_WXPAY_PNG = 'assets/images/wxpay.png';
/// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/json/czxs.json)
static const String ASSETS_JSON_CZXS_JSON = 'assets/json/czxs.json';
/// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/json/fsxb.json)
static const String ASSETS_JSON_FSXB_JSON = 'assets/json/fsxb.json';
/// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/json/jjsh.json)
static const String ASSETS_JSON_JJSH_JSON = 'assets/json/jjsh.json';
/// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/json/mywj.json)
static const String ASSETS_JSON_MYWJ_JSON = 'assets/json/mywj.json';
/// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/json/shop.json)
static const String ASSETS_JSON_SHOP_JSON = 'assets/json/shop.json';
/// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/json/shopclass.json)
static const String ASSETS_JSON_SHOPCLASS_JSON = 'assets/json/shopclass.json';
/// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/json/smjd.json)
static const String ASSETS_JSON_SMJD_JSON = 'assets/json/smjd.json';
/// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/json/xxfs.json)
static const String ASSETS_JSON_XXFS_JSON = 'assets/json/xxfs.json';
/// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/json/yljs.json)
static const String ASSETS_JSON_YLJS_JSON = 'assets/json/yljs.json';
/// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/json/zbbj.json)
static const String ASSETS_JSON_ZBBJ_JSON = 'assets/json/zbbj.json';
/// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/static/car_card_grey.webp)
static const String ASSETS_STATIC_CAR_CARD_GREY_WEBP =
'assets/static/car_card_grey.webp';

@ -238,7 +238,7 @@ class _Community {
class _Upload {
///
String get uploadArticle => '/user/upload/uploadArticle';
String get uploadAdvice => '/user/upload/uploadAdvice';
///
String get uploadAvatar => '/user/upload/appHeadSculpture';

@ -1,3 +0,0 @@
// class AppValues {
// static const String plotName = '人才公寓智慧小区';
// }

@ -1,9 +1,6 @@
import 'package:akuCommunity/ui/profile/car/car_manage_page.dart';
import 'package:akuCommunity/ui/profile/car_parking/car_parking_page.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/const/resource.dart';
import 'package:akuCommunity/pages/address_page/address_page.dart';
import 'package:akuCommunity/pages/convenient_phone/convenient_phone_page.dart';
import 'package:akuCommunity/pages/event_activity/event_voting_page.dart';
import 'package:akuCommunity/pages/goods_deto_page/goods_deto_page.dart';
@ -11,7 +8,6 @@ import 'package:akuCommunity/pages/goods_manage_page/goods_manage_page.dart';
import 'package:akuCommunity/pages/industry_committee/industry_committee_page.dart';
import 'package:akuCommunity/pages/life_pay/life_pay_page.dart';
import 'package:akuCommunity/pages/one_alarm/widget/alarm_page.dart';
import 'package:akuCommunity/pages/open_door_page/open_door_page.dart';
import 'package:akuCommunity/pages/opening_code_page/opening_code_page.dart';
import 'package:akuCommunity/pages/setting_page/settings_page.dart';
import 'package:akuCommunity/pages/things_page/fixed_submit_page.dart';
@ -20,6 +16,8 @@ import 'package:akuCommunity/ui/community/activity/activity_list_page.dart';
import 'package:akuCommunity/ui/home/application/all_application.dart';
import 'package:akuCommunity/ui/manager/advice/advice_page.dart';
import 'package:akuCommunity/ui/manager/questionnaire/questionnaire_page.dart';
import 'package:akuCommunity/ui/profile/car/car_manage_page.dart';
import 'package:akuCommunity/ui/profile/car_parking/car_parking_page.dart';
import 'package:akuCommunity/ui/profile/house/house_owners_page.dart';
///
@ -55,7 +53,7 @@ class AO {
///
List<AO> appObjects = [
AO('一键开门', R.ASSETS_APPLICATIONS_OEPN_DOOR_PNG, () => OpenDoorPage()),
AO('一键开门', R.ASSETS_APPLICATIONS_OEPN_DOOR_PNG, () => Scaffold()),
AO('开门码', R.ASSETS_APPLICATIONS_DOOR_CODE_PNG, () => OpeningCodePage()),
AO('访客邀请', R.ASSETS_APPLICATIONS_VISITOR_INVITE_PNG,
() => VisitorAccessPage()),
@ -83,7 +81,7 @@ List<AO> userAppObjects = [
AO('社区活动', R.ASSETS_ICONS_USER_ICON_WDSQHD_PNG, () => ActivityListPage()),
AO('我的缴费', R.ASSETS_ICONS_USER_ICON_WDJF_PNG, () => LifePayPage()),
AO('我的报修', R.ASSETS_ICONS_USER_ICON_WDBX_PNG, () => FixedSubmitPage()),
AO('我的地址', R.ASSETS_ICONS_USER_ICON_WDDZ_PNG, () => AddressPage()),
AO('我的地址', R.ASSETS_ICONS_USER_ICON_WDDZ_PNG, () => Scaffold()),
AO('我的管家', R.ASSETS_ICONS_USER_ICON_WDGJ_PNG, () => Scaffold()),
AO('我的访客', R.ASSETS_ICONS_USER_ICON_WDFK_PNG, () => VisitorAccessPage()),
AO('设置', R.ASSETS_ICONS_USER_ICON_SZ_PNG, () => SettingsPage()),

@ -13,7 +13,6 @@ import 'package:provider/provider.dart';
import 'package:akuCommunity/constants/app_theme.dart';
import 'package:akuCommunity/pages/splash/splash_page.dart';
import 'package:akuCommunity/provider/app_provider.dart';
import 'package:akuCommunity/provider/cart.dart';
import 'package:akuCommunity/provider/sign_up_provider.dart';
import 'package:akuCommunity/provider/user_provider.dart';
import 'package:akuCommunity/utils/developer_util.dart';
@ -72,7 +71,6 @@ class _MyAppState extends State<MyApp> {
Widget build(BuildContext context) {
return MultiProvider(
providers: [
ChangeNotifierProvider(create: (context) => CartProvidde()),
ChangeNotifierProvider(create: (context) => UserProvider()),
ChangeNotifierProvider(create: (context) => AppProvider()),
ChangeNotifierProvider(create: (context) => SignUpProvider()),

@ -9,7 +9,7 @@ class AkuShopClassModel {
cid = json['cid'];
mainName = json['main_name'];
if (json['data'] != null) {
data = new List<Data>();
data = [];
json['data'].forEach((v) {
data.add(new Data.fromJson(v));
});
@ -36,7 +36,7 @@ class Data {
Data.fromJson(Map<String, dynamic> json) {
nextName = json['next_name'];
if (json['info'] != null) {
info = new List<Info>();
info = [];
json['info'].forEach((v) {
info.add(new Info.fromJson(v));
});

@ -1,17 +1,18 @@
class ImgModel {
String url;
String size;
int longs;
int paragraph;
double longs;
double paragraph;
int sort;
double get aspect => paragraph / longs;
ImgModel({this.url, this.size, this.longs, this.paragraph, this.sort});
ImgModel.fromJson(Map<String, dynamic> json) {
url = json['url'];
size = json['size'];
longs = json['longs'];
paragraph = json['paragraph'];
longs = json['longs'] + .0;
paragraph = json['paragraph'] + .0;
sort = json['sort'];
}
@ -21,6 +22,12 @@ class ImgModel {
return models.first.url ?? '';
}
static ImgModel firstModel(List<ImgModel> models) {
if (models == null) return null;
if (models.isEmpty) return null;
return models.first;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['url'] = this.url;

@ -40,14 +40,14 @@ class ActivityDetailModel {
registrationEndTime = json['registrationEndTime'];
countRegistration = json['countRegistration'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});
} else
imgUrls = [];
if (json['headImgURls'] != null) {
headImgURls = new List<ImgModel>();
headImgURls = [];
json['headImgURls'].forEach((v) {
headImgURls.add(new ImgModel.fromJson(v));
});

@ -33,7 +33,7 @@ class ActivityItemModel {
registrationStartTime = json['registrationStartTime'];
registrationEndTime = json['registrationEndTime'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});
@ -41,7 +41,7 @@ class ActivityItemModel {
imgUrls = [];
}
if (json['headImgURls'] != null) {
headImgURls = new List<ImgModel>();
headImgURls =[];
json['headImgURls'].forEach((v) {
headImgURls.add(new ImgModel.fromJson(v));
});

@ -11,7 +11,7 @@ class ActivityPeopleModel {
name = json['name'];
tel = json['tel'];
if (json['imgUrl'] != null) {
imgUrl = new List<ImgUrl>();
imgUrl = [];
json['imgUrl'].forEach((v) {
imgUrl.add(new ImgUrl.fromJson(v));
});

@ -26,7 +26,7 @@ class BoardDetailModel {
fileDocName = json['fileDocName'];
releaseTime = json['releaseTime'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});

@ -17,7 +17,7 @@ class BoardItemModel {
title = json['title'];
releaseTime = json['releaseTime'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls =[];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});

@ -29,7 +29,7 @@ class CommunityTopicModel {
summary = json['summary'];
content = json['content'];
if (json['imgUrl'] != null) {
imgUrl = new List<ImgModel>();
imgUrl = [];
json['imgUrl'].forEach((v) {
imgUrl.add(new ImgModel.fromJson(v));
});

@ -40,28 +40,28 @@ class EventItemModel {
gambitTitle = json['gambitTitle'];
createDate = json['createDate'];
if (json['likeNames'] != null) {
likeNames = new List<LikeNames>();
likeNames = [];
json['likeNames'].forEach((v) {
likeNames.add(new LikeNames.fromJson(v));
});
} else
likeNames = [];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});
} else
imgUrls = [];
if (json['headSculptureImgUrl'] != null) {
headSculptureImgUrl = new List<ImgModel>();
headSculptureImgUrl = [];
json['headSculptureImgUrl'].forEach((v) {
headSculptureImgUrl.add(new ImgModel.fromJson(v));
});
} else
headSculptureImgUrl = [];
if (json['gambitThemeCommentVoList'] != null) {
gambitThemeCommentVoList = new List<GambitThemeCommentVoList>();
gambitThemeCommentVoList = [];
json['gambitThemeCommentVoList'].forEach((v) {
gambitThemeCommentVoList.add(new GambitThemeCommentVoList.fromJson(v));
});

@ -22,7 +22,7 @@ class MyEventItemModel {
id = json['id'];
content = json['content'];
if (json['imgUrl'] != null) {
imgUrl = new List<ImgModel>();
imgUrl = [];
json['imgUrl'].forEach((v) {
imgUrl.add(new ImgModel.fromJson(v));
});

@ -33,7 +33,7 @@ class AppAdviceDetailVo {
? new AppAdviceVo.fromJson(json['appAdviceVo'])
: null;
if (json['appAdviceContentVos'] != null) {
appAdviceContentVos = new List<AppAdviceContentVos>();
appAdviceContentVos = [];
json['appAdviceContentVos'].forEach((v) {
appAdviceContentVos.add(new AppAdviceContentVos.fromJson(v));
});
@ -78,7 +78,7 @@ class AppAdviceVo {
content = json['content'];
createDate = json['createDate'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});

@ -13,7 +13,7 @@ class ArticleBorrowModel {
name = json['name'];
quantity = json['quantity'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});

@ -28,14 +28,14 @@ class EventVotingModel {
endDate = json['endDate'];
status = json['status'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});
} else
imgUrls = [];
if (json['headImgURls'] != null) {
headImgURls = new List<ImgModel>();
headImgURls = [];
json['headImgURls'].forEach((v) {
headImgURls.add(new ImgModel.fromJson(v));
});

@ -17,7 +17,7 @@ class FixedDetailModel {
? new AppReportRepairVo.fromJson(json['appReportRepairVo'])
: null;
if (json['appProcessRecordVo'] != null) {
appProcessRecordVo = new List<AppProcessRecordVo>();
appProcessRecordVo = [];
json['appProcessRecordVo'].forEach((v) {
appProcessRecordVo.add(new AppProcessRecordVo.fromJson(v));
});
@ -61,7 +61,7 @@ class AppReportRepairVo {
status = json['status'];
reportDetail = json['reportDetail'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});

@ -27,7 +27,7 @@ class GoodsOutModel {
status = json['status'];
movingCompanyTel = json['movingCompanyTel'];
if (json['imgUrl'] != null) {
imgUrl = new List<ImgUrl>();
imgUrl = [];
json['imgUrl'].forEach((v) {
imgUrl.add(new ImgUrl.fromJson(v));
});

@ -9,7 +9,7 @@ class LifePayModel {
years = json['years'];
paymentNum = json['paymentNum'];
if (json['dailyPaymentTypeVos'] != null) {
dailyPaymentTypeVos = new List<DailyPaymentTypeVos>();
dailyPaymentTypeVos = [];
json['dailyPaymentTypeVos'].forEach((v) {
dailyPaymentTypeVos.add(new DailyPaymentTypeVos.fromJson(v));
});
@ -39,7 +39,7 @@ class DailyPaymentTypeVos {
id = json['id'];
name = json['name'];
if (json['detailedVoList'] != null) {
detailedVoList = new List<DetailedVoList>();
detailedVoList = [];
json['detailedVoList'].forEach((v) {
detailedVoList.add(new DetailedVoList.fromJson(v));
});
@ -69,7 +69,7 @@ class DetailedVoList {
groupId = json['groupId'];
paymentPrice = json['paymentPrice'];
if (json['detailsVoList'] != null) {
detailsVoList = new List<DetailsVoList>();
detailsVoList = [];
json['detailsVoList'].forEach((v) {
detailsVoList.add(new DetailsVoList.fromJson(v));
});

@ -5,7 +5,7 @@ class MovingCompanyModel {
MovingCompanyModel.fromJson(Map<String, dynamic> json) {
if (json['appMovingCompanyVoList'] != null) {
appMovingCompanyVoList = new List<AppMovingCompanyVoList>();
appMovingCompanyVoList = [];
json['appMovingCompanyVoList'].forEach((v) {
appMovingCompanyVoList.add(new AppMovingCompanyVoList.fromJson(v));
});

@ -31,14 +31,14 @@ class QuestionnaireModel {
status = json['status'];
answerNum = json['answerNum'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});
} else
imgUrls = [];
if (json['headImgURls'] != null) {
headImgURls = new List<ImgModel>();
headImgURls = [];
json['headImgURls'].forEach((v) {
headImgURls.add(new ImgModel.fromJson(v));
});

@ -23,13 +23,13 @@ class QuestionnaireDetialModel {
beginDate = json['beginDate'];
endDate = json['endDate'];
if (json['questionnaireTopicVoList'] != null) {
questionnaireTopicVoList = new List<QuestionnaireTopicVoList>();
questionnaireTopicVoList = [];
json['questionnaireTopicVoList'].forEach((v) {
questionnaireTopicVoList.add(new QuestionnaireTopicVoList.fromJson(v));
});
}
if (json['voResourcesImgList'] != null) {
voResourcesImgList = new List<VoResourcesImgList>();
voResourcesImgList = [];
json['voResourcesImgList'].forEach((v) {
voResourcesImgList.add(new VoResourcesImgList.fromJson(v));
});
@ -70,7 +70,7 @@ class QuestionnaireTopicVoList {
type = json['type'];
topic = json['topic'];
if (json['questionnaireChoiceVoList'] != null) {
questionnaireChoiceVoList = new List<QuestionnaireChoiceVoList>();
questionnaireChoiceVoList = [];
json['questionnaireChoiceVoList'].forEach((v) {
questionnaireChoiceVoList
.add(new QuestionnaireChoiceVoList.fromJson(v));

@ -7,7 +7,7 @@ class QuestionnaireSubmitModel {
QuestionnaireSubmitModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
if (json['appQuestionnaireAnswerSubmits'] != null) {
appQuestionnaireAnswerSubmits = new List<AppQuestionnaireAnswerSubmits>();
appQuestionnaireAnswerSubmits = [];
json['appQuestionnaireAnswerSubmits'].forEach((v) {
appQuestionnaireAnswerSubmits
.add(new AppQuestionnaireAnswerSubmits.fromJson(v));

@ -28,7 +28,7 @@ class SuggestionOrComplainModel {
score = json['score'];
createDate = DateUtil.getDateTime(json['createDate']);
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});

@ -31,14 +31,14 @@ class VotingDetailModel {
status = json['status'];
totals = json['totals'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});
} else
imgUrls = [];
if (json['appVoteCandidateVos'] != null) {
appVoteCandidateVos = new List<AppVoteCandidateVos>();
appVoteCandidateVos = [];
json['appVoteCandidateVos'].forEach((v) {
appVoteCandidateVos.add(new AppVoteCandidateVos.fromJson(v));
});
@ -104,7 +104,7 @@ class AppVoteCandidateVos {
name = json['name'];
total = json['total'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});

@ -1,5 +1,6 @@
import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class CarParkingModel {

@ -16,7 +16,7 @@ class FixedSubmitModel {
status = json['status'];
reportDetail = json['reportDetail'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});

@ -1,6 +1,7 @@
import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart';
class HouseModel {
int id;
String roomName;

@ -1,136 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'widget/address_edit_item.dart';
class AddressEditPage extends StatefulWidget {
final Bundle bundle;
AddressEditPage({Key key, this.bundle}) : super(key: key);
@override
_AddressEditPageState createState() => _AddressEditPageState();
}
class _AddressEditPageState extends State<AddressEditPage> {
GlobalKey _formKey = new GlobalKey<FormState>();
bool isDefault = false;
Widget _containerSelectDefault() {
return Container(
color: Colors.white,
height: 96.w,
padding: EdgeInsets.symmetric(
vertical: 28.w,
horizontal: 32.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'设为默认地址',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
InkWell(
onTap: () {
setState(() {
isDefault = !isDefault;
});
},
child: CupertinoSwitch(
value: isDefault,
activeColor: Color(0xffffc40c), //
onChanged: (bool val) {
setState(() {
isDefault = !isDefault;
});
},
),
),
],
),
);
}
Widget _containerDelete() {
return InkWell(
onTap: () {},
child: Container(
color: Colors.white,
height: 96.w,
padding: EdgeInsets.symmetric(
vertical: 28.w,
horizontal: 32.w,
),
alignment: Alignment.center,
child: Text(
'删除地址',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xffe60e0e),
),
),
),
);
}
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '${widget.bundle.getMap('details')['title']}',
actions: [
InkWell(
onTap: () {
Get.back();
},
child: Container(
height: 98.w,
width: 48.w + 32.w * 2,
alignment: Alignment.center,
child: '保存'.text.color(Color(0xFFFFC40C)).size(24.sp).make()),
)
],
body: SingleChildScrollView(
physics: NeverScrollableScrollPhysics(),
child: Container(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child: Column(
children: [
Form(
key: _formKey,
child: Column(
children: [
AddressEditItem(addressInfo: {
'name': widget.bundle.getMap('details')['name'],
'phone': widget.bundle.getMap('details')['phone'],
'address': widget.bundle.getMap('details')['address']
}),
],
),
),
SizedBox(height: 66.w),
_containerSelectDefault(),
SizedBox(height: 66.w),
widget.bundle.getMap('details')['isDelete']
? _containerDelete()
: SizedBox(),
],
),
),
),
),
);
}
}

@ -1,60 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'widget/address_item.dart';
class AddressPage extends StatefulWidget {
AddressPage({Key key}) : super(key: key);
@override
_AddressPageState createState() => _AddressPageState();
}
class _AddressPageState extends State<AddressPage> {
List _addressInfoList = [
{
'name': '马泽鹏',
'phone': '18868741879',
'address': '广东省深圳市福田区福华路8号',
'isDefualt': true
},
{
'name': '王珂',
'phone': '13868741123',
'address': '广东省深圳市福田区红荔西路8007号',
'isDefualt': false
},
{
'name': '叶一样',
'phone': '13944743213',
'address': '广东省深圳市布吉街道布沙路大芬油画村对面',
'isDefualt': false
},
];
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '我的收货地址',
actions: [
InkWell(
onTap: () {},
child: '添加新地址'.text.black.size(24.sp).make(),
)
],
body: ListView.builder(
itemBuilder: (BuildContext context, int index) => AddressItem(
name: _addressInfoList[index]['name'],
phone: _addressInfoList[index]['phone'],
address: _addressInfoList[index]['address'],
isDefualt: _addressInfoList[index]['isDefualt'],
),
itemCount: _addressInfoList.length,
),
);
}
}

@ -1,103 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:akuCommunity/utils/headers.dart';
class AddressEditItem extends StatefulWidget {
final Map addressInfo;
AddressEditItem({Key key, this.addressInfo}) : super(key: key);
@override
_AddressEditItemState createState() => _AddressEditItemState();
}
class _AddressEditItemState extends State<AddressEditItem> {
TextEditingController _userName = new TextEditingController();
TextEditingController _userPhone = new TextEditingController();
TextEditingController _userAddress = new TextEditingController();
TextEditingController _userAddressDetail = new TextEditingController();
RegExp phoneReg = RegExp(
'^((13[0-9])|(15[^4])|(16[0-9])|(17[0-9])|(18[0-9])|(19[8-9])|(147,145))\\d{8}\$');
@override
void initState() {
super.initState();
_userName = new TextEditingController(text: widget.addressInfo['name']);
_userPhone = new TextEditingController(text: widget.addressInfo['phone']);
_userAddress =
new TextEditingController(text: widget.addressInfo['address']);
_userAddressDetail =
new TextEditingController(text: widget.addressInfo['address']);
}
@override
Widget build(BuildContext context) {
List<Map<String, dynamic>> _listTextField = [
{'title': '收货人', 'hintText': '请输入', 'controller': _userName},
{'title': '手机号码', 'hintText': '请输入', 'controller': _userPhone},
{'title': '所在地区', 'hintText': '请输入', 'controller': _userAddress},
{
'title': '详细地址',
'hintText': '比如街道、门牌号、小区、楼栋号',
'controller': _userAddressDetail
},
];
List<Widget> _listTextFieldView() {
return _listTextField
.map((item) => TextFormField(
inputFormatters: item['title'] == '手机号码'
? [
LengthLimitingTextInputFormatter(11),
FilteringTextInputFormatter.digitsOnly
]
: [],
keyboardType: item['title'] == '手机号码'
? TextInputType.number
: TextInputType.name,
cursorColor: Color(0xffffc40c),
style: TextStyle(fontSize: 28.sp),
controller: item['controller'],
onChanged: (String value) {},
maxLines: item['title'] == '详细地址' ? 5 : 1,
decoration: InputDecoration(
contentPadding: EdgeInsets.only(
right: 32.w,
top: 28.w,
bottom: 28.w,
),
hintText: item['hintText'],
border: InputBorder.none, //线
fillColor: Colors.white,
filled: true,
hintStyle:
TextStyle(color: Color(0xff999999), fontSize: 28.sp),
prefixIcon: Padding(
padding: EdgeInsets.only(
left: 32.w,
right: (item['title'] == '收货人' ? 88 : 60).w,
top: 28.w,
bottom: (item['title'] == '详细地址' ? 158 : 28).w,
),
child: Text(
item['title'],
style: TextStyle(
color: Color(0xff333333),
fontSize: 28.sp,
fontWeight: FontWeight.w500,
),
),
),
),
))
.toList();
}
return Container(
color: Colors.white,
child: Column(
children: _listTextFieldView(),
),
);
}
}

@ -1,181 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:extended_text/extended_text.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:akuCommunity/pages/address_page/address_edit_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:get/get.dart';
class AddressItem extends StatelessWidget {
final String name, phone, address;
final bool isDefualt;
AddressItem({Key key, this.name, this.phone, this.address, this.isDefualt})
: super(key: key);
Widget _containerImage() {
return Container(
alignment: Alignment.center,
width: 76.w,
height: 76.w,
margin: EdgeInsets.only(
right: 20.w,
),
padding: EdgeInsets.symmetric(vertical: 12.w),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: isDefualt
? [Color(0xffffd000), Color(0xffff8500)]
: [Color(0xffd8d8d8), Color(0xffd8d8d8)],
),
borderRadius: BorderRadius.all(Radius.circular(76.w)),
),
child: Icon(SimpleLineIcons.location_pin, color: Colors.white),
);
}
Widget _containerColumn() {
return Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
name,
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
SizedBox(width: 20.w),
Text(
phone,
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
),
),
],
),
SizedBox(height: 12.w),
Container(
width: 432.w,
child: ExtendedText.rich(
TextSpan(
children: [
isDefualt
? ExtendedWidgetSpan(
child: Container(
margin: EdgeInsets.only(right: 16.w),
decoration: BoxDecoration(
color: Color(0xfffff7d2),
border: Border.all(
color: Color(0xffffd000), width: 0.5),
borderRadius:
BorderRadius.all(Radius.circular(4))),
padding: EdgeInsets.symmetric(
horizontal: 20.w,
vertical: 4.w,
),
child: Text(
'默认',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff333333),
),
),
),
)
: ExtendedWidgetSpan(child: SizedBox()),
TextSpan(
text: address,
style: TextStyle(
fontSize: 24.sp, color: Color(0xff999999), height: 1.5),
)
],
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
),
],
),
);
}
Widget _positionedEdit(BuildContext context) {
return Positioned(
right: 0,
top: 55.w,
child: InkWell(
onTap: () {
Get.to(() => AddressEditPage(
bundle: Bundle()
..putMap('details', {
'title': '编辑地址',
'name': name,
'phone': phone,
'address': address,
'isDelete': true
}),
));
},
child: Row(
children: [
SizedBox(width: 13.w),
SizedBox(
width: 1,
height: 30.w,
child: DecoratedBox(
decoration: BoxDecoration(color: Color(0xffd8d8d8)),
),
),
SizedBox(width: 13.w),
Text(
'编辑',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
),
),
],
),
),
);
}
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)),
),
margin: EdgeInsets.only(
left: 32.w,
right: 32.w,
top: 20.w,
),
padding: EdgeInsets.symmetric(
horizontal: 20.w,
vertical: 32.w,
),
child: Stack(
children: [
Row(
children: [
_containerImage(),
_containerColumn(),
],
),
_positionedEdit(context),
],
),
);
}
}

@ -1,193 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/common_input.dart';
class CertificationPage extends StatefulWidget {
CertificationPage({Key key}) : super(key: key);
@override
_CertificationPageState createState() => _CertificationPageState();
}
class _CertificationPageState extends State<CertificationPage> {
TextEditingController _userName = new TextEditingController();
TextEditingController _userIDCard = new TextEditingController();
List<Map<String, dynamic>> _uploadImageList = [
{
'imagePath': AssetsImage.LICENSE,
'title': '上传身份证正面照',
},
{
'imagePath': AssetsImage.LICENSEBACK,
'title': '上传身份证背面照',
},
];
@override
void initState() {
super.initState();
}
Widget _idCardType() {
return Container(
padding: EdgeInsets.only(
top: 23.w,
bottom: 24.w,
),
margin: EdgeInsets.only(bottom: 60.w),
decoration: BoxDecoration(
border:
Border(bottom: BorderSide(color: Color(0xffeeeeee), width: 0.5)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'证件类型',
style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)),
),
SizedBox(height: 25.w),
Container(
width: 686.w,
child: Text(
'身份证',
style: TextStyle(
fontSize: 36.sp,
color: Color(0xff333333),
fontWeight: FontWeight.w600,
),
),
)
],
),
);
}
Widget _upLoadImage() {
return Container(
padding: EdgeInsets.only(
top: 23.w,
bottom: 24.w,
),
margin: EdgeInsets.only(bottom: 60.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'上传证件照片',
style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)),
),
SizedBox(height: 25.w),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: List.generate(
// _uploadImageList.length,
// (index) => SingleImageUp(
// title: _uploadImageList[index]['title'],
// imagePath: _uploadImageList[index]['imagePath'],
// ),
// ),
// ),
],
),
);
}
Widget _input(String title, hintText, TextEditingController controller) {
return Container(
padding: EdgeInsets.only(
top: 23.w,
bottom: 24.w,
),
margin: EdgeInsets.only(bottom: 60.w),
decoration: BoxDecoration(
border:
Border(bottom: BorderSide(color: Color(0xffeeeeee), width: 0.5)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)),
),
SizedBox(height: 25.w),
CommonInput(inputController: controller, hintText: hintText)
],
),
);
}
InkWell _submit() {
return InkWell(
child: Container(
alignment: Alignment.center,
height: 96.w,
width: 686.w,
padding: EdgeInsets.symmetric(
vertical: 26.w,
),
decoration: BoxDecoration(
color: Color(0xffffc40c),
borderRadius: BorderRadius.all(Radius.circular(48))),
child: Text(
'确认提交',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 32.sp,
color: Color(0xff333333)),
),
),
);
}
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '实名认证',
body: Container(
padding: EdgeInsets.only(
top: 32.w,
left: 32.w,
right: 32.w,
),
color: Colors.white,
child: ListView(
children: [
SingleChildScrollView(
child: Container(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
children: [
_idCardType(),
_upLoadImage(),
_input('证件号', '请输入证件号', _userName),
_input('姓名', '姓名需与证件上相同', _userIDCard),
],
),
],
),
),
),
),
),
_submit(),
],
),
),
);
}
}

@ -1,38 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'widget/confirm_address.dart';
import 'widget/confirm_bottom_bar.dart';
import 'widget/confirm_content.dart';
class ConfirmOrderPage extends StatelessWidget {
final Bundle bundle;
ConfirmOrderPage({Key key, this.bundle}) : super(key: key);
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '确认订单',
body: Stack(
children: [
ListView(
padding: EdgeInsets.only(bottom: 98.w),
children: [
SizedBox(height: 20.w),
ConfirmAddress(),
SizedBox(height: 20.w),
ConfirmContent(cartMap: bundle.getMap('cartMap')),
],
),
Positioned(
bottom: 0,
child: ConfirmBottomBar(cartMap: bundle.getMap('cartMap')),
),
],
),
);
}
}

@ -1,160 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
class PayOrderPage extends StatelessWidget {
final Bundle bundle;
PayOrderPage({Key key, this.bundle}) : super(key: key);
final List<Map<String, dynamic>> _listPay = [
{
'title': '支付宝支付',
'widget': Icon(
AntDesign.alipay_circle,
color: Color(0xff06b4fd),
size: 50.w,
),
'id': 'alipay',
'isCheck': true
},
{
'title': '微信支付',
'widget': Image.asset(
AssetsImage.WXPAY,
height: 60.w,
width: 60.w,
),
'id': 'wxpay',
'isCheck': false
}
];
Widget fadeAlertAnimation(BuildContext context, Animation<double> animation,
Animation<double> secondaryAnimation, Widget child) {
return Align(
child: FadeTransition(
opacity: animation,
child: child,
),
);
}
InkWell _payMode(BuildContext context, Widget widget, String title) {
return InkWell(
onTap: () {
// Alert(
// context: context,
// title: "支付成功!~",
// image: Container(
// margin: EdgeInsets.only(top: 40.w),
// height: 200.w,
// width: 200.w,
// alignment: Alignment.center,
// decoration: BoxDecoration(
// gradient: LinearGradient(
// begin: Alignment.topCenter,
// end: Alignment.bottomCenter,
// colors: [Color(0xffffe16b), Color(0xffffc40d)],
// ),
// borderRadius: BorderRadius.all(Radius.circular(200.w)),
// ),
// child: Icon(
// Icons.check,
// color: Colors.white,
// size: 150.w,
// ),
// ),
// style: alertStyle,
// alertAnimation: fadeAlertAnimation,
// buttons: [
// DialogButton(
// child: Text(
// "确认",
// style: TextStyle(color: Colors.white, fontSize: 20),
// ),
// onPressed: () => Get.back(),
// color: Color(0xffffc40d),
// radius: BorderRadius.circular(8.w),
// ),
// ],
// ).show();
},
child: Container(
padding: EdgeInsets.only(
bottom: 27.w,
top: 28.w,
),
decoration: BoxDecoration(
border:
Border(bottom: BorderSide(color: Color(0xffd8d8d8), width: 0.5)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
widget,
SizedBox(width: 24.w),
Text(
title,
style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)),
),
],
),
Icon(
AntDesign.right,
color: Color(0xff999999),
size: 32.w,
),
],
),
),
);
}
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '付款方式',
body: Container(
color: Colors.white,
child: ListView(
children: [
Container(
margin: EdgeInsets.only(
top: 130.w,
bottom: 130.w,
),
alignment: Alignment.center,
child: Text(
'¥${(double.parse(bundle.getMap('cartMap')["itemprice"]) * bundle.getMap('cartMap')["count"]).toStringAsFixed(2)}',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 48.sp,
color: Color(0xffe60e0e),
),
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 32.w),
child: Column(
children: List.generate(
_listPay.length,
(index) => _payMode(
context,
_listPay[index]['widget'],
_listPay[index]['title'],
)),
),
),
],
),
),
);
}
}

@ -1,117 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/utils/headers.dart';
class ConfirmAddress extends StatefulWidget {
ConfirmAddress({Key key}) : super(key: key);
@override
_ConfirmAddressState createState() => _ConfirmAddressState();
}
class _ConfirmAddressState extends State<ConfirmAddress> {
Container _containerImage() {
return Container(
padding: EdgeInsets.symmetric(vertical: 12.w),
child: Image.asset(
AssetsImage.LOCATION,
height: 54.w,
width: 54.w,
),
);
}
Container _containerContent() {
return Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
'周玲慧',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
SizedBox(width: 20.w),
Text(
'18868945727',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
),
),
],
),
SizedBox(height: 6.w),
Text(
'浙江省 宁波市 江北区 工程学院阿库旅游f6',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
),
),
],
),
);
}
Positioned _positionedIcon() {
return Positioned(
bottom: 58.w,
right: 0,
child: Icon(
AntDesign.right,
size: 34.sp,
color: Color(0xff999999),
),
);
}
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () {
// Get.to(CommonPage(
// bundle: Bundle()
// ..putMap('commentMap', {'title': '我的地址', 'isActions': true}),
// ));
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: 32.w),
padding: EdgeInsets.symmetric(horizontal: 18.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)),
),
child: Stack(
children: [
Padding(
padding: EdgeInsets.symmetric(
horizontal: 18.w,
vertical: 32.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
_containerImage(),
SizedBox(width: 18.w),
_containerContent(),
],
),
),
_positionedIcon()
],
),
),
);
}
}

@ -1,83 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/pages/confirm_order_page/pay_order_page.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:get/get.dart';
class ConfirmBottomBar extends StatelessWidget {
final Map cartMap;
ConfirmBottomBar({Key key, this.cartMap}) : super(key: key);
Widget _countPrice() {
return Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
'共计${cartMap["count"]}',
style: TextStyle(
color: BaseStyle.color999999,
fontSize: BaseStyle.fontSize24,
),
),
SizedBox(width: 10.w),
Text(
'合计:¥${(double.parse(cartMap["itemprice"]) * cartMap["count"]).toStringAsFixed(2)}',
style: TextStyle(
color: Color(0xffe60e0e),
fontSize: BaseStyle.fontSize28,
),
)
],
);
}
Widget _submit(BuildContext context) {
return InkWell(
onTap: () {
Get.to(()=>PayOrderPage());
},
child: Container(
decoration: BoxDecoration(
color: BaseStyle.colorffc40c,
borderRadius: BorderRadius.all(Radius.circular(33)),
),
padding: EdgeInsets.symmetric(
horizontal: 39.w,
vertical: 12.w,
),
child: Text(
'提交订单',
style: TextStyle(
fontSize: BaseStyle.fontSize30,
color: ktextPrimary,
),
),
),
);
}
@override
Widget build(BuildContext context) {
return Container(
color: Colors.white,
width: MediaQuery.of(context).size.width,
height: 98.w,
padding: EdgeInsets.only(
top: 15.w,
bottom: 17.w,
right: 34.w,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.end,
children: [
_countPrice(),
SizedBox(width: 12.w),
_submit(context),
],
),
);
}
}

@ -1,259 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:get/get.dart';
import 'package:akuCommunity/pages/invoice/invoice_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
// import 'package:akuCommunity/widget/cart_count.dart';
class ConfirmContent extends StatelessWidget {
final Map cartMap;
ConfirmContent({Key key, this.cartMap}) : super(key: key);
Widget _cartHeader() {
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CachedImageWrapper(
url: cartMap["itempic"],
height: 210.w,
width: 210.w,
),
SizedBox(width: 20.w),
Column(
children: [
Container(
width: 288.w,
child: Text(
cartMap["itemtitle"],
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff333333),
),
),
),
SizedBox(height: 10.w),
Container(
width: 280.w,
padding: EdgeInsets.all(10.w),
decoration: BoxDecoration(
color: Color(0xfff0f0f0),
borderRadius: BorderRadius.all(Radius.circular(2)),
boxShadow: [
BoxShadow(
color: Color(0xfff0f0f0),
offset: Offset(1, 1),
),
],
),
child: Text(
cartMap["itemtitle"],
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 20.sp,
color: Color(0xff666666),
),
),
),
],
),
],
);
}
Widget _cartFooter() {
return Positioned(
right: 0,
bottom: 0,
child: Row(
children: [
Text(
'共计${cartMap["count"]}',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
),
),
SizedBox(width: 10.w),
Text(
'合计:¥${(double.parse(cartMap["itemprice"]) * cartMap["count"]).toStringAsFixed(2)}',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xffe60e0e),
),
)
],
),
);
}
Widget _cartPrice() {
return Positioned(
right: 0,
top: 0,
child: Container(
child: Text(
'${cartMap["itemprice"]}',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xffe60e0e),
fontWeight: FontWeight.w600,
),
),
),
);
}
Widget _cartNum() {
return Positioned(
right: 0,
top: 38.w,
child: Container(
child: Text(
'x${cartMap["count"]}',
style: TextStyle(
fontSize: 20.sp,
color: Color(0xff999999),
fontWeight: FontWeight.w600,
),
),
),
);
}
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)),
),
margin: EdgeInsets.symmetric(horizontal: 32.w),
padding: EdgeInsets.symmetric(
horizontal: 20.w,
vertical: 32.w,
),
child: Stack(
children: [
Column(
children: [
_cartHeader(),
Container(
color: Colors.white,
padding: EdgeInsets.only(
left: 30.w,
right: 12.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(
top: 56.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'配送方式',
style: TextStyle(
fontSize: 28.sp, color: Color(0xff333333)),
),
SizedBox(width: 26.w),
Text(
'普通配送',
style: TextStyle(
fontSize: 28.sp, color: Color(0xff999999)),
),
],
),
),
Container(
margin: EdgeInsets.only(
top: 56.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'开具发票',
style: TextStyle(
fontSize: 28.sp, color: Color(0xff333333)),
),
InkWell(
onTap: () {
Get.to(() => InvoicePage(
bundle: Bundle()
..putString('title', '1123123123123'),
));
},
child: Row(
children: [
Container(
height: 80.w,
width: 353.w,
child: Text(
'增值税电子普通发票-明显-企业-宁波阿库旅游有限公司',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff999999),
),
),
),
SizedBox(width: 10.w),
Icon(
AntDesign.right,
size: 30.sp,
color: Color(0xff999999),
),
],
),
),
],
),
),
Container(
margin: EdgeInsets.only(
top: 56.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'订单备注',
style: TextStyle(
fontSize: 28.sp, color: Color(0xff333333)),
),
SizedBox(width: 14.w),
Text(
'选填',
style: TextStyle(
fontSize: 28.sp, color: Color(0xff999999)),
),
],
),
),
],
),
),
SizedBox(height: 104.w),
],
),
_cartFooter(),
_cartPrice(),
_cartNum(),
],
),
);
}
}

@ -39,47 +39,45 @@ class _ConvenientPhonePageState extends State<ConvenientPhonePage> {
}
Widget _buildTile(ConvenientPhoneModel model) {
return Material(
child: Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
model.name.text.black.size(32.sp).make(),
12.w.heightBox,
model.tel.text.color(Color(0xFF999999)).size(28.sp).make(),
],
).expand(),
IconButton(
icon: Image.asset(
R.ASSETS_ICONS_PHONE_PNG,
width: 40.w,
height: 40.w,
),
onPressed: () async {
bool result = await Get.dialog(CupertinoAlertDialog(
title: model.tel.text.isIntrinsic.make(),
actions: [
CupertinoDialogAction(
child: '取消'.text.isIntrinsic.make(),
onPressed: () => Get.back(),
),
CupertinoDialogAction(
child: '确定'.text.isIntrinsic.make(),
onPressed: () => Get.back(result: true),
),
],
));
if (result == true) launch('tel:${model.tel}');
},
)
],
),
],
),
return Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
model.name.text.black.size(32.sp).make(),
12.w.heightBox,
model.tel.text.color(Color(0xFF999999)).size(28.sp).make(),
],
).expand(),
IconButton(
icon: Image.asset(
R.ASSETS_ICONS_PHONE_PNG,
width: 40.w,
height: 40.w,
),
onPressed: () async {
bool result = await Get.dialog(CupertinoAlertDialog(
title: model.tel.text.isIntrinsic.make(),
actions: [
CupertinoDialogAction(
child: '取消'.text.isIntrinsic.make(),
onPressed: () => Get.back(),
),
CupertinoDialogAction(
child: '确定'.text.isIntrinsic.make(),
onPressed: () => Get.back(result: true),
),
],
));
if (result == true) launch('tel:${model.tel}');
},
)
],
),
],
);
}
@ -134,27 +132,25 @@ class _ConvenientPhonePageState extends State<ConvenientPhonePage> {
},
builder: (items) {
return ListView.separated(
padding:
EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
itemBuilder: (context, index) {
return _buildTile(items[index]);
},
separatorBuilder: (context, index) {
return Padding(
padding: EdgeInsets.symmetric(vertical: 20.w),
child: Divider(
thickness: 1.w,
height: 1.w,
color: Color(0xFFD8D8D8),
),
);
},
itemCount: items.length);
padding:
EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
itemBuilder: (context, index) {
return _buildTile(items[index]);
},
separatorBuilder: (context, index) {
return Divider(
thickness: 1.w,
height: 40.w,
color: Color(0xFFD8D8D8),
);
},
itemCount: items.length,
);
},
),
),
],
),
).material(color: Colors.white),
);
}
}

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/constants/api.dart';
@ -10,7 +11,6 @@ import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/others/stack_avatar.dart';
import 'package:get/get.dart';
class EventVotingPage extends StatefulWidget {
EventVotingPage({Key key}) : super(key: key);

@ -1,13 +1,14 @@
import 'package:akuCommunity/model/common/img_model.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/constants/api.dart';
import 'package:akuCommunity/model/common/img_model.dart';
import 'package:akuCommunity/model/manager/voting_detail_model.dart';
import 'package:akuCommunity/pages/manager_func.dart';
import 'package:akuCommunity/utils/headers.dart';
@ -16,7 +17,6 @@ import 'package:akuCommunity/widget/bee_divider.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/buttons/bee_single_check.dart';
import 'package:akuCommunity/widget/buttons/bottom_button.dart';
import 'package:velocity_x/velocity_x.dart';
class VotingDetailPage extends StatefulWidget {
final int id;

@ -1,89 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/sliver_app_bar_delegate.dart';
import 'widget/director_manage.dart';
import 'widget/owner_manage.dart';
class FitupManagePage extends StatefulWidget {
FitupManagePage({Key key}) : super(key: key);
@override
_FitupManagePageState createState() => _FitupManagePageState();
}
class _FitupManagePageState extends State<FitupManagePage>
with TickerProviderStateMixin {
TabController _controller;
//
List<Map<String, dynamic>> treeList = [
{'name': '业主'},
{'name': '装修负责人'},
];
@override
void initState() {
_controller = TabController(length: 2, vsync: this);
super.initState();
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
List<Widget> _silverBuilder(BuildContext context, bool innerBoxIsScrolled) {
return <Widget>[
SliverPersistentHeader(
pinned: true,
delegate: SliverAppBarDelegate(
minHeight: 56,
maxHeight: 56,
child: Container(
color: Colors.white,
child: TabBar(
unselectedLabelStyle: TextStyle(
fontSize: BaseStyle.fontSize28,
),
labelStyle: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize28,
),
labelPadding: EdgeInsets.symmetric(horizontal: (131.5).w),
indicatorColor: Color(0xffffc40c),
indicatorSize: TabBarIndicatorSize.label,
indicatorPadding: EdgeInsets.symmetric(horizontal: 21.w),
isScrollable: true,
controller: _controller,
tabs: List.generate(
treeList.length,
(index) => Tab(text: treeList[index]['name']),
),
),
),
),
),
];
}
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '装修管理',
body: NestedScrollView(
headerSliverBuilder: _silverBuilder,
body: TabBarView(
controller: _controller,
children: List.generate(
treeList.length,
(index) => index == 0 ? OwnerManage() : DirectorManage(),
),
),
),
);
}
}

@ -1,117 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/common_input.dart';
// import 'package:akuCommunity/widget/single_image_up.dart';
class DecoratorInfo extends StatefulWidget {
DecoratorInfo({Key key}) : super(key: key);
@override
_DecoratorInfoState createState() => _DecoratorInfoState();
}
class _DecoratorInfoState extends State<DecoratorInfo> {
TextEditingController _userName = new TextEditingController();
TextEditingController _userIDCard = new TextEditingController();
TextEditingController _userPhone = new TextEditingController();
TextEditingController _userAddress = new TextEditingController();
List<Map<String, dynamic>> _uploadImageList = [
{
'imagePath': AssetsImage.LICENSE,
'title': '上传身份证正面照',
},
{
'imagePath': AssetsImage.LICENSEBACK,
'title': '上传身份证背面照',
},
];
@override
void initState() {
super.initState();
}
Widget _cardList(String title, Widget widget) {
return Container(
padding: EdgeInsets.only(
top: 23.w,
bottom: 24.w,
),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: BaseStyle.coloreeeeee, width: 0.5)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)),
),
SizedBox(height: 25.w),
widget
],
),
);
}
Widget _upLoadImage() {
return Container(
padding: EdgeInsets.only(
top: 23.w,
bottom: 24.w,
),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: BaseStyle.coloreeeeee, width: 0.5)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'上传证件照片',
style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)),
),
SizedBox(height: 25.w),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: List.generate(
// _uploadImageList.length,
// (index) => SingleImageUp(
// title: _uploadImageList[index]['title'],
// imagePath: _uploadImageList[index]['imagePath'],
// ),
// ),
// ),
],
),
);
}
@override
Widget build(BuildContext context) {
return Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_cardList(
'姓名', CommonInput(inputController: _userName, hintText: '请输入姓名')),
// _cardList('证件类型', CommonSelect(title: '证件类型')),
_cardList('证件号',
CommonInput(inputController: _userIDCard, hintText: '请输入证件号')),
_cardList('联系方式',
CommonInput(inputController: _userPhone, hintText: '请输入电话号码')),
_cardList('联系地址',
CommonInput(inputController: _userAddress, hintText: '请输入公司地址')),
_upLoadImage(),
],
),
);
}
}

@ -1,265 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/common_input.dart';
import 'decorator_info.dart';
import 'house_info.dart';
// import 'package:akuCommunity/widget/single_image_up.dart';
class DirectorManage extends StatefulWidget {
DirectorManage({Key key}) : super(key: key);
@override
_DirectorManageState createState() => _DirectorManageState();
}
class _DirectorManageState extends State<DirectorManage> {
TextEditingController _companyName = new TextEditingController();
int memberNum = 1;
List<Map<String, dynamic>> _uploadImageList = [
{
'imagePath': AssetsImage.LICENSE,
'title': '上传营业执照',
},
{
'imagePath': AssetsImage.LICENSEBACK,
'title': '上传资质证书',
},
{'imagePath': AssetsImage.DRAWINGS, 'title': '上传装修图纸'},
{'imagePath': AssetsImage.APPLICATION, 'title': '上传装修申请表'},
{'imagePath': AssetsImage.COMMITMENT, 'title': '上传装修承诺书'}
];
List<Map<String, dynamic>> _listHouse = [
{'title': '宁波华茂悦峰', 'subtitle': '1幢-1单元-702室'},
];
@override
void initState() {
super.initState();
}
Widget _doorIdCard() {
return Container(
width: 686.w,
child: RichText(
text: TextSpan(children: <InlineSpan>[
TextSpan(
text: '2',
style: TextStyle(
fontSize: BaseStyle.fontSize36,
color: ktextPrimary,
fontWeight: FontWeight.w600,
),
),
TextSpan(
text: '',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: ktextPrimary,
fontWeight: FontWeight.w600,
),
),
]),
),
);
}
Widget _cardList(String title, Widget widget) {
return Container(
padding: EdgeInsets.only(
top: 23.w,
bottom: 24.w,
),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: BaseStyle.coloreeeeee, width: 0.5)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)),
),
SizedBox(height: 25.w),
widget
],
),
);
}
Widget _upLoadImage() {
return Container(
padding: EdgeInsets.only(
top: 23.w,
bottom: 24.w,
),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: BaseStyle.coloreeeeee, width: 0.5)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'上传凭证',
style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)),
),
SizedBox(height: 25.w),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: List.generate(
// 2,
// (index) => SingleImageUp(
// title: _uploadImageList[index]['title'],
// imagePath: _uploadImageList[index]['imagePath'],
// ),
// ),
// ),
// SizedBox(height: 25.w),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: List.generate(
// 2,
// (index) => SingleImageUp(
// title: _uploadImageList.take(4).skip(2).toList()[index]
// ['title'],
// imagePath: _uploadImageList.take(4).skip(2).toList()[index]
// ['imagePath'],
// ),
// ),
// ),
// SizedBox(height: 25.w),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: List.generate(
// 1,
// (index) => SingleImageUp(
// title: _uploadImageList.take(5).skip(4).toList()[index]
// ['title'],
// imagePath: _uploadImageList.take(5).skip(4).toList()[index]
// ['imagePath'],
// ),
// ),
// ),
],
),
);
}
Widget _inkWellSubmit() {
return InkWell(
child: Center(
child: Container(
margin: EdgeInsets.only(bottom: 64.w),
decoration: BoxDecoration(
color: BaseStyle.colorffc40c,
borderRadius: BorderRadius.all(Radius.circular(36)),
),
width: 426.w,
height: 82.w,
padding: EdgeInsets.only(
top: 19.w,
bottom: 18.w,
),
alignment: Alignment.center,
child: Text(
'确认提交',
style: TextStyle(
fontSize: BaseStyle.fontSize32,
color: ktextPrimary,
fontWeight: FontWeight.w600,
),
),
),
),
);
}
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Container(
color: Colors.white,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child: Stack(
children: [
Container(
margin: EdgeInsets.only(
top: 32.w,
left: 32.w,
right: 32.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
children: _listHouse
.map((item) => HouseInfo(
title: item['title'],
subtitle: item['subtitle'],
))
.toList(),
),
_cardList(
'装修公司',
CommonInput(
inputController: _companyName,
hintText: '请输入公司名称')),
_cardList('门禁卡数量', _doorIdCard()),
_upLoadImage(),
SizedBox(height: 78.w),
Text(
'装修人员',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize32,
color: ktextPrimary),
),
Column(
children:
List.generate(memberNum, (index) => DecoratorInfo()),
),
InkWell(
onTap: () {
setState(() {
memberNum++;
});
},
child: Container(
margin: EdgeInsets.only(top: 54.w),
padding: EdgeInsets.only(
top: 16.w,
bottom: 16.w,
),
alignment: Alignment.center,
child: Text(
'继续添加装修工人',
style: TextStyle(
fontSize: BaseStyle.fontSize24,
color: BaseStyle.color999999),
),
),
),
_inkWellSubmit(),
],
),
),
],
),
),
),
);
}
}

@ -1,61 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
class HouseInfo extends StatefulWidget {
final String title, subtitle;
HouseInfo({Key key, this.title, this.subtitle}) : super(key: key);
@override
_HouseInfoState createState() => _HouseInfoState();
}
class _HouseInfoState extends State<HouseInfo> {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.only(
bottom: 32.w,
),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: BaseStyle.coloreeeeee, width: 0.5)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
AssetsImage.HOUSEATTESTATION,
height: 48.w,
width: 48.w,
),
SizedBox(width: 20.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.title,
style: TextStyle(
fontSize: BaseStyle.fontSize32,
color: BaseStyle.color474747,
),
),
SizedBox(height: 10.w),
Text(
widget.subtitle,
style: TextStyle(
fontSize: BaseStyle.fontSize32,
color: BaseStyle.color474747,
),
)
],
),
],
),
);
}
}

@ -1,157 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bottom_button.dart';
import 'package:akuCommunity/widget/common_input.dart';
import 'house_info.dart';
import 'pay_model_sheet.dart';
class OwnerManage extends StatefulWidget {
OwnerManage({Key key}) : super(key: key);
@override
_OwnerManageState createState() => _OwnerManageState();
}
class _OwnerManageState extends State<OwnerManage>
with AutomaticKeepAliveClientMixin {
@override
bool get wantKeepAlive => true;
TextEditingController _companyName = new TextEditingController();
TextEditingController _contactsName = new TextEditingController();
TextEditingController _contactsPhone = new TextEditingController();
List<Map<String, dynamic>> _listHouse = [
{'title': '宁波华茂悦峰', 'subtitle': '1幢-1单元-702室'},
];
List<Map<String, dynamic>> _listWidget = [];
@override
void initState() {
super.initState();
_listWidget = [
{
'title': '装修公司',
'widget':
CommonInput(inputController: _companyName, hintText: '请输入公司名称')
},
{
'title': '房屋紧急联系人',
'widget':
CommonInput(inputController: _contactsName, hintText: '请输入联系人姓名')
},
{
'title': '联系方式',
'widget':
CommonInput(inputController: _contactsPhone, hintText: '请输入联系方式')
},
// {'title': '预计开始时间', 'widget': CommonSelect(title: '时间')},
// {'title': '预计结束时间', 'widget': CommonSelect(title: '时间')},
];
}
void _showModelBotoomSheet() {
showModalBottomSheet(
// isScrollControlled: true,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(10),
),
),
context: context,
backgroundColor: Colors.white,
builder: (context) {
return PayModelSheet();
},
);
}
List<Widget> _listView() {
return _listWidget
.asMap()
.keys
.map((index) => Container(
padding: EdgeInsets.only(
top: 23.w,
bottom: 24.w,
),
margin: EdgeInsets.only(bottom: (index == 2 ? 117 : 0).w),
decoration: BoxDecoration(
border: Border(
bottom:
BorderSide(color: BaseStyle.coloreeeeee, width: 0.5)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
_listWidget[index]['title'],
style: TextStyle(
fontSize: BaseStyle.fontSize28, color: ktextPrimary),
),
SizedBox(height: 25.w),
_listWidget[index]['widget'],
],
),
))
.toList();
}
@override
Widget build(BuildContext context) {
super.build(context);
return Container(
color: Colors.white,
child: Stack(
children: [
SingleChildScrollView(
child: Container(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child: Container(
margin: EdgeInsets.only(
top: 32.w,
left: 32.w,
right: 32.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
children: _listHouse
.map((item) => HouseInfo(
title: item['title'],
subtitle: item['subtitle'],
))
.toList(),
),
Column(
children: _listView(),
),
SizedBox(height: 89.w),
],
),
),
),
),
),
Positioned(
bottom: 0,
child: BottomButton(
title: '申请付款',
fun: _showModelBotoomSheet,
),
)
],
),
);
}
}

@ -1,286 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:get/get.dart';
import 'package:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bottom_button.dart';
class PayModelSheet extends StatefulWidget {
PayModelSheet({Key key}) : super(key: key);
@override
_PayModelSheetState createState() => _PayModelSheetState();
}
class _PayModelSheetState extends State<PayModelSheet> {
List<Map<String, dynamic>> _listPay = [
{
'title': '支付宝支付',
'widget': Icon(
AntDesign.alipay_circle,
color: Color(0xff06b4fd),
size: 50.w,
),
'id': 'alipay',
'isCheck': true
},
{
'title': '微信支付',
'widget': Image.asset(
AssetsImage.WXPAY,
height: 60.w,
width: 60.w,
),
'id': 'wxpay',
'isCheck': false
}
];
int _currentindex = 0;
void _showModelBotoomSheet() {
showModalBottomSheet(
// isScrollControlled: true,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(10),
),
),
context: context,
backgroundColor: Colors.white,
builder: (context) {
return Container(
margin: EdgeInsets.only(
top: 20.w,
left: 20.w,
right: 20.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
alignment: Alignment.center,
decoration: BoxDecoration(
border: Border(
bottom:
BorderSide(color: BaseStyle.coloreeeeee, width: 0.5)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
IconButton(
icon: Icon(
AntDesign.left,
size: 40.sp,
color: BaseStyle.color999999,
),
onPressed: () {
Get.back();
},
),
Container(
padding: EdgeInsets.only(left: 190.w),
child: Text(
'选择付款方式',
style: TextStyle(
fontSize: BaseStyle.fontSize32,
color: ktextPrimary,
fontWeight: FontWeight.w600,
),
),
),
],
),
),
Column(
children: _listPay
.asMap()
.keys
.map((index) => _inkWellSelectPay(_listPay[index]['title'],
_listPay[index]['widget'], index))
.toList(),
),
],
),
);
},
);
}
InkWell _inkWellSelectPay(String title, Widget logo, int index) {
return InkWell(
onTap: () {
setState(() {
_listPay.forEach((item) {
item['isCheck'] = false;
});
_listPay[index]['isCheck'] = true;
_currentindex = index;
Get.back();
});
},
child: Container(
padding: EdgeInsets.only(
top: 10.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
logo,
SizedBox(width: 24.w),
Expanded(
child: Container(
padding: EdgeInsets.only(
bottom: 27.w,
top: 28.w,
),
decoration: BoxDecoration(
border: Border(
bottom:
BorderSide(color: BaseStyle.coloreeeeee, width: 0.5)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
title,
style: TextStyle(
fontSize: BaseStyle.fontSize28, color: ktextPrimary),
),
_listPay[index]['isCheck']
? Icon(
AntDesign.check,
color: BaseStyle.colorffc40c,
size: 50.w,
)
: SizedBox(),
],
),
),
),
],
),
),
);
}
InkWell _inkWellDefaultPay() {
return InkWell(
onTap: _showModelBotoomSheet,
child: Container(
padding: EdgeInsets.only(
bottom: 27.w,
top: 28.w,
),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: BaseStyle.coloreeeeee, width: 0.5)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
_listPay[_currentindex]['widget'],
SizedBox(width: 24.w),
Text(
_listPay[_currentindex]['title'],
style: TextStyle(
fontSize: BaseStyle.fontSize28, color: ktextPrimary),
),
],
),
Icon(
AntDesign.right,
color: BaseStyle.color999999,
size: 32.w,
),
],
),
),
);
}
@override
Widget build(BuildContext context) {
return Container(
child: Stack(
children: [
Container(
margin: EdgeInsets.only(
top: 36.w,
left: 32.w,
right: 32.w,
),
child: Column(
children: [
Container(
alignment: Alignment.center,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: BaseStyle.coloreeeeee, width: 0.5)),
),
padding: EdgeInsets.only(bottom: 20.w),
child: Text(
'付款详情',
style: TextStyle(
fontSize: BaseStyle.fontSize32,
color: ktextPrimary,
fontWeight: FontWeight.w600,
),
),
),
Container(
padding: EdgeInsets.only(
bottom: 80.w,
top: 89.w,
),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: BaseStyle.coloreeeeee, width: 0.5)),
),
alignment: Alignment.center,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'${5300}',
style: TextStyle(
fontSize: BaseStyle.fontSize52,
color: Color(0xffe60e0e),
fontWeight: FontWeight.w600,
),
),
SizedBox(height: 20.w),
Text(
'注释:装修押金${5000}元,垃圾清理费${300}',
style: TextStyle(
fontSize: BaseStyle.fontSize22,
color: BaseStyle.color999999),
),
],
),
),
_inkWellDefaultPay(),
],
),
),
Positioned(
bottom: 0,
child: BottomButton(
title: '立即付款',
),
)
],
),
);
}
}

@ -1,83 +0,0 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/pages/goods_details/view_comments_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:get/get.dart';
import 'widget/goods_app_bar.dart';
import 'widget/goods_details_bottom_bar.dart';
import 'widget/product_content.dart';
import 'widget/product_detail.dart';
import 'widget/product_evaluate.dart';
import 'widget/product_service.dart';
import 'widget/product_swiper.dart';
class GoodsDetailsPage extends StatefulWidget {
final Bundle bundle;
GoodsDetailsPage({Key key, this.bundle}) : super(key: key);
@override
_GoodsDetailsPageState createState() => _GoodsDetailsPageState();
}
class _GoodsDetailsPageState extends State<GoodsDetailsPage> {
Map<String, dynamic> shopInfo = {};
@override
void initState() {
super.initState();
shopInfo = json.decode(widget.bundle.getString('shoplist'));
}
@override
Widget build(BuildContext context) {
final List<String> params = shopInfo["taobao_image"].split(',');
return Scaffold(
appBar: PreferredSize(
child: GoodsAppBar(
shareImg: params.first,
title: shopInfo["itemtitle"],
),
preferredSize: Size.fromHeight(kToolbarHeight),
),
body: Stack(
children: [
ListView(
padding: EdgeInsets.only(bottom: 100.w),
children: [
ProductSwiper(imageUrl: params),
ProductContent(
itemprice: shopInfo["itemprice"],
itemtitle: shopInfo["itemtitle"],
itemshorttitle: shopInfo["itemshorttitle"],
itemdesc: shopInfo["itemdesc"],
),
ProductService(),
// ProductSpecs(),
ProductEvaluate(
fun: () {
Get.to(() => ViewCommentsPage());
},
),
ProductDetail(
picDesc: shopInfo["itempic_copy"],
),
],
),
Positioned(
bottom: 0,
child: GoodsDetailsBottomBar(
itemid: shopInfo["itemid"],
itemtitle: shopInfo["itemtitle"],
itemprice: shopInfo["itemprice"],
itempic: shopInfo["itempic"],
),
),
],
),
);
}
}

@ -1,247 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'widget/goods_app_bar.dart';
import 'widget/goods_comments_card.dart';
final List<String> imageUrl = [
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1599023251944&di=59dc4c919525b21567da91d7564b250b&imgtype=0&src=http%3A%2F%2Fku.90sjimg.com%2Felement_origin_min_pic%2F16%2F11%2F13%2Fd6882b6abd40c900655c87ebfc8dee0a.jpg',
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1599023251944&di=114f065583b0fb949c2621df5eb2aeb0&imgtype=0&src=http%3A%2F%2Fwww.track-roller.com%2Fimg%2Ftk9912701.jpg',
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1599023251943&di=2208befacee137736dced7bec5fc71a5&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20170921%2F0ebcc71a45f24904a0f89ae90d65787e.jpeg'
];
class ViewCommentsPage extends StatefulWidget {
ViewCommentsPage({Key key}) : super(key: key);
@override
_ViewCommentsPageState createState() => _ViewCommentsPageState();
}
class _ViewCommentsPageState extends State<ViewCommentsPage> {
List<Map<String, dynamic>> _commentsClassList = [
{'title': "全部", 'isSelect': true},
{'title': "好评(23)", 'isSelect': false},
{'title': "差评(0)", 'isSelect': false},
{'title': "中评(0)", 'isSelect': false},
{'title': "追加(24)", 'isSelect': false},
];
List<Map<String, dynamic>> _commentsCardList = [
{
'imagePath':
"https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1812993978,4158651947&fm=26&gp=0.jpg",
'name': '就是安安啊',
'subtitle': "4天前 尺码[170-185cm] 颜色分类:黑色",
'content': '面料和版型都不错,会回购',
'contentImageList': imageUrl,
'viewNum': '5',
},
{
'imagePath':
"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2690587153,2643787055&fm=26&gp=0.jpg",
'name': '马泽鹏',
'subtitle': "47天前 尺码[170-185cm] 颜色分类:黑色",
'content': '太好蓝了,现在天气有点热,赶快到秋天',
'contentImageList': [
'https://img.alicdn.com/imgextra/i3/409405727/O1CN01yNXzbp1sB0pPy06vu_!!409405727.jpg',
'https://img.alicdn.com/imgextra/i3/409405727/O1CN01yNXzbp1sB0pPy06vu_!!409405727.jpg',
'https://img.alicdn.com/imgextra/i2/409405727/O1CN01oaedss1sB0pPDo1JB_!!409405727.jpg'
],
'viewNum': '532',
},
{
'imagePath':
"https://dss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3095823371,2737858048&fm=26&gp=0.jpg",
'name': '王珂珂',
'subtitle': "4天前 尺码[170-185cm] 颜色分类:黑色",
'content': '面料和版型都不错,会回购',
'contentImageList': [
'https://img.alicdn.com/bao/uploaded/i4/O1CN01XIzuhk1FdADbW7Cwf_!!0-rate.jpg_400x400.jpg',
'https://img.alicdn.com/bao/uploaded/i1/O1CN01KNMhVC242YySXXE4f_!!0-rate.jpg_400x400.jpg',
'https://img.alicdn.com/bao/uploaded/i4/O1CN01A2q4Bb2LhBZJ5elrj_!!0-rate.jpg_400x400.jpg',
],
'viewNum': '235',
},
];
// RefreshController _refreshController =
// RefreshController(initialRefresh: false);
@override
void initState() {
super.initState();
}
void _onRefresh() async {
await Future.delayed(Duration(milliseconds: 1500));
// _refreshController.refreshCompleted();
}
void _onLoading() async {
await Future.delayed(Duration(milliseconds: 1500));
_commentsCardList.add({
'imagePath':
"https://dss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3095823371,2737858048&fm=26&gp=0.jpg",
'name': '王珂珂',
'subtitle': "4天前 尺码[170-185cm] 颜色分类:黑色",
'content': '面料和版型都不错,会回购',
'contentImageList': imageUrl,
'viewNum': '235',
});
if (mounted) setState(() {});
// _refreshController.loadComplete();
}
@override
void dispose() {
super.dispose();
// _refreshController.dispose();
}
Container _commentsClass() {
return Container(
color: Colors.white,
padding: EdgeInsets.only(
top: 29.w,
left: 32.w,
bottom: 40.w,
),
width: MediaQuery.of(context).size.width,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(bottom: 25.w),
child: Text(
'按分类评价',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: BaseStyle.color999999,
),
),
),
Wrap(
spacing: 10.w,
runSpacing: 20.w,
children: _commentsClassList
.map((item) => InkWell(
onTap: () {
_commentsClassList.forEach((item) {
item['isSelect'] = false;
});
setState(() {
item['isSelect'] = true;
});
},
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(24)),
child: Container(
padding: EdgeInsets.only(
left: 24.w,
right: 23.w,
top: 9.w,
bottom: 10.w,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(24)),
color: item['isSelect']
? Color(0xfffff6da)
: Color(0xffededed),
border: Border.all(
color: item['isSelect']
? Color(0xffffc40c)
: Colors.transparent,
width: 0.5),
),
child: Text(
item['title'],
style: TextStyle(
fontSize: BaseStyle.fontSize24,
color: ktextPrimary,
),
),
),
),
))
.toList(),
),
],
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PreferredSize(
child: GoodsAppBar(),
preferredSize: Size.fromHeight(kToolbarHeight),
),
body: Column(
children: [
_commentsClass(),
Expanded(
child: ListView.builder(
padding: EdgeInsets.only(top: 30.w),
itemBuilder: (BuildContext context, int index) => Container(
color: Colors.white,
child: GoodsCommentsCard(
imagePath: _commentsCardList[index]['imagePath'],
name: _commentsCardList[index]['name'],
subtitle: _commentsCardList[index]['subtitle'],
content: _commentsCardList[index]['content'],
contentImageList: _commentsCardList[index]
['contentImageList'],
viewNum: _commentsCardList[index]['viewNum'],
),
),
itemCount: _commentsCardList.length,
),
)
],
),
// NestedScrollView(
// headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
// return <Widget>[
// SliverPersistentHeader(
// pinned: true,
// delegate: SliverAppBarDelegate(
// minHeight: 200,
// maxHeight: 200,
// child: _commentsClass(),
// ),
// )
// ];
// },
// body: RefreshConfiguration(
// hideFooterWhenNotFull: true,
// child: SmartRefresher(
// controller: _refreshController,
// header: WaterDropHeader(),
// footer: ClassicFooter(),
// onRefresh: _onRefresh,
// onLoading: _onLoading,
// enablePullUp: true,
// child: ListView.builder(
// itemBuilder: (BuildContext context, int index) => Text('data'),
// itemCount: 6,
// ),
// ),
// ),
// children: [
// Positioned(
// top: 0,
// left: 0,
// right: 0,
// child: _commentsClass(),
// ),
// ],
// ),
);
}
}

@ -1,96 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:fluwx/fluwx.dart';
import 'package:get/get.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/pages/market/market_cart_page/market_cart_page.dart';
import 'package:akuCommunity/utils/headers.dart';
class GoodsAppBar extends StatefulWidget {
final String shareImg;
final String title;
GoodsAppBar({Key key, this.shareImg, this.title}) : super(key: key);
@override
_GoodsAppBarState createState() => _GoodsAppBarState();
}
class _GoodsAppBarState extends State<GoodsAppBar> {
@override
Widget build(BuildContext context) {
return AppBar(
elevation: 0,
backgroundColor: Color(0xffffffff),
titleSpacing: 0,
leading: IconButton(
icon: Icon(AntDesign.left, size: 40.sp),
onPressed: () {
Get.back();
},
),
title: Container(
padding: EdgeInsets.symmetric(
horizontal: 40.w,
vertical: 15.w,
),
decoration: BoxDecoration(
color: Color(0xfff3f3f3),
borderRadius: BorderRadius.all(Radius.circular(34)),
boxShadow: <BoxShadow>[
BoxShadow(color: Color(0xfff3f3f3), offset: Offset(1, 1)),
],
),
child: InkWell(
onTap: () {},
child: Container(
child: Row(children: [
Icon(
AntDesign.search1,
size: BaseStyle.fontSize30,
color: BaseStyle.color999999,
),
SizedBox(width: 5),
Text(
'搜索宝贝',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: BaseStyle.color999999,
),
)
]),
),
),
),
actions: [
IconButton(
icon: Icon(
SimpleLineIcons.share,
size: 40.sp,
color: Color(0xff666666),
),
onPressed: () {
shareToWeChat(WeChatShareWebPageModel(
'https://mobile.baidu.com/item?docid=27505288',
thumbnail: WeChatImage.network(widget.shareImg),
title: widget.title,
description: '前往小蜜蜂智慧社区查看吧',
));
},
),
IconButton(
icon: Icon(
AntDesign.shoppingcart,
size: 40.sp,
color: Color(0xff666666),
),
onPressed: () {
Get.to(() => MarketCartPage());
},
),
],
);
}
}

@ -1,168 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
import 'package:akuCommunity/widget/expandable_text.dart';
import 'package:akuCommunity/widget/views/horizontal_image_view.dart';
class GoodsCommentsCard extends StatefulWidget {
final String imagePath,
name,
subtitle,
content,
addTime,
addContent,
viewNum,
usefulNum;
final List<String> contentImageList, addContentImageList;
GoodsCommentsCard(
{Key key,
this.imagePath,
this.name,
this.subtitle,
this.content,
this.addTime,
this.addContent,
this.viewNum,
this.usefulNum,
this.contentImageList,
this.addContentImageList})
: super(key: key);
@override
_GoodsCommentsCardState createState() => _GoodsCommentsCardState();
}
class _GoodsCommentsCardState extends State<GoodsCommentsCard> {
Container _cardHeader(String imagePath, name, subtitle) {
return Container(
child: Row(
children: [
Container(
margin: EdgeInsets.only(right: 12.w),
child: ClipOval(
child: CachedImageWrapper(
url: imagePath,
width: 50.w,
height: 50.w,
),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
name,
style: TextStyle(
fontSize: BaseStyle.fontSize24,
color: ktextPrimary,
),
),
SizedBox(height: 4.w),
Text(
subtitle,
style: TextStyle(
fontSize: BaseStyle.fontSize18,
color: BaseStyle.color999999,
),
),
],
),
],
),
);
}
Container _cardContent(
String content,
List<String> contentImageList,
) {
return Container(
margin: EdgeInsets.only(top: 15.w),
padding: EdgeInsets.only(bottom: 20.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(bottom: 20.w),
child: ExpandableText(
text: content,
maxLines: 3,
style: TextStyle(
fontSize: BaseStyle.fontSize24,
color: ktextPrimary,
),
expand: false,
),
),
HorizontalImageView(contentImageList),
],
),
);
}
Container _cardFooter(String viewNum) {
return Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'浏览$viewNum',
style: TextStyle(
fontSize: BaseStyle.fontSize22,
color: BaseStyle.color999999,
),
),
InkWell(
onTap: () {},
child: Row(
children: [
Icon(
Feather.triangle,
size: BaseStyle.fontSize22,
color: ktextPrimary,
),
SizedBox(width: 10.w),
Text(
'有用',
style: TextStyle(
fontSize: BaseStyle.fontSize22,
color: ktextPrimary,
),
),
],
),
),
],
),
);
}
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(
top: 32.w,
left: 32.w,
right: 32.w,
),
padding: EdgeInsets.only(bottom: 32.w),
decoration: BoxDecoration(
border:
Border(bottom: BorderSide(color: Color(0xffd8d8d8), width: 0.5)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_cardHeader(widget.imagePath, widget.name, widget.subtitle),
_cardContent(widget.content, widget.contentImageList),
_cardFooter(widget.viewNum),
],
),
);
}
}

@ -1,188 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:akuCommunity/pages/market/market_cart_page/market_cart_page.dart';
import 'package:akuCommunity/provider/cart.dart';
import 'package:akuCommunity/widget/goods_specs_sheet.dart';
class GoodsDetailsBottomBar extends StatefulWidget {
final String itemid, itemtitle, itemprice, itempic;
GoodsDetailsBottomBar(
{Key key, this.itemid, this.itemtitle, this.itemprice, this.itempic})
: super(key: key);
@override
_GoodsDetailsBottomBarState createState() => _GoodsDetailsBottomBarState();
}
class _GoodsDetailsBottomBarState extends State<GoodsDetailsBottomBar> {
int count = 1;
bool _isCollected = false;
void _showModelBotoomSheet(String type) {
showModalBottomSheet(
// isScrollControlled: true,
context: context,
backgroundColor: Colors.white,
builder: (context) {
return GoodsSpecsSheet(
itemid: widget.itemid,
itemtitle: widget.itemtitle,
itempic: widget.itempic,
itemprice: widget.itemprice,
type: type,
);
},
);
}
@override
Widget build(BuildContext context) {
return Consumer<CartProvidde>(builder: (context, model, child) {
return Container(
decoration: BoxDecoration(
color: Color(0xffffffff),
boxShadow: <BoxShadow>[
BoxShadow(
color: Colors.black,
offset: Offset(1.1, 1.1),
),
],
),
padding: EdgeInsets.only(
left: 35.w,
right: 35.w,
top: 13.w,
bottom: 47.w,
),
child: Row(
children: [
InkWell(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
_isCollected
? Icon(
AntDesign.star,
color: Colors.red,
size: 38.sp,
)
: Icon(
AntDesign.staro,
color: Color(0xff000000),
size: ScreenUtil().setSp(38),
),
SizedBox(height: 2),
Text(
'收藏',
style: TextStyle(
fontSize: ScreenUtil().setSp(18),
color: Color(0xff999999)),
)
],
),
onTap: () {
setState(() {
_isCollected = !_isCollected;
});
},
),
SizedBox(width: 46.w),
InkWell(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(
AntDesign.shoppingcart,
color: Color(0xff000000),
size: ScreenUtil().setSp(38),
),
SizedBox(height: 2),
Text(
'购物车',
style: TextStyle(
fontSize: ScreenUtil().setSp(18),
color: Color(0xff999999)),
)
],
),
onTap: () {
Get.to(() => MarketCartPage());
},
),
SizedBox(width: 53.w),
InkWell(
child: Container(
decoration: BoxDecoration(
color: Color(0xff36373b),
borderRadius: BorderRadius.all(Radius.circular(33)),
boxShadow: <BoxShadow>[
BoxShadow(
color: Color(0xff36373b).withOpacity(0.3),
offset: Offset(1, 1),
),
],
),
padding: EdgeInsets.symmetric(
horizontal: 40.w,
vertical: 12.w,
),
child: Text(
'加入购物车',
style: TextStyle(
fontSize: ScreenUtil().setSp(30),
color: Color(0xffffffff),
),
),
),
onTap: () {
_showModelBotoomSheet('加入购物车');
}
// () {
// _showModelBotoomSheet();
// // await model.save(widget.itemid, widget.itemtitle, count,
// // widget.itemprice, widget.itempic);
// } //_showModelBotoomSheet,
),
SizedBox(width: 24.w),
InkWell(
child: Container(
decoration: BoxDecoration(
color: Color(0xffffc40c),
borderRadius: BorderRadius.all(Radius.circular(33)),
boxShadow: <BoxShadow>[
BoxShadow(
color: Color(0xffffc40c),
offset: Offset(1, 1),
),
],
),
padding: EdgeInsets.symmetric(
horizontal: 55.w,
vertical: 12.w,
),
child: Text(
'立即购买',
style: TextStyle(
fontSize: ScreenUtil().setSp(30),
color: Color(0xff333333),
),
),
),
onTap: () {
_showModelBotoomSheet('立即购买');
} //_showModelBotoomSheet,
),
],
),
);
});
}
}

@ -1,200 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:fluwx/fluwx.dart';
class ProductContent extends StatelessWidget {
final String itemprice, itemtitle, itemshorttitle, itemdesc;
ProductContent(
{Key key,
this.itemprice,
this.itemtitle,
this.itemshorttitle,
this.itemdesc})
: super(key: key);
Row _rowPrice(String price) {
return Row(
children: [
Text(
'$price',
style: TextStyle(
fontSize: ScreenUtil().setSp(42),
color: Color(0xff333333),
fontWeight: FontWeight.w500,
),
),
SizedBox(width: 10.w),
Text(
'',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: Color(0xff333333),
fontWeight: FontWeight.w500,
),
),
],
);
}
Container _containerTitle(String title) {
return Container(
margin: EdgeInsets.only(
top: 28.w,
bottom: 18.w,
right: 106.w,
),
child: Text(
title,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenUtil().setSp(30), color: Color(0xff333333)),
),
);
}
Container _containerSubtitle(String shortTitle) {
return Container(
margin: EdgeInsets.only(right: 286.w),
child: Text(
shortTitle,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenUtil().setSp(24), color: Color(0xff666666)),
),
);
}
Container _containerRecommend(String desc) {
return Container(
decoration: BoxDecoration(
color: Color(0xfff0f0f0),
borderRadius: BorderRadius.all(Radius.circular(4)),
boxShadow: <BoxShadow>[
BoxShadow(color: Color(0xfff3f3f3), offset: Offset(1, 1)),
],
),
margin: EdgeInsets.only(
left: 72.w,
right: 72.w,
top: 58.w,
),
padding: EdgeInsets.symmetric(
horizontal: 33.w,
vertical: 11.w,
),
child: Text(
desc,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: Color(0xff666666),
),
),
);
}
Positioned _positionedShare() {
return Positioned(
right: 0,
top: 169.w,
child: InkWell(
onTap: () {
shareToWeChat(WeChatShareWebPageModel(
'https://mobile.baidu.com/item?docid=27505288',
title: itemtitle,
description: '前往小蜜蜂智慧社区查看吧',
));
},
child: Container(
decoration: BoxDecoration(
color: Color(0xfff0f0f0),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(100),
bottomLeft: Radius.circular(100),
),
boxShadow: <BoxShadow>[
BoxShadow(color: Color(0xfff3f3f3), offset: Offset(1, 1)),
],
),
padding: EdgeInsets.symmetric(
horizontal: 14.w,
vertical: 9.w,
),
child: Row(
children: [
Icon(
SimpleLineIcons.share,
size: ScreenUtil().setSp(20),
),
SizedBox(width: 12.w),
Text(
'分享',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: Color(0xff666666),
),
)
],
),
),
),
);
}
Positioned _positionedRecommend() {
return Positioned(
right: 453.w,
bottom: 100.w,
child: Row(
children: [
Icon(
AntDesign.hearto,
color: Color(0xff999999),
size: ScreenUtil().setSp(24),
),
SizedBox(width: 12.w),
Text(
'推荐理由',
style: TextStyle(
fontSize: ScreenUtil().setSp(20), color: Color(0xff999999)),
),
],
),
);
}
@override
Widget build(BuildContext context) {
return Container(
color: Color(0xffffffff),
child: Stack(
children: [
Padding(
padding: EdgeInsets.only(
left: 32.w,
top: 25.w,
bottom: 20.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_rowPrice(itemprice),
_containerTitle(itemtitle),
_containerSubtitle(itemshorttitle),
_containerRecommend(itemdesc),
],
),
),
_positionedShare(),
_positionedRecommend(),
],
),
);
}
}

@ -1,57 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
class ProductDetail extends StatelessWidget {
final String picDesc;
ProductDetail({Key key, this.picDesc}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
color: Color(0xffffffff),
margin: EdgeInsets.only(top: 30.w),
padding: EdgeInsets.only(
top: 20.w,
left: 32.w,
right: 32.w,
bottom: 32.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'商品详情',
style: TextStyle(
fontSize: BaseStyle.fontSize30,
color: Color(0xff333333),
),
),
SizedBox(height: 12.w),
Container(
child: AspectRatio(
aspectRatio: 1,
child: CachedImageWrapper(
url: picDesc.contains('http')
? picDesc
: 'http://img-haodanku-com.cdn.fudaiapp.com/' + picDesc,
width: 1,
height: 1,
fit: BoxFit.fill,
),
),
),
// Container(
// child: Image.asset(
// picDesc,
// fit: BoxFit.fill,
// ),
// ),
],
),
);
}
}

@ -1,111 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class ProductEvaluate extends StatelessWidget {
final Function fun;
ProductEvaluate({Key key, this.fun}) : super(key: key);
Stack _stackEvaluateHeader() {
return Stack(
children: [
Row(
children: [
Text(
'宝贝评价(1239)',
style: TextStyle(
fontSize: ScreenUtil().setSp(30),
color: Color(0xff333333),
),
),
],
),
Positioned(
right: 32.w,
child: InkWell(
onTap: () {
fun();
},
child: Row(
children: [
Text(
'查看全部',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff999999),
),
),
SizedBox(width: 20.w),
Icon(
AntDesign.right,
size: ScreenUtil().setSp(34),
color: Color(0xff999999),
),
],
),
),
),
],
);
}
Column _columnEvaluateContent() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
ClipOval(
child: Image.asset(
'assets/example/touxiang1.png',
height: 50.w,
width: 50.w,
fit: BoxFit.fill,
),
),
SizedBox(width: 10.w),
Text(
'就是安安啊',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff999999),
),
),
],
),
SizedBox(height: 12.w),
Text(
'面料和版型都不错,会回购',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xff333333),
fontSize: ScreenUtil().setSp(24),
),
),
],
);
}
@override
Widget build(BuildContext context) {
return Container(
color: Color(0xffffffff),
margin: EdgeInsets.only(top: 30.w),
padding: EdgeInsets.only(
top: 20.w,
left: 32.w,
bottom: 32.w,
),
child: Column(
children: [
_stackEvaluateHeader(),
SizedBox(height: 32.w),
_columnEvaluateContent(),
],
),
);
}
}

@ -1,122 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class ProductService extends StatelessWidget {
const ProductService({Key key}) : super(key: key);
Row _rowDelivergoods() {
return Row(
children: [
Text(
'发货',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff999999),
),
),
SizedBox(width: 59.w),
Row(
children: [
Icon(
EvilIcons.location,
size: ScreenUtil().setSp(34),
color: Color(0xff666666),
),
SizedBox(
width: 9.w,
),
Text(
'浙江杭州',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff333333),
),
),
],
),
SizedBox(width: 38.w),
Row(
children: [
Text(
'快递:',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff333333),
),
),
SizedBox(
width: 9.w,
),
Text(
'全国包邮',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff333333),
),
),
],
),
],
);
}
Row _rowService() {
return Row(
children: [
Text(
'服务',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff999999),
),
),
SizedBox(width: 59.w),
Text(
'品质保证',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff333333),
),
),
SizedBox(width: 16.w),
SizedBox(
width: 1,
height: 24.w,
child: DecoratedBox(
decoration: BoxDecoration(color: Color(0xffd8d8d8)),
),
),
SizedBox(width: 16.w),
Text(
'售后无忧',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff333333),
),
),
],
);
}
@override
Widget build(BuildContext context) {
return Container(
color: Color(0xffffffff),
margin: EdgeInsets.only(top: 30.w),
padding: EdgeInsets.symmetric(
vertical: 20.w,
horizontal: 60.w,
),
child: Column(
children: [
_rowDelivergoods(),
SizedBox(height: 39.w),
_rowService(),
],
),
);
}
}

@ -1,74 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:akuCommunity/widget/goods_specs_sheet.dart';
class ProductSpecs extends StatefulWidget {
ProductSpecs({Key key}) : super(key: key);
@override
_ProductSpecsState createState() => _ProductSpecsState();
}
class _ProductSpecsState extends State<ProductSpecs> {
void _showModelBotoomSheet() {
showModalBottomSheet(
isScrollControlled: true,
context: context,
backgroundColor: Colors.white,
builder: (context) {
return GoodsSpecsSheet();
},
);
}
@override
Widget build(BuildContext context) {
return InkWell(
onTap: _showModelBotoomSheet,
child: Container(
color: Color(0xffffffff),
margin: EdgeInsets.only(top: 30.w),
padding: EdgeInsets.only(
left: 60.w,
top: 20.w,
bottom: 20.w,
),
child: Stack(
children: [
Row(
children: [
Text(
'规格',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff999999),
),
),
SizedBox(width: 59.w),
Text(
'请选择规格',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff333333),
),
),
],
),
Positioned(
right: 32.w,
child: Icon(
AntDesign.right,
size: ScreenUtil().setSp(34),
color: Color(0xff999999),
),
),
],
),
),
);
}
}

@ -1,79 +0,0 @@
import 'dart:math';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
// import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:akuCommunity/utils/fade_route.dart';
import 'package:akuCommunity/widget/gallery_photo_view_wrapper.dart';
class ProductSwiper extends StatelessWidget {
final List<String> imageUrl;
ProductSwiper({Key key, this.imageUrl}) : super(key: key);
final Random _random = new Random();
int next(int min, int max) => min + _random.nextInt(max - min);
List imageModel() {
List imgList = List();
for (int x = 0; x < imageUrl.length; x++) {
GalleryExampleItem item = GalleryExampleItem();
item.id = '${next(x + 100, x + 1000)}';
item.resource = imageUrl[x];
imgList.add(item);
}
return imgList;
}
@override
Widget build(BuildContext context) {
return Container(
height: 500.w,
// child: Swiper(
// itemBuilder: (BuildContext context, int index) {
// return AspectRatio(
// aspectRatio: 1,
// child: GalleryExampleItemThumbnail(
// galleryExampleItem: imageModel()[index],
// onTap: () {
// Navigator.of(context).push(new FadeRoute(
// page: GalleryPhotoViewWrapper(
// galleryItems: imageModel(),
// backgroundDecoration: const BoxDecoration(
// color: Colors.black,
// ),
// initialIndex: index,
// ),
// ));
// },
// ),
// );
// },
// itemCount: 3,
// scrollDirection: Axis.horizontal,
// autoplay: true,
// duration: 600,
// onTap: (index) {
// debugPrint("点击了第:$index");
// },
// controller: SwiperController(),
// pagination: SwiperPagination(
// //
// alignment: Alignment.bottomCenter, // Alignment.bottomCenter
// margin: const EdgeInsets.fromLTRB(0, 0, 0, 5), //
// builder: DotSwiperPaginationBuilder(
// activeColor: Color(0xffFEC200),
// color: Colors.white,
// size: 15.w,
// activeSize: 25.w,
// space: 10.w,
// ),
// ),
// autoplayDelay: 5000,
// autoplayDisableOnInteraction: true,
// ),
);
}
}

@ -1,4 +1,3 @@
import 'package:akuCommunity/provider/app_provider.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -8,6 +7,7 @@ import 'package:provider/provider.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:akuCommunity/model/manager/article_QR_code_model.dart';
import 'package:akuCommunity/provider/app_provider.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/dotted_line.dart';

@ -2,9 +2,6 @@
import 'dart:io';
import 'package:akuCommunity/constants/app_values.dart';
import 'package:akuCommunity/provider/app_provider.dart';
import 'package:akuCommunity/ui/profile/house/pick_my_house_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -17,9 +14,10 @@ import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/const/resource.dart';
import 'package:akuCommunity/constants/api.dart';
import 'package:akuCommunity/pages/goods_deto_page/select_move_company_page.dart';
import 'package:akuCommunity/pages/life_pay/widget/my_house_page.dart';
import 'package:akuCommunity/pages/manager_func.dart';
import 'package:akuCommunity/provider/app_provider.dart';
import 'package:akuCommunity/provider/user_provider.dart';
import 'package:akuCommunity/ui/profile/house/pick_my_house_page.dart';
import 'package:akuCommunity/utils/bee_parse.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/utils/network/base_model.dart';

@ -126,7 +126,7 @@ class _GoodsDetoPageState extends State<GoodsDetoPage> {
}
: () {
userProvider.isLogin
? Get.to(()=>DetoCreatePage())
? Get.to(() => DetoCreatePage())
: BotToast.showText(text: '请先登录!');
},
child: _isEdit

@ -1,64 +0,0 @@
import 'dart:math';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/utils/fade_route.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/gallery_photo_view_wrapper.dart';
class ImageHorizontalList extends StatelessWidget {
final List<String> imageUrl;
ImageHorizontalList({Key key, this.imageUrl}) : super(key: key);
final Random _random = new Random();
int next(int min, int max) => min + _random.nextInt(max - min);
List imageModel() {
List imgList = List();
for (int x = 0; x < imageUrl.length; x++) {
GalleryExampleItem item = GalleryExampleItem();
item.id = '${next(x + 100, x + 1000)}';
item.resource = imageUrl[x];
imgList.add(item);
}
return imgList;
}
@override
Widget build(BuildContext context) {
return Container(
height: 184.w,
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
itemBuilder: (BuildContext context, int index) {
return AspectRatio(
aspectRatio: 1,
child: Container(
margin: EdgeInsets.only(right: 16.w),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(4)),
child: GalleryExampleItemThumbnail(
galleryExampleItem: imageModel()[index],
onTap: () {
Navigator.of(context).push(new FadeRoute(
page: GalleryPhotoViewWrapper(
galleryItems: imageModel(),
backgroundDecoration: const BoxDecoration(
color: Colors.black,
),
initialIndex: index,
),
));
},
),
),
),
);
},
itemCount: imageUrl.length,
),
);
}
}

@ -104,45 +104,9 @@ class _HomePageState extends State<HomePage>
// HomeSwiper(),
// SizedBox(height: 100.w),
ApplicationBox(child: ApplicationView()),
// SingleAdSpace(
// imagePath: R.ASSETS_EXAMPLE_GUANGGAO2_PNG,
// ),
// Column(
// children: [
// HomeTagBar(
// title: '社区团购',
// tag: '团购',
// isShowImage: false,
// ),
// HomeCard(
// isActivity: false,
// title: '新疆库尔阿勒4.5斤,仙人蕉 香甜可口',
// subtitleOne: '中国新疆',
// subtitleTwo: '2020年07月03日',
// imagePath:
// 'http://news.eastday.com/d/file/tga/2013-02-17/c2e7bd7fca1ed2ecf5d50dc9fb30275d.jpg',
// ),
// HomeCard(
// isActivity: false,
// title: '刚果柠檬大果4盒 鲜果新鲜采摘15斤',
// subtitleOne: '非洲刚果',
// subtitleTwo: '2020年08月09日',
// imagePath:
// 'http://5b0988e595225.cdn.sohucs.com/images/20180203/328e145f84c54dd08d1b11b890109862.jpeg',
// ),
// ],
// ),
// SizedBox(height: 30.w),
// HomeTagBar(
// title: '社区商城',
// tag: '团购',
// isShowImage: false,
// isShowTitle: true,
// ),
],
),
),
SliverToBoxAdapter(
child: Column(
children: [
@ -165,15 +129,6 @@ class _HomePageState extends State<HomePage>
.margin(EdgeInsets.symmetric(horizontal: 32.w))
.make(),
),
// SliverPadding(
// padding: EdgeInsets.only(
// top: 30.w,
// left: 32.w,
// right: 32.w,
// ),
// sliver: _shopList.length == 0
// ? SliverToBoxAdapter(child: GoodsCardSkeleton())
// : SliverGoodsCard(shoplist: _shopList)),
],
),
),

@ -1,11 +1,10 @@
import 'package:akuCommunity/constants/app_values.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provider/provider.dart';
import 'package:akuCommunity/provider/app_provider.dart';
import 'package:akuCommunity/utils/headers.dart';
class AnimateAppBar extends StatefulWidget with PreferredSizeWidget {
final ScrollController scrollController;
@ -41,7 +40,7 @@ class _AnimateAppBarState extends State<AnimateAppBar> {
Widget build(BuildContext context) {
final appProvider = Provider.of<AppProvider>(context);
return AppBar(
title: Text( S.of(context).tempPlotName),
title: Text(S.of(context).tempPlotName),
backgroundColor: _bgColor,
leading: Container(
margin: EdgeInsets.only(left: 32.w),
@ -49,14 +48,15 @@ class _AnimateAppBarState extends State<AnimateAppBar> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
appProvider?.location['city'] ?? '',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 24.sp,
color: Color(0xff333333),
if (appProvider?.location != null)
Text(
appProvider?.location['city'] ?? '',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 24.sp,
color: Color(0xff333333),
),
),
),
Text(
'${appProvider.weatherType} ${appProvider.weatherTemp}',
style: TextStyle(

@ -1,93 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
// import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
//TODO CLEAN BOTTOM CODES.
@Deprecated("sh*t home_swiper need to be cleaned.")
class HomeSwiper extends StatefulWidget {
HomeSwiper({Key key}) : super(key: key);
@override
_HomeSwiperState createState() => _HomeSwiperState();
}
class _HomeSwiperState extends State<HomeSwiper> {
List<String> imageList = [
'https://img.zcool.cn/community/0105a75f7298a211013e45848411c8.jpg',
'https://img.zcool.cn/community/018c135f73e06711013e4584f1f2fd.jpg',
'https://img.zcool.cn/community/01e08257de03a10000018c1b55623d.jpg@1280w_1l_2o_100sh.jpg'
];
@override
Widget build(BuildContext context) {
return Stack(
overflow: Overflow.visible,
children: [
Container(
height: 181.w,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [Color(0xffffd000), Color(0xffffbd00)],
),
),
),
// Positioned(
// top: 17.w,
// left: 0,
// right: 0,
// bottom: -76.w,
// child: Swiper(
// itemBuilder: (BuildContext context, int index) {
// return Container(
// decoration: BoxDecoration(
// color: Colors.white,
// boxShadow: [
// BoxShadow(
// color: Colors.grey.withOpacity(0.2),
// offset: Offset(1.1, 1.1),
// blurRadius: 10.0),
// ],
// ),
// child: CachedImageWrapper(
// url: imageList[index],
// height: 240.w,
// width: 686.w,
// ),
// );
// },
// itemCount: 3,
// scrollDirection: Axis.horizontal,
// viewportFraction: 0.8,
// scale: 0.9,
// autoplay: true,
// duration: 600,
// onTap: (index) {
// debugPrint("点击了第:$index");
// },
// controller: SwiperController(),
// pagination: SwiperPagination(
// //
// alignment:
// Alignment.bottomCenter, // Alignment.bottomCenter
// margin: const EdgeInsets.fromLTRB(0, 0, 0, 5), //
// builder: DotSwiperPaginationBuilder(
// activeColor: Color(0xffFEC200),
// color: Colors.white,
// size: 15.w,
// activeSize: 20.w,
// space: 10.w,
// ),
// ),
// autoplayDelay: 5000,
// autoplayDisableOnInteraction: true,
// ),
// ),
],
);
}
}

@ -1,252 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:get/get.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/round_check_box.dart';
import 'widget/invoice_input.dart';
class InvoicePage extends StatefulWidget {
final Bundle bundle;
InvoicePage({Key key, this.bundle}) : super(key: key);
@override
_InvoicePageState createState() => _InvoicePageState();
}
class _InvoicePageState extends State<InvoicePage> {
var _scaffoldKey = new GlobalKey<ScaffoldState>();
GlobalKey _formKey = new GlobalKey<FormState>();
bool _checkDetail = false;
bool isEnterprise = false;
List _checkRise = [true, false];
@override
void initState() {
super.initState();
}
void checkDetail() {
setState(() {
_checkDetail = !_checkDetail;
});
}
Container _containerInvoiceDetailCheck() {
return Container(
color: Colors.white,
height: 96.w,
padding: EdgeInsets.symmetric(
vertical: 28.w,
horizontal: 32.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
InkWell(
onTap: () {},
child: Row(
children: [
Text(
'发票内容',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
SizedBox(width: 6.w),
Icon(
AntDesign.exclamationcircleo,
size: 20.sp,
color: Color(0xff999999),
),
],
),
),
RoundCheckBox(
value: _checkDetail,
onChanged: checkDetail,
title: '明细',
),
],
),
);
}
InkWell _containerSubmit() {
return InkWell(
onTap: () {},
child: Container(
color: Color(0xffffc40c),
height: 85.w,
margin: EdgeInsets.symmetric(
horizontal: 43.w,
),
padding: EdgeInsets.symmetric(
vertical: 20.w,
),
alignment: Alignment.center,
child: Text(
'确认',
style: TextStyle(
fontSize: 32.sp,
color: Color(0xff333333),
),
),
),
);
}
@override
Widget build(BuildContext context) {
List<Map<String, dynamic>> _listHeader = [
{
'title': '发票类型',
'rightWidget': Container(
child: InkWell(
onTap: () {},
child: Row(
children: [
Text(
'增值税电子普票',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
SizedBox(width: 12.w),
Icon(
AntDesign.right,
size: 20.sp,
color: Color(0xff333333),
),
],
),
),
)
},
{
'title': '抬头类型',
'rightWidget': Container(
child: Row(
children: [
RoundCheckBox(
value: _checkRise[0],
onChanged: () {
setState(() {
if (!_checkRise[0]) {
isEnterprise = false;
_checkRise = [true, false];
}
return;
});
},
title: '个人/事业单位',
),
SizedBox(width: 12.w),
RoundCheckBox(
value: _checkRise[1],
onChanged: () {
setState(() {
if (!_checkRise[1]) {
isEnterprise = true;
_checkRise = [false, true];
}
return;
});
},
title: '企业',
),
],
),
)
},
];
Container _containerHeader() {
return Container(
decoration: BoxDecoration(
color: Colors.white,
border: Border(
top: BorderSide(
width: 0.5, //
color: Color(0xffd8d8d8), //
),
),
),
child: Column(
children: _listHeader
.map((item) => Container(
padding: EdgeInsets.only(
left: 77.w,
right: 32.w,
top: 28.w,
// bottom: 28.w,
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
item['title'],
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
item['rightWidget']
],
),
SizedBox(height: 28.w),
Divider(height: 1),
],
),
))
.toList(),
),
);
}
return BeeScaffold(
key: _scaffoldKey,
title: '开具发票',
leading: IconButton(
icon: Icon(AntDesign.left, size: 40.sp),
onPressed: () {
Get.back();
},
),
body: SingleChildScrollView(
child: Container(
height: 1334.w,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child: Column(
children: [
_containerHeader(),
Form(
key: _formKey,
child: Column(
children: [InvoiceInput(isEnterprise: isEnterprise)],
),
),
SizedBox(height: 66.w),
_containerInvoiceDetailCheck(),
SizedBox(height: 92.w),
_containerSubmit(),
],
),
),
),
),
);
}
}

@ -1,101 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/utils/headers.dart';
class InvoiceInput extends StatefulWidget {
final bool isEnterprise;
InvoiceInput({Key key, this.isEnterprise}) : super(key: key);
@override
_InvoiceInputState createState() => _InvoiceInputState();
}
class _InvoiceInputState extends State<InvoiceInput> {
TextEditingController _userName = new TextEditingController();
TextEditingController _userPhone = new TextEditingController();
TextEditingController _userAddress = new TextEditingController();
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
List<Map<String, dynamic>> _listTextField = [
{'title': '发票抬头', 'hintText': '请输入', 'controller': _userName},
{'title': '税号', 'hintText': '请输入', 'controller': _userPhone},
{'title': '开户银行', 'hintText': '选填', 'controller': _userAddress},
{'title': '银行账号', 'hintText': '选填', 'controller': _userAddress},
{'title': '企业地址', 'hintText': '选填', 'controller': _userAddress},
{'title': '企业电话', 'hintText': '选填', 'controller': _userAddress},
];
List<Widget> _listTextFieldView(List listInput) {
return listInput
.map((item) => Container(
padding: EdgeInsets.only(
left: 77.w,
right: 32.w,
top: 28.w,
// bottom: 28.w,
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
item['title'],
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
Expanded(
child: TextFormField(
// inputFormatters: item['title'] == '税号'
// ? [
// LengthLimitingTextInputFormatter(11),
// ]
// : [],
cursorColor: Color(0xffffc40c),
style: TextStyle(fontSize: 28.sp),
controller: item['controller'],
onChanged: (String value) {},
textAlign: TextAlign.end,
decoration: InputDecoration(
isDense: true,
contentPadding: EdgeInsets.only(
top: 0.w,
bottom: 0.w,
),
hintText: item['hintText'],
border: InputBorder.none, //线
fillColor: Colors.white,
filled: true,
hintStyle: TextStyle(
color: Color(0xff999999), fontSize: 24.sp),
),
),
),
],
),
SizedBox(height: 28.w),
Divider(height: 1),
],
),
))
.toList();
}
return Container(
color: Colors.white,
child: Column(
children: widget.isEnterprise
? _listTextFieldView(_listTextField)
: _listTextFieldView([_listTextField.first]),
),
);
}
}

@ -1,41 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/pages/life_pay/life_pay_bill_page/life_pay_bill_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:get/get.dart';
import '../widget/submit_bar.dart';
import 'widget/details_card.dart';
class LifePayInfoPage extends StatefulWidget {
final Bundle bundle;
LifePayInfoPage({Key key, this.bundle}) : super(key: key);
@override
_LifePayInfoPageState createState() => _LifePayInfoPageState();
}
class _LifePayInfoPageState extends State<LifePayInfoPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: ' ${widget.bundle.getMap('detailMap')['title']}明细',
body: Stack(
children: [
ListView(
padding: EdgeInsets.only(bottom: 130.w),
children: [
DetailsCard(fun: () => Get.to(() => LifePayBillPage())),
],
),
Positioned(
bottom: 0,
child: SubmitBar(title: '选好了'),
),
],
),
);
}
}

@ -1,124 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
class DetailsCard extends StatefulWidget {
final Function fun;
DetailsCard({Key key, this.fun}) : super(key: key);
@override
_DetailsCardState createState() => _DetailsCardState();
}
class _DetailsCardState extends State<DetailsCard> {
Container _detailHeader() {
return Container(
margin: EdgeInsets.only(
top: 20.w,
bottom: 18.w,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'公共能耗费',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize30,
color: ktextPrimary,
),
),
Text(
'宁波华茂悦峰 1幢-1单元-702室',
style: TextStyle(
fontSize: BaseStyle.fontSize30,
color: ktextPrimary,
),
),
],
),
);
}
InkWell _detailContent(Function fun) {
return InkWell(
onTap: fun,
child: Container(
margin: EdgeInsets.only(top: 32.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Icon(
Icons.radio_button_unchecked,
color: BaseStyle.color999999,
size: 40.w,
),
SizedBox(width: 24.w),
Text(
'2019上半年',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: ktextPrimary,
),
),
],
),
Row(
children: [
Text(
'¥${50.90}',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize28,
color: Color(0xfffc361d),
),
),
SizedBox(width: 28.w),
Icon(
AntDesign.right,
color: BaseStyle.color999999,
size: 30.w,
),
],
),
],
),
),
);
}
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(
top: 32.w,
left: 32.w,
right: 32.w,
),
padding: EdgeInsets.only(
left: 32.w,
right: 32.w,
bottom: 32.w,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(6)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_detailHeader(),
_detailContent(widget.fun),
_detailContent(widget.fun),
],
),
);
}
}

@ -1,14 +1,16 @@
import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/constants/api.dart';
import 'package:akuCommunity/model/manager/life_pay_record_model.dart';
import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
class LifePayRecordPage extends StatefulWidget {
LifePayRecordPage({Key key}) : super(key: key);

@ -1,5 +1,3 @@
import 'package:akuCommunity/constants/app_values.dart';
import 'package:akuCommunity/provider/app_provider.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -8,6 +6,7 @@ import 'package:provider/provider.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/model/manager/life_pay_model.dart';
import 'package:akuCommunity/provider/app_provider.dart';
import 'package:akuCommunity/provider/user_provider.dart';
import 'package:akuCommunity/utils/bee_parse.dart';
import 'package:akuCommunity/utils/headers.dart';

@ -1,4 +1,3 @@
import 'package:akuCommunity/provider/app_provider.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -7,6 +6,7 @@ import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/model/manager/estate_payment_model.dart';
import 'package:akuCommunity/pages/goods_deto_page/deto_create_page/widget/common_radio.dart';
import 'package:akuCommunity/pages/manager_func.dart';
import 'package:akuCommunity/provider/app_provider.dart';
import 'package:akuCommunity/provider/user_provider.dart';
import 'package:akuCommunity/utils/bee_parse.dart';
import 'package:akuCommunity/utils/headers.dart';

@ -1,438 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:provider/provider.dart';
import 'package:akuCommunity/model/aku_shop_model.dart';
import 'package:akuCommunity/provider/cart.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
import 'package:akuCommunity/widget/cart_count.dart';
import 'widget/market_cart_app_bar.dart';
class MarketCartPage extends StatefulWidget {
final AkuShopModel cartItem;
MarketCartPage({Key key, this.cartItem}) : super(key: key);
@override
_MarketCartPageState createState() => _MarketCartPageState();
}
class _MarketCartPageState extends State<MarketCartPage> {
Widget _cardRadio(
BuildContext context, AkuShopModel cartItem, CartProvidde model, index) {
return InkWell(
onTap: () {
setState(() {
cartItem.isCheck = !cartItem.isCheck;
int _goods = shopList.indexWhere(
(element) => element.itemid == _cartList[index].itemid);
_goods > -1
? shopList.removeAt(_goods)
: shopList.add(_cartList[index]);
print(shopList);
});
},
child: Container(
alignment: Alignment.center,
child: Icon(
Icons.check_circle,
color: cartItem.isCheck ? Color(0xffdb0000) : Color(0xff999999),
size: 36.w,
),
),
);
}
Widget _image(String imagePath) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 20.w),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(2)),
child: CachedImageWrapper(
url: imagePath,
width: 180.w,
height: 180.w,
),
),
);
}
Widget _content(String content, specs, price) {
return Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 394.w,
child: Text(
content,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff333333),
),
),
),
Container(
margin: EdgeInsets.only(top: 40.w),
child: Text(
'$price',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xffe60e0e),
),
),
),
],
),
);
}
// List<Map<String, dynamic>> _listGoods = [
// {
// 'imagePath':
// 'http://img.alicdn.com/imgextra/i3/2113905378/O1CN01aH72RP1pbAf1n1amP_!!2113905378.jpg',
// 'content': '2020很仙的开衫女春秋装韩版宽松加厚百搭外搭毛衣外套针织衫',
// 'specs': '165/M',
// 'price': 69.9,
// 'goodsNum': 1,
// 'isCheck': false
// },
// {
// 'imagePath':
// 'http://img.alicdn.com/imgextra/i3/2261315282/O1CN01FLPB6E1otCdaEw4OC_!!2261315282.jpg',
// 'content': '微商爆款女士MCKZ阳离子秋冬柔软舒适打底衫高领针织螺纹棉上衣',
// 'specs': '165/M',
// 'price': 129.9,
// 'goodsNum': 1,
// 'isCheck': false
// },
// ];
// bool isAll = false;
// double _currentPrice = 0;
// int _currentGoodsNum = 0;
// void funAll() {
// setState(() {
// isAll = !isAll;
// if (isAll) {
// _currentPrice = 0;
// _currentGoodsNum = 0;
// }
// _listGoods.forEach((item) {
// item["isCheck"] = isAll;
// if (item["isCheck"]) {
// _currentPrice += item["price"] * item["goodsNum"];
// _currentGoodsNum++;
// } else {
// _currentPrice -= item["price"] * item["goodsNum"];
// _currentGoodsNum--;
// }
// });
// });
// }
// void funIsSelect(int index) {
// setState(() {
// _listGoods[index]["isCheck"] = !_listGoods[index]["isCheck"];
// if (_listGoods[index]["isCheck"]) {
// _currentPrice +=
// _listGoods[index]["price"] * _listGoods[index]["goodsNum"];
// _currentGoodsNum++;
// } else {
// _currentPrice -=
// _listGoods[index]["price"] * _listGoods[index]["goodsNum"];
// _currentGoodsNum--;
// }
// if (_listGoods.every((item) => item["isCheck"])) {
// isAll = true;
// } else {
// isAll = false;
// }
// });
// }
// void reduce(int index) {
// setState(() {
// _listGoods[index]["goodsNum"]--;
// if (_currentPrice != 0) {
// _currentPrice = 0;
// _listGoods.forEach((item) {
// if (item["isCheck"]) {
// _currentPrice += item["price"] * item["goodsNum"];
// }
// });
// }
// });
// }
// void add(int index) {
// setState(() {
// _listGoods[index]["goodsNum"]++;
// if (_currentPrice != 0) {
// _currentPrice = 0;
// _listGoods.forEach((item) {
// if (item["isCheck"]) {
// _currentPrice += item["price"] * item["goodsNum"];
// }
// });
// }
// });
// }
// void funSubimt() {
// // setState(() {
// // isAll = !isAll;
// // });
// }
List<AkuShopModel> shopList = [];
bool get _selectALl {
for (var element in _cartList) {
int _selectGoods =
shopList.indexWhere((index) => element.itemid == index.itemid);
if (_selectGoods == -1) return false;
}
return true;
}
double get _allprice {
double _price = 0;
for (var element in shopList) {
_price += double.parse(element.itemprice) * element.count;
}
return _price;
}
int get _goodsCount => shopList.length;
List<AkuShopModel> _cartList;
Widget _selectAll(
CartProvidde model,
) {
return InkWell(
onTap: () {
for (var element in _cartList) {
element.isCheck = !_selectALl;
}
model.changeALlCheckState(true);
setState(() {
if (_selectALl == true)
shopList.clear();
else {
shopList.clear();
shopList.addAll(_cartList);
}
});
},
child: Container(
margin: EdgeInsets.symmetric(vertical: 29.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(
_selectALl
? Icons.radio_button_checked
: Icons.radio_button_unchecked,
color: model.isAllCheck ? Color(0xffdb0000) : Color(0xff999999),
size: 40.w,
),
Container(
margin: EdgeInsets.only(left: 18.w),
child: Text(
'全选',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
),
],
),
),
);
}
Widget _settlement(CartProvidde model, BuildContext context) {
return Row(
children: [
model.allPrice != null
? Container(
margin: EdgeInsets.only(right: 10.w),
child: Text(
'合计:¥${_allprice.toStringAsFixed(2)}',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xffe60e0e),
),
),
)
: SizedBox(),
InkWell(
onTap: model.allGoodsCount != 0 ? () {} : null,
child: Container(
alignment: Alignment.center,
decoration: BoxDecoration(
color: model.allGoodsCount != 0
? Color(0xffffc40c)
: Color(0xffd8d8d8),
borderRadius: BorderRadius.all(Radius.circular(30)),
),
width: 198.w,
margin: EdgeInsets.symmetric(vertical: 16.w),
padding: EdgeInsets.symmetric(vertical: 12.w),
child: Text(
'结算($_goodsCount)',
style: TextStyle(
fontSize: 30.sp,
color:
model.allGoodsCount != 0 ? Color(0xff333333) : Colors.white,
),
),
),
),
],
);
}
Widget _marketCartCard(AkuShopModel cartItem, index) {
return Consumer<CartProvidde>(builder: (context, model, child) {
return Container(
margin: EdgeInsets.only(
top: 20.w,
left: 32.w,
right: 32.w,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6)),
),
child: Slidable.builder(
actionPane: SlidableBehindActionPane(),
actionExtentRatio: 0.25,
secondaryActionDelegate: SlideActionBuilderDelegate(
actionCount: 2,
builder: (context, index, animation, renderingMode) {
if (index == 0) {
return SlideAction(
child: Text(
'移至收藏夹',
style: TextStyle(fontSize: 28.sp, color: Colors.white),
),
color: renderingMode == SlidableRenderingMode.slide
? Color(0xffffc40c).withOpacity(animation.value)
: Color(0xffffc40c),
// onTap: () => _showSnackBar(context, 'More'),
closeOnTap: false,
);
} else {
return SlideAction(
onTap: () {
model.deleteGoods(cartItem.itemid);
},
decoration: BoxDecoration(
color: renderingMode == SlidableRenderingMode.slide
? Color(0xffe60e0e).withOpacity(animation.value)
: Color(0xffe60e0e),
borderRadius: BorderRadius.only(
topRight: Radius.circular(6),
bottomRight: Radius.circular(6),
),
),
child: Text(
'删除',
style: TextStyle(fontSize: 28.sp, color: Colors.white),
),
// onTap: () => _showSnackBar(context, 'Delete'),
);
}
},
),
child: Container(
color: Colors.white,
padding: EdgeInsets.only(
top: 30.w,
left: 15.w,
bottom: 37.w,
),
child: Stack(
children: [
Row(
children: [
_cardRadio(context, cartItem, model, index),
_image(cartItem.itempic),
_content(cartItem.itemtitle, '默认', cartItem.itemprice),
],
),
Positioned(
bottom: 0,
right: 16.w,
child: CartCount(
cartItem: cartItem,
// goodsNum: widget.goodsNum,
// index: widget.index,
// reduce: widget.reduce,
// add: widget.add,
),
),
],
),
),
),
);
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PreferredSize(
preferredSize: Size.fromHeight(kToolbarHeight),
child: MarketCartAppBar(),
),
bottomNavigationBar:
Consumer<CartProvidde>(builder: (context, model, child) {
return Container(
color: Colors.white,
height: 98.w,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.symmetric(horizontal: 32.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_selectAll(model),
_settlement(
model,
context,
)
],
),
);
}),
body: Stack(
children: [
Consumer<CartProvidde>(
builder: (context, model, child) {
List<AkuShopModel> cartList = model.cartList;
_cartList = model.cartList;
return ListView.builder(
itemCount: cartList.length,
itemBuilder: (BuildContext context, int index) {
return _marketCartCard(cartList[index], index);
});
},
),
// Positioned(
// bottom: 0,
// child: MarketCartBottomBar(
// selectAll: _selectALl,
// ),
// ),
],
));
}
}

@ -1,48 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:get/get.dart';
import 'package:akuCommunity/utils/headers.dart';
class MarketCartAppBar extends StatelessWidget {
const MarketCartAppBar({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
child: AppBar(
elevation: 0,
backgroundColor: Colors.white,
leading: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(AntDesign.left, size: 40.sp),
onPressed: () {
Get.back();
},
),
centerTitle: false,
title: RichText(
text: TextSpan(
style: TextStyle(
color: Color(0xff333333),
),
children: <InlineSpan>[
TextSpan(
text: '购物车 ',
style: TextStyle(
fontSize: 38.sp,
),
),
TextSpan(
text: '业主尊享,购物更省心',
style: TextStyle(fontSize: 24.sp),
),
],
),
),
),
);
}
}

@ -1,108 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:akuCommunity/provider/cart.dart';
import 'package:akuCommunity/utils/headers.dart';
class MarketCartBottomBar extends StatelessWidget {
const MarketCartBottomBar({Key key}) : super(key: key);
Widget _selectAll(CartProvidde model) {
return InkWell(
onTap: () {
model.changeALlCheckState(!model.isAllCheck);
},
child: Container(
margin: EdgeInsets.symmetric(vertical: 29.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(
model.isAllCheck
? Icons.radio_button_checked
: Icons.radio_button_unchecked,
color: model.isAllCheck ? Color(0xffdb0000) : Color(0xff999999),
size: 40.w,
),
Container(
margin: EdgeInsets.only(left: 18.w),
child: Text(
'全选',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
),
],
),
),
);
}
Widget _settlement(CartProvidde model, BuildContext context) {
return Row(
children: [
model.allPrice != 0
? Container(
margin: EdgeInsets.only(right: 10.w),
child: Text(
'合计:¥${model.allPrice.toStringAsFixed(2)}',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xffe60e0e),
),
),
)
: SizedBox(),
InkWell(
onTap: model.allGoodsCount != 0 ? () {} : null,
child: Container(
alignment: Alignment.center,
decoration: BoxDecoration(
color: model.allGoodsCount != 0
? Color(0xffffc40c)
: Color(0xffd8d8d8),
borderRadius: BorderRadius.all(Radius.circular(30)),
),
width: 198.w,
margin: EdgeInsets.symmetric(vertical: 16.w),
padding: EdgeInsets.symmetric(vertical: 12.w),
child: Text(
'结算(${model.allGoodsCount})',
style: TextStyle(
fontSize: 30.sp,
color:
model.allGoodsCount != 0 ? Color(0xff333333) : Colors.white,
),
),
),
),
],
);
}
@override
Widget build(BuildContext context) {
return Consumer<CartProvidde>(builder: (context, model, child) {
return Container(
color: Colors.white,
height: 98.w,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.symmetric(horizontal: 32.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_selectAll(model),
_settlement(
model,
context,
)
],
),
);
});
}
}

@ -1,207 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:provider/provider.dart';
import 'package:akuCommunity/model/aku_shop_model.dart';
import 'package:akuCommunity/provider/cart.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
import 'package:akuCommunity/widget/cart_count.dart';
class MarketCartCard extends StatelessWidget {
final AkuShopModel cartItem;
MarketCartCard({Key key, this.cartItem}) : super(key: key);
Widget _cardRadio(
BuildContext context, AkuShopModel cartItem, CartProvidde model) {
return InkWell(
onTap: () {
cartItem.isCheck = !cartItem.isCheck;
model.changeCheckState(cartItem);
},
child: Container(
alignment: Alignment.center,
child: Icon(
Icons.check_circle,
color: cartItem.isCheck ? Color(0xffdb0000) : Color(0xff999999),
size: 36.w,
),
),
);
}
Widget _image(String imagePath) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 20.w),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(2)),
child: CachedImageWrapper(
url: imagePath,
width: 180.w,
height: 180.w,
),
),
);
}
Widget _content(String content, specs, price) {
return Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 394.w,
child: Text(
content,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff333333),
),
),
),
// InkWell(
// onTap: _showGoodsSpecsSheet,
// child: Container(
// margin: EdgeInsets.only(top: 10.w),
// padding: EdgeInsets.symmetric(
// vertical: 5.w,
// horizontal: 19.w,
// ),
// alignment: Alignment.center,
// decoration: BoxDecoration(
// color: Color(0xfff5f5f5),
// border: Border.all(color: Color(0xffd3d3d3), width: 0.5),
// borderRadius: BorderRadius.all(Radius.circular(15)),
// ),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Text(
// specs,
// style: TextStyle(
// fontSize: 18.sp,
// color: Color(0xff333333),
// ),
// ),
// Container(
// alignment: Alignment.center,
// margin: EdgeInsets.only(left: 16.w),
// child: Icon(
// AntDesign.down,
// color: Color(0xff333333),
// size: 22.sp,
// ),
// ),
// ],
// ),
// ),
// ),
Container(
margin: EdgeInsets.only(top: 40.w),
child: Text(
'$price',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xffe60e0e),
),
),
),
],
),
);
}
@override
Widget build(BuildContext context) {
return Consumer<CartProvidde>(builder: (context, model, child) {
return Container(
margin: EdgeInsets.only(
top: 20.w,
left: 32.w,
right: 32.w,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6)),
),
child: Slidable.builder(
actionPane: SlidableBehindActionPane(),
actionExtentRatio: 0.25,
secondaryActionDelegate: SlideActionBuilderDelegate(
actionCount: 2,
builder: (context, index, animation, renderingMode) {
if (index == 0) {
return SlideAction(
child: Text(
'移至收藏夹',
style: TextStyle(fontSize: 28.sp, color: Colors.white),
),
color: renderingMode == SlidableRenderingMode.slide
? Color(0xffffc40c).withOpacity(animation.value)
: Color(0xffffc40c),
// onTap: () => _showSnackBar(context, 'More'),
closeOnTap: false,
);
} else {
return SlideAction(
onTap: () {
model.deleteGoods(cartItem.itemid);
},
decoration: BoxDecoration(
color: renderingMode == SlidableRenderingMode.slide
? Color(0xffe60e0e).withOpacity(animation.value)
: Color(0xffe60e0e),
borderRadius: BorderRadius.only(
topRight: Radius.circular(6),
bottomRight: Radius.circular(6),
),
),
child: Text(
'删除',
style: TextStyle(fontSize: 28.sp, color: Colors.white),
),
// onTap: () => _showSnackBar(context, 'Delete'),
);
}
},
),
child: Container(
color: Colors.white,
padding: EdgeInsets.only(
top: 30.w,
left: 15.w,
bottom: 37.w,
),
child: Stack(
children: [
Row(
children: [
_cardRadio(context, cartItem, model),
_image(cartItem.itempic),
_content(cartItem.itemtitle, '默认', cartItem.itemprice),
],
),
Positioned(
bottom: 0,
right: 16.w,
child: CartCount(
cartItem: cartItem,
// goodsNum: widget.goodsNum,
// index: widget.index,
// reduce: widget.reduce,
// add: widget.add,
),
),
],
),
),
),
);
});
}
}

@ -1,68 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import '../widget/market_list.dart';
import 'widget/market_details_app_bar.dart';
class MarketDetailPage extends StatefulWidget {
final Bundle bundle;
MarketDetailPage({Key key, this.bundle}) : super(key: key);
@override
_MarketDetailPageState createState() => _MarketDetailPageState();
}
class _MarketDetailPageState extends State<MarketDetailPage>
with AutomaticKeepAliveClientMixin, SingleTickerProviderStateMixin {
@override
bool get wantKeepAlive => true;
TabController _controller;
//
List<Map<String, dynamic>> treeList = [
{'name': '新品推荐', 'imagePath': 'assets/tab/nanz.png'},
{'name': '爆款集合', 'imagePath': 'assets/tab/bkjh.png'},
{'name': '口碑好物', 'imagePath': 'assets/tab/kbhw.png'},
{'name': '男装', 'imagePath': 'assets/tab/nanz.png'},
{'name': '女装', 'imagePath': 'assets/tab/nvz.png'}
];
@override
void initState() {
super.initState();
_controller = TabController(length: treeList.length, vsync: this);
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
super.build(context);
return Scaffold(
appBar: PreferredSize(
preferredSize: Size.fromHeight(kToolbarHeight), //319
child: MarketDetailsAppBar(title: widget.bundle.getString('title')),
),
body: MarketList(
isGroup: false,
title: widget.bundle.getString('title'),
),
// TabBarView(
// controller: _controller,
// children: List.generate(
// treeList.length,
// (index) => MarketListPage(
// isGroup: false,
// title: widget.bundle.getString('title'),
// ),
// ),
// ),
);
}
}

@ -1,208 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:get/get.dart';
import 'package:akuCommunity/utils/headers.dart';
class MarketDetailsAppBar extends StatefulWidget {
final String title;
MarketDetailsAppBar({Key key, this.title}) : super(key: key);
@override
_MarketDetailsAppBarState createState() => _MarketDetailsAppBarState();
}
class _MarketDetailsAppBarState extends State<MarketDetailsAppBar> {
List<Map<String, dynamic>> _classList = [
{'title': '居家生活'},
{'title': '数码家电'},
{'title': '休闲副食'},
{'title': '滋补保健'},
{'title': '彩妆香水'},
{'title': '服饰箱包'},
{'title': '母婴玩具'},
{'title': '饮料酒水'},
];
///
void _showModelTopSheet() {
showGeneralDialog(
context: context,
barrierLabel: "",
barrierColor: Colors.black.withOpacity(0.5),
transitionDuration: const Duration(milliseconds: 250),
barrierDismissible: true,
pageBuilder: (BuildContext context, Animation animation,
Animation secondaryAnimation) {
return Stack(
children: <Widget>[
Container(
alignment:
Alignment.lerp(Alignment.topCenter, Alignment.center, 0.25),
margin: EdgeInsets.symmetric(horizontal: 32.w),
child: Material(
color: Color(0xffffffff),
child: Container(
alignment: Alignment.topCenter,
height: 282.w,
width: 686.w,
color: Colors.black.withOpacity(animation.value),
child: GridView.builder(
padding: EdgeInsets.only(
top: 36.w,
left: 25.w,
right: 25.w,
bottom: 30.w,
),
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: _classList.length,
itemBuilder: (BuildContext context, int index) {
return InkWell(
onTap: () {
Get.back();
},
child: Container(
decoration: BoxDecoration(
color: Color(0xfffbfbfb),
border: Border.all(
color: _classList[index]['title'] == widget.title
? Color(0xffe60e0e)
: Color(0xff979797),
width: 1.w,
),
),
child: Center(
child: Text(
_classList[index]['title'],
style: TextStyle(
color:
_classList[index]['title'] == widget.title
? Color(0xffe60e0e)
: Color(0xff333333),
fontSize: 24.sp),
)),
),
);
},
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
mainAxisSpacing: 20.w,
crossAxisSpacing: 30.w,
childAspectRatio: 192.w / 58.w),
),
),
),
),
Positioned(
top: 78,
left: MediaQuery.of(context).size.width / 2.05,
child: Material(
color: Colors.transparent,
child: Container(
child: Icon(
AntDesign.caretup,
color: Color(0xffffffff),
size: 36.sp,
),
),
),
),
],
);
},
transitionBuilder: (_, anim, __, child) {
return ScaleTransition(
alignment: Alignment.lerp(
Alignment.topCenter, Alignment.center, 0.145), //
scale: anim,
child: child,
);
},
);
}
@override
Widget build(BuildContext context) {
return Container(
child: AppBar(
elevation: 0,
backgroundColor: Color(0xffffffff),
leading: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(AntDesign.left, size: 37.sp),
onPressed: () {
Get.back();
}),
title: InkWell(
onTap: _showModelTopSheet,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
widget.title,
style: TextStyle(fontSize: 32.sp, color: Color(0xff333333)),
),
SizedBox(width: 10.w),
Container(
padding: EdgeInsets.only(top: 1),
child: Icon(
AntDesign.caretdown,
size: 18.sp,
color: Color(0xff000000),
),
)
],
),
),
centerTitle: true,
actions: <Widget>[
IconButton(
icon: Icon(
AntDesign.search1,
size: 38.sp,
color: Color(0xff666666),
),
onPressed: () {},
)
],
// bottom: TabBar(
// controller: _controller,
// labelPadding: EdgeInsets.symmetric(horizontal: 15.w),
// indicator: BoxDecoration(),
// isScrollable: true,
// unselectedLabelStyle: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// ),
// labelStyle: TextStyle(
// fontWeight: FontWeight.w600,
// fontSize: ScreenUtil().setSp(24),
// ),
// unselectedLabelColor: Color(0xff333333),
// labelColor: Color(0xffe60e0e),
// tabs: List.generate(
// treeList.length,
// (index) => Container(
// padding: EdgeInsets.symmetric(vertical:32.w),
// child: Column(
// children: <Widget>[
// Image.asset(
// treeList[index]['imagePath'],
// height: 110.w,
// width: 110.w,
// fit: BoxFit.fill,
// ),
// SizedBox(height: 14.w),
// Text(treeList[index]['name'])
// ],
// ),
// ),
// ),
// ),
),
);
}
}

@ -1,153 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/app_bar_action.dart';
import 'package:akuCommunity/widget/search_bar_delegate.dart';
import 'package:akuCommunity/widget/single_ad_space.dart';
import 'widget/market_list.dart';
import 'widget/market_sticky_bar.dart';
class MarketPage extends StatefulWidget {
MarketPage({Key key}) : super(key: key);
@override
_MarketPageState createState() => _MarketPageState();
}
class _MarketPageState extends State<MarketPage>
with AutomaticKeepAliveClientMixin, SingleTickerProviderStateMixin {
@override
bool get wantKeepAlive => true;
TabController _controller;
List<Map<String, dynamic>> actionsList = [
{
'title': '购物车',
'icon': AntDesign.shoppingcart,
},
{
'title': '分类',
'icon': AntDesign.appstore_o,
}
];
//
List<Map<String, dynamic>> treeList = [
{'name': '社区商城', 'isGroup': false},
{'name': '社区团购', 'isGroup': true}
];
List<Widget> _listActions() {
return actionsList
.map((item) => AppBarAction(
title: item['title'],
icon: item['icon'],
))
.toList();
}
@override
void initState() {
super.initState();
_controller = TabController(length: treeList.length, vsync: this);
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
// double _appBarHeight = 506.w;
super.build(context);
return Scaffold(
appBar: AppBar(
elevation: 0,
backgroundColor: Color(0xfff9f9f9),
title: Container(
padding: EdgeInsets.symmetric(
horizontal: 24.w,
vertical: 12.w,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(36)),
boxShadow: <BoxShadow>[
BoxShadow(
color: Colors.grey.withOpacity(0.1),
offset: Offset(1.1, 1.1),
blurRadius: 10.0),
],
),
child: InkWell(
onTap: () {
showSearch(context: context, delegate: SearchBarDelegate());
},
child: Container(
child: Row(children: [
Icon(
AntDesign.search1,
size: ScreenUtil().setSp(29),
color: Color(0xff999999),
),
SizedBox(width: 5),
Text(
'搜索宝贝',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff999999)),
)
]),
),
),
),
actions: _listActions(),
),
body: NestedScrollView(
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
return <Widget>[
SliverAppBar(
expandedHeight: 676.w,
backgroundColor: Colors.transparent,
elevation: 0,
flexibleSpace: Stack(
children: [
Positioned(
top: 0,
left: 0,
right: 0,
child: Column(
children: [
SingleAdSpace(
imagePath: 'assets/example/guanggao5.png',
radius: 36,
),
],
),
),
],
),
),
MarketStickyBar(
treeList: treeList,
controller: _controller,
)
];
},
body: TabBarView(
controller: _controller,
children: List.generate(
treeList.length,
(index) => MarketList(
isGroup: treeList[index]['isGroup'],
))),
),
);
}
}

@ -1,224 +0,0 @@
import 'dart:async';
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/model/aku_shop_model.dart';
import 'package:akuCommunity/service/base_model.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/goods_card_skeleton.dart';
import 'package:akuCommunity/widget/sliver_goods_card.dart';
import 'sliver_goods_group_card.dart';
class MarketList extends StatefulWidget {
final bool isGroup;
final String title;
MarketList({Key key, this.isGroup = false, this.title}) : super(key: key);
@override
_MarketListState createState() => _MarketListState();
}
class _MarketListState extends State<MarketList>
with AutomaticKeepAliveClientMixin {
@override
bool get wantKeepAlive => true;
List<AkuShopModel> _shopList = [];
int page = 1;
@override
void initState() {
super.initState();
akuShop();
}
Future<void> akuShop() async {
switch (widget.title) {
case '居家生活':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/jjsh.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
case '数码家电':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/smjd.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
case '休闲副食':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/xxfs.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
case '滋补保健':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/zbbj.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
case '彩妆香水':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/czxs.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
case '服饰箱包':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/fsxb.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
case '母婴玩具':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/mywj.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
case '饮料酒水':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/yljs.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
default:
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/shop.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
}
}
void _onLoading() async {
await Future.delayed(Duration(milliseconds: 1500));
page++;
// akuShop(page);
if (mounted) setState(() {});
}
@override
Widget build(BuildContext context) {
super.build(context);
return CustomScrollView(
slivers: [
widget.isGroup
? SliverGoodsGroupCard()
: SliverPadding(
padding: EdgeInsets.only(
top: 30.w,
left: 32.w,
right: 32.w,
),
sliver: _shopList.length == 0
? SliverToBoxAdapter(child: GoodsCardSkeleton())
: SliverGoodsCard(
shoplist: _shopList,
isShow: true,
)),
],
);
}
}

@ -1,76 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class MarketStickyBar extends StatefulWidget {
final TabController controller;
final List<Map<String, dynamic>> treeList;
MarketStickyBar({Key key, this.controller, this.treeList}) : super(key: key);
@override
_MarketStickyBarState createState() => _MarketStickyBarState();
}
class _MarketStickyBarState extends State<MarketStickyBar> {
TabBar _tabBar() {
return TabBar(
controller: widget.controller,
isScrollable: true,
indicatorColor: Color(0xffFFC100),
labelColor: Color(0xff000000),
unselectedLabelColor: Color(0xFF3A5160).withOpacity(0.5),
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.label,
labelStyle: TextStyle(
fontSize: ScreenUtil().setSp(34),
color: Color(0xff999999),
fontWeight: FontWeight.w600,
),
tabs: List.generate(
widget.treeList.length,
(index) => Tab(
text: widget.treeList[index]['name'],
)),
);
}
@override
Widget build(BuildContext context) {
return SliverPersistentHeader(
delegate: _SliverAppBarDelegate(
child: _tabBar(),
),
pinned: true,
floating: true,
);
}
}
class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
final TabBar child;
_SliverAppBarDelegate({
@required this.child,
});
@override
double get minExtent => this.child.preferredSize.height;
@override
double get maxExtent => this.child.preferredSize.height;
@override
Widget build(
BuildContext context, double shrinkOffset, bool overlapsContent) {
return new SizedBox.expand(
child: Container(
color: Color(0xfff9f9f9),
child: child,
),
);
}
@override
bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) {
return true;
}
}

@ -1,235 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
class SliverGoodsGroupCard extends StatefulWidget {
SliverGoodsGroupCard({Key key}) : super(key: key);
@override
_SliverGoodsGroupCardState createState() => _SliverGoodsGroupCardState();
}
class _SliverGoodsGroupCardState extends State<SliverGoodsGroupCard> {
List<Map<String, dynamic>> _groupList = [
{
'title': '果众 厄瓜多尔散把香蕉12根约2.4kg',
'image':
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600934902545&di=c610a098ad4b433af8f89ee2768c6d28&imgtype=0&src=http%3A%2F%2Fd6.yihaodianimg.com%2FN06%2FM0A%2F85%2FCD%2FCgQIzVQiy3GAbvbDAAJatt79Mms90000_600x600.jpg',
'price': '36.6',
'subtitle': '第2期 中国新疆仙人蕉',
'remainingTime': '19天13时46分',
'address': '中国-新疆',
'arrivalTime': '2020年11月7日',
'isOverTime': false,
},
{
'title': '四川安岳新鲜黄柠檬尤力克包邮1斤中果现摘多汁产地直',
'image':
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600935221011&di=e7aecab551abef82de3fc3450916fe22&imgtype=0&src=http%3A%2F%2Fimg3.imgtn.bdimg.com%2Fit%2Fu%3D109616473%2C3735766861%26fm%3D214%26gp%3D0.jpg',
'price': '76.6',
'subtitle': '第3期 中国安岳黄柠檬',
'remainingTime': '21天13时46分',
'address': '中国-四川',
'arrivalTime': '2020年11月17日',
'isOverTime': false,
},
{
'title': '斤新鲜水果包邮76号甜瓜25新疆正宗吐鲁番哈密瓜西洲蜜',
'image':
'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=735601588,2284764256&fm=26&gp=0.jpg',
'price': '68.6',
'subtitle': '第1期 中国新疆哈密瓜',
'remainingTime': '--天--时--分',
'address': '中国-新疆',
'arrivalTime': '2019年12月17日',
'isOverTime': true,
}
];
Widget _image(String image) {
return ClipRRect(
borderRadius: BorderRadius.circular(6),
child: CachedImageWrapper(
url: image,
height: 120.w,
width: 160.w,
),
);
}
Widget _button(String price, isOverTime) {
return InkWell(
onTap: () {},
child: Container(
height: 52.w,
width: 170.w,
alignment: Alignment.center,
padding: EdgeInsets.only(
top: 10.w,
bottom: 9.w,
),
decoration: BoxDecoration(
color: isOverTime ? Color(0xffd9d9d9) : Color(0xffffc40c),
borderRadius: BorderRadius.all(Radius.circular(4.w)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'¥$price',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 24.sp,
color: isOverTime ? Color(0xff333333) : Color(0xffe60e0e),
),
),
SizedBox(width: 10.w),
Text(
isOverTime ? '已过期' : '去团购',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 24.sp,
color: Color(0xff333333)),
),
],
),
),
);
}
Widget _content(String title, subtitle, remainingTime, address, arrivalTime,
price, isOverTime) {
return Container(
margin: EdgeInsets.only(left: 20.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(bottom: 8.w),
width: 474.w,
child: Text(
title,
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 30.sp,
color: Color(0xff333333),
),
),
),
Container(
margin: EdgeInsets.only(bottom: 12.w),
child: Text(
subtitle,
style: TextStyle(
fontSize: 20.sp,
color: Color(0xff333333),
),
),
),
Container(
margin: EdgeInsets.only(bottom: 16.w),
padding: EdgeInsets.only(
top: 6.w,
left: 11.w,
bottom: 7.w,
right: 20.w,
),
decoration: BoxDecoration(
color: isOverTime ? Color(0xffd9d9d9) : Color(0xffffeee3),
borderRadius: BorderRadius.all(Radius.circular(4.w)),
),
child: Row(
children: [
Icon(
MaterialIcons.access_time,
size: 18.sp,
color: isOverTime ? Color(0xff333333) : Color(0xffff7f00),
),
Text(
'剩余时间:$remainingTime',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: isOverTime ? Color(0xff333333) : Color(0xffff7f00),
fontSize: 18.sp,
),
),
],
),
),
Container(
margin: EdgeInsets.only(bottom: 30.w),
width: 474.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'原产地:$address',
style:
TextStyle(color: Color(0xff999999), fontSize: 20.sp),
),
SizedBox(height: 10.w),
Text(
'预计到货:$arrivalTime',
style:
TextStyle(color: Color(0xff999999), fontSize: 20.sp),
)
],
),
_button(price, isOverTime)
],
),
),
],
),
);
}
@override
Widget build(BuildContext context) {
return SliverList(
delegate: SliverChildBuilderDelegate((BuildContext content, int index) {
return Container(
margin: EdgeInsets.only(
top: 20.w,
left: 32.w,
right: 32.w,
),
padding: EdgeInsets.only(
top: 12.w,
left: 12.w,
right: 20.w,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8.w)),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
_image(_groupList[index]['image']),
_content(
_groupList[index]['title'],
_groupList[index]['subtitle'],
_groupList[index]['remainingTime'],
_groupList[index]['address'],
_groupList[index]['arrivalTime'],
_groupList[index]['price'],
_groupList[index]['isOverTime'],
),
],
),
);
}, childCount: _groupList.length),
);
}
}

@ -1,242 +0,0 @@
import 'dart:async';
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/model/aku_shop_class_model.dart';
import 'package:akuCommunity/service/base_model.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
import 'widget/market_class_bar.dart';
class MarketClassPage extends StatefulWidget {
MarketClassPage({Key key}) : super(key: key);
@override
_MarketClassPageState createState() => _MarketClassPageState();
}
class _MarketClassPageState extends State<MarketClassPage> {
// Future.microtask(() => null)1
// void testSX(){
// new Future(() => print('s_1'));
// scheduleMicrotask(() => print('s_2'));
// print('s_3');
// }
int _currentIndex = 0;
List<AkuShopClassModel> _shopClassList = [];
List<String> _leftNav = [
'居家生活',
'服饰鞋包',
'休闲副食',
'数码家电',
'彩妆香水',
'母婴亲子',
'运动旅游',
'滋补保健',
];
ScrollController _controller = ScrollController();
@override
void initState() {
super.initState();
akuShopClass();
}
Future<void> akuShopClass() async {
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/shopclass.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
AkuShopClassModel list = AkuShopClassModel.fromJson(item);
setState(() {
_shopClassList.add(list);
});
});
});
}
Widget _leftInkWellNav(int index) {
return InkWell(
child: Stack(
children: [
Container(
height: 120.w,
alignment: Alignment.center,
color: _currentIndex == index ? Colors.white : Colors.transparent,
padding: EdgeInsets.symmetric(vertical: 24.w),
child: Text(
_shopClassList[index].mainName,
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: _currentIndex == index
? BaseStyle.colorffc40c
: ktextPrimary,
),
),
),
_currentIndex == index
? Positioned(
top: 42.w,
left: 1,
child: SizedBox(
width: 8.w,
height: 40.w,
child: DecoratedBox(
decoration: BoxDecoration(color: BaseStyle.colorffc40c),
),
),
)
: SizedBox(),
],
),
onTap: () {
setState(() {
// _controller.animateTo(0, duration: Duration(seconds: 2), curve: Curves.easeInQuad);
_controller.jumpTo(0);
_currentIndex = index;
});
},
);
}
Widget _classGridCard(List<Info> infoList) {
return Container(
child: GridView.builder(
padding: EdgeInsets.zero,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: infoList.length,
itemBuilder: (BuildContext context, int index) {
return InkWell(
onTap: () {},
child: Container(
child: Column(
children: [
CachedImageWrapper(
url: infoList[index].imgurl,
width: 152.w,
height: 152.w,
),
Container(
margin: EdgeInsets.only(top: 14.w),
child: Text(
infoList[index].sonName,
style: TextStyle(
fontSize: BaseStyle.fontSize24,
color: ktextPrimary,
),
),
),
],
),
));
},
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
childAspectRatio: 152.w / 210.w,
),
),
);
}
Widget _classList(String nextName, List<Info> infoList) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 32.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(bottom: 24.w),
padding: EdgeInsets.symmetric(vertical: 14.w),
width: 476.w,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: Color(0xffe8e8e8), width: 0.5),
),
),
child: Text(
nextName,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: BaseStyle.fontSize26,
color: ktextPrimary,
),
),
),
_classGridCard(infoList),
],
),
);
}
@override
Widget build(BuildContext context) {
double _statusHeight = MediaQuery.of(context).padding.top;
return Scaffold(
appBar: PreferredSize(
child: MarketClassBar(),
preferredSize: Size.fromHeight(kToolbarHeight),
),
body: _shopClassList.length != 0
? Container(
decoration: BoxDecoration(
color: Colors.white,
border: Border(
top: BorderSide(color: Color(0xffe8e8e8), width: 0.5)),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
width: 203.w,
height: MediaQuery.of(context).size.height -
kToolbarHeight -
_statusHeight,
decoration: BoxDecoration(
border: Border(
right:
BorderSide(color: Color(0xffe8e8e8), width: 0.5)),
),
child: ListView.builder(
shrinkWrap: true,
itemCount: _leftNav.length,
itemBuilder: (BuildContext context, int index) {
return _leftInkWellNav(index);
}),
),
Container(
width: 547.w,
height: MediaQuery.of(context).size.height -
kToolbarHeight -
_statusHeight,
child: ListView(
shrinkWrap: true,
controller: _controller,
children: List.generate(
_shopClassList[_currentIndex].data.length,
(index) => _classList(
_shopClassList[_currentIndex]
.data[index]
.nextName,
_shopClassList[_currentIndex]
.data[index]
.info,
))),
),
],
),
)
: Container(
child: CircularProgressIndicator(),
),
);
}
}

@ -1,58 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:get/get.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/search_bar_delegate.dart';
class MarketClassBar extends StatelessWidget {
Widget _inkWellSearch(BuildContext context) {
return InkWell(
onTap: () {
showSearch(context: context, delegate: SearchBarDelegate());
},
child: Container(
margin: EdgeInsets.only(right: 32.w),
padding: EdgeInsets.only(left: 40.w, top: 15.w, bottom: 15.w),
decoration: BoxDecoration(
color: Color(0xfff3f3f3),
borderRadius: BorderRadius.all(Radius.circular(36)),
),
child: Row(children: [
Icon(
AntDesign.search1,
size: 28.sp,
color: Color(0xff999999),
),
SizedBox(width: 5),
Text(
'搜索商品、活动、帖子、应用',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff999999),
),
)
]),
),
);
}
@override
Widget build(BuildContext context) {
return Container(
child: AppBar(
elevation: 0,
titleSpacing: 0,
backgroundColor: Color(0xffffffff),
leading: InkWell(
onTap: () => Get.back(),
child: Icon(AntDesign.left, size: 40.sp),
),
centerTitle: true,
title: _inkWellSearch(context),
),
);
}
}

@ -1,4 +1,3 @@
import 'package:akuCommunity/model/common/img_model.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -9,6 +8,7 @@ import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/const/resource.dart';
import 'package:akuCommunity/constants/api.dart';
import 'package:akuCommunity/model/common/img_model.dart';
import 'package:akuCommunity/model/message/comment_message_model.dart';
import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart';
import 'package:akuCommunity/utils/bee_date_util.dart';

@ -38,10 +38,10 @@ class _SystemMessageDetailPageState extends State<SystemMessageDetailPage> {
child: _onload
? _empty()
: Center(
child: Padding(
padding: EdgeInsets.all(32.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
child: Padding(
padding: EdgeInsets.all(32.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
20.w.heightBox,
'系统通知'.text.black.bold.size(32.sp).make(),
@ -51,8 +51,8 @@ class _SystemMessageDetailPageState extends State<SystemMessageDetailPage> {
_model.content.text.black.size(28.sp).isIntrinsic.make(),
],
),
),
),
),
),
);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save