@@ -560,7 +560,7 @@ | |||||
"languageVersion": "2.1" | "languageVersion": "2.1" | ||||
} | } | ||||
], | ], | ||||
"generated": "2020-09-23T04:06:39.433861Z", | |||||
"generated": "2020-09-23T06:47:59.492879Z", | |||||
"generator": "pub", | "generator": "pub", | ||||
"generatorVersion": "2.7.2" | "generatorVersion": "2.7.2" | ||||
} | } |
@@ -0,0 +1,14 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="SaveActionSettings"> | |||||
<option name="actions"> | |||||
<set> | |||||
<option value="activate" /> | |||||
<option value="activateOnShortcut" /> | |||||
<option value="organizeImports" /> | |||||
<option value="reformat" /> | |||||
</set> | |||||
</option> | |||||
<option name="configurationPath" value="" /> | |||||
</component> | |||||
</project> |
@@ -1,30 +0,0 @@ | |||||
// GENERATED CODE - DO NOT MODIFY BY HAND | |||||
part of 'mine_detail_model.dart'; | |||||
// ************************************************************************** | |||||
// JsonSerializableGenerator | |||||
// ************************************************************************** | |||||
MineDetailModel _$MineDetailModelFromJson(Map<String, dynamic> json) { | |||||
return MineDetailModel( | |||||
json['avatar'] as String, | |||||
json['nickname'] as String, | |||||
json['gender'] as String, | |||||
json['birthday'] as String, | |||||
json['register_time'] as String, | |||||
json['file_bucket_url'] as String, | |||||
json['file_format'] as String, | |||||
); | |||||
} | |||||
Map<String, dynamic> _$MineDetailModelToJson(MineDetailModel instance) => | |||||
<String, dynamic>{ | |||||
'avatar': instance.avatar, | |||||
'nickname': instance.nickname, | |||||
'gender': instance.gender, | |||||
'birthday': instance.birthday, | |||||
'register_time': instance.registerTime, | |||||
'file_bucket_url': instance.fileBucketUrl, | |||||
'file_format': instance.format, | |||||
}; |
@@ -1,30 +0,0 @@ | |||||
// GENERATED CODE - DO NOT MODIFY BY HAND | |||||
part of 'setting_page_style_item_model.dart'; | |||||
// ************************************************************************** | |||||
// JsonSerializableGenerator | |||||
// ************************************************************************** | |||||
SettingPageStyleItemModel _$SettingPageStyleItemModelFromJson( | |||||
Map<String, dynamic> json) { | |||||
return SettingPageStyleItemModel( | |||||
json['name'] as String, | |||||
json['name_color'] as String, | |||||
json['desc'] as String, | |||||
json['desc_color'] as String, | |||||
json['skip_identifier'] as String, | |||||
json['url'] as String, | |||||
); | |||||
} | |||||
Map<String, dynamic> _$SettingPageStyleItemModelToJson( | |||||
SettingPageStyleItemModel instance) => | |||||
<String, dynamic>{ | |||||
'name': instance.name, | |||||
'name_color': instance.nameColor, | |||||
'desc': instance.desc, | |||||
'desc_color': instance.descColor, | |||||
'skip_identifier': instance.skipIdentifier, | |||||
'url': instance.url, | |||||
}; |
@@ -10,6 +10,7 @@ import 'package:zhiying_base_widget/pages/wallet_page/wallet_page.dart'; | |||||
import 'package:zhiying_base_widget/pages/webview/base_webview.dart'; | import 'package:zhiying_base_widget/pages/webview/base_webview.dart'; | ||||
import 'package:zhiying_base_widget/widgets/goods_details/footer/goods_details_footer_widget.dart'; | import 'package:zhiying_base_widget/widgets/goods_details/footer/goods_details_footer_widget.dart'; | ||||
import 'package:zhiying_base_widget/widgets/goods_details/price/goods_details_price_widget.dart'; | import 'package:zhiying_base_widget/widgets/goods_details/price/goods_details_price_widget.dart'; | ||||
import 'package:zhiying_base_widget/widgets/goods_details/recommend/goods_detail_commend_creater.dart'; | |||||
import 'package:zhiying_base_widget/widgets/goods_details/slide_banner/goods_details_slide_banner_widget.dart'; | import 'package:zhiying_base_widget/widgets/goods_details/slide_banner/goods_details_slide_banner_widget.dart'; | ||||
import 'package:zhiying_base_widget/widgets/goods_details/store/store_widget.dart'; | import 'package:zhiying_base_widget/widgets/goods_details/store/store_widget.dart'; | ||||
import 'package:zhiying_base_widget/widgets/goods_details/upgrade_tip/upgrade_tip_widget.dart'; | import 'package:zhiying_base_widget/widgets/goods_details/upgrade_tip/upgrade_tip_widget.dart'; | ||||
@@ -19,7 +20,6 @@ import 'package:zhiying_base_widget/widgets/home/home_goods/home_goods_creater.d | |||||
import 'package:zhiying_base_widget/widgets/home/home_notice/home_notice_widget.dart'; | import 'package:zhiying_base_widget/widgets/home/home_notice/home_notice_widget.dart'; | ||||
import 'package:zhiying_base_widget/widgets/home/home_slide_banner/home_slide_banner_creater.dart'; | import 'package:zhiying_base_widget/widgets/home/home_slide_banner/home_slide_banner_creater.dart'; | ||||
import 'package:zhiying_base_widget/widgets/home/home_sreach/home_sreach_creater.dart'; | import 'package:zhiying_base_widget/widgets/home/home_sreach/home_sreach_creater.dart'; | ||||
import 'package:zhiying_base_widget/widgets/home/home_sreach/home_sreach_widget.dart'; | |||||
import 'package:zhiying_base_widget/widgets/mine/mine_data/mine_data.dart'; | import 'package:zhiying_base_widget/widgets/mine/mine_data/mine_data.dart'; | ||||
import 'package:zhiying_base_widget/widgets/mine/mine_header/mine_header.dart'; | import 'package:zhiying_base_widget/widgets/mine/mine_header/mine_header.dart'; | ||||
import 'package:zhiying_base_widget/widgets/mine/mine_nav/mine_nav_bg.dart'; | import 'package:zhiying_base_widget/widgets/mine/mine_nav/mine_nav_bg.dart'; | ||||
@@ -124,7 +124,8 @@ class BaseWidgetRegister { | |||||
DefaultWidgetCreater((model) => GoodsDetailsImgWidget(model))); | DefaultWidgetCreater((model) => GoodsDetailsImgWidget(model))); | ||||
// 商品详情底部推荐列表 | // 商品详情底部推荐列表 | ||||
// WidgetFactory.regist('product_detail_bottom_rec', DefaultWidgetCreater((model) => GoodsListCreater(model))); | // WidgetFactory.regist('product_detail_bottom_rec', DefaultWidgetCreater((model) => GoodsListCreater(model))); | ||||
WidgetFactory.regist('product_detail_bottom_rec', GoodsListCreater()); | |||||
WidgetFactory.regist( | |||||
'product_detail_bottom_rec', GoodsDetailCommendCreater()); | |||||
// 商品详情底部 | // 商品详情底部 | ||||
WidgetFactory.regist('product_detail_bottom', | WidgetFactory.regist('product_detail_bottom', | ||||
DefaultWidgetCreater((model) => GoodsDetailsFooterWidget(model))); | DefaultWidgetCreater((model) => GoodsDetailsFooterWidget(model))); | ||||
@@ -0,0 +1,45 @@ | |||||
import 'dart:convert' as convert; | |||||
import 'package:event_bus/event_bus.dart'; | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_base_widget/widgets/goods_details/recommend/goods_detail_commend_list.dart'; | |||||
import 'package:zhiying_base_widget/widgets/goods_details/recommend/goods_detail_commend_widget.dart'; | |||||
import 'package:zhiying_base_widget/widgets/goods_details/recommend/models/goods_detail_recommend_model.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home/home_goods/bloc/home_goods_header_bloc.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home/home_goods/home_goods_header.dart'; | |||||
import 'package:zhiying_comm/util/base_bloc.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
class GoodsDetailCommendCreater extends WidgetCreater { | |||||
final EventBus _eventBus = EventBus(); | |||||
@override | |||||
List<Widget> createWidgets(Map<String, dynamic> model) { | |||||
String d = model['data']; | |||||
Map<String, dynamic> json = convert.jsonDecode(d); | |||||
GoodsDetailRecommendModel style = GoodsDetailRecommendModel.fromJson(json); | |||||
print('创建商品列表'); | |||||
Widget _widget = BlocProvider<HomeGoodsHeaderBloc>( | |||||
bloc: HomeGoodsHeaderBloc(), | |||||
child: HomeGoodsHeader(model, _eventBus), | |||||
); | |||||
return [ | |||||
SliverToBoxAdapter( | |||||
child: GoodsDetailsRecommendWidget(model), | |||||
), | |||||
SliverToBoxAdapter( | |||||
child: GoodsDetailCommendList( | |||||
model, | |||||
provider: style.recType, // 猜你喜欢数据源暂无数据 | |||||
), | |||||
), | |||||
]; | |||||
} | |||||
@override | |||||
bool isSliverChild() { | |||||
return true; | |||||
} | |||||
} |
@@ -0,0 +1,132 @@ | |||||
import 'dart:convert' as convert; | |||||
import 'package:flutter/cupertino.dart'; | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:provider/provider.dart'; | |||||
import 'package:zhiying_base_widget/pages/goods_details_page/notifier/goods_details_page_notifier.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home/home_goods/bloc/home_goods_bloc.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home/home_goods/home_goods_item.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home/home_goods/home_goods_item_single.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home/home_goods/models/home_goods_model.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home/home_goods/models/home_goods_style_model.dart'; | |||||
import 'package:zhiying_comm/util/base_bloc.dart'; | |||||
class GoodsDetailCommendList extends StatefulWidget { | |||||
final Map<String, dynamic> data; | |||||
final String provider; | |||||
GoodsDetailCommendList(this.data, {Key key, this.provider}) : super(key: key); | |||||
@override | |||||
_GoodsDetailCommendListState createState() => _GoodsDetailCommendListState(); | |||||
} | |||||
class _GoodsDetailCommendListState extends State<GoodsDetailCommendList> { | |||||
@override | |||||
void initState() { | |||||
super.initState(); | |||||
} | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return BlocProvider<HomeGoodsBloc>( | |||||
bloc: HomeGoodsBloc(), | |||||
child: _GoodsDetailCommendListContainer(widget.data, widget.provider), | |||||
); | |||||
} | |||||
} | |||||
class _GoodsDetailCommendListContainer extends StatefulWidget { | |||||
final Map<String, dynamic> data; | |||||
final String provider; | |||||
_GoodsDetailCommendListContainer(this.data, this.provider, {Key key}) | |||||
: super(key: key); | |||||
@override | |||||
_GoodsDetailCommendListContainerState createState() => | |||||
_GoodsDetailCommendListContainerState(); | |||||
} | |||||
class _GoodsDetailCommendListContainerState | |||||
extends State<_GoodsDetailCommendListContainer> { | |||||
HomeGoodsBloc _bloc; | |||||
String _provider = ''; | |||||
HomeGoodsStyleModel _style; | |||||
@override | |||||
void initState() { | |||||
_bloc = BlocProvider.of<HomeGoodsBloc>(context); | |||||
String d = widget.data['data']; | |||||
dynamic json = convert.jsonDecode(d); | |||||
_style = HomeGoodsStyleModel.fromJson(Map<String, dynamic>.from(json)); | |||||
_bloc.loadMore(widget.provider); | |||||
super.initState(); | |||||
} | |||||
@override | |||||
void didChangeDependencies() { | |||||
super.didChangeDependencies(); | |||||
print('didChangeDependencies'); | |||||
bool isNeedLoadMore = | |||||
Provider.of<GoodsDetailsPageNotifier>(context).scrollEnd; | |||||
if (isNeedLoadMore && _provider != '') { | |||||
print('HomeGoods loadmore...'); | |||||
_bloc.loadMore(_provider); | |||||
} | |||||
} | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Container( | |||||
width: double.infinity, | |||||
child: StreamBuilder<List<HomeGoodsModel>>( | |||||
stream: _bloc.outData, | |||||
builder: (BuildContext context, AsyncSnapshot snapshot) { | |||||
if (snapshot.data == null) { | |||||
return Container(); | |||||
} | |||||
List<HomeGoodsModel> goods = snapshot.data; | |||||
int column = 2; | |||||
int count = (goods.length / column).ceil(); | |||||
return ListView.builder( | |||||
shrinkWrap: true, | |||||
physics: NeverScrollableScrollPhysics(), | |||||
itemCount: count, | |||||
itemBuilder: (context, index) { | |||||
if (column == 1) { | |||||
return HomeGoodsItemSingle( | |||||
goods[index], | |||||
_style, | |||||
data: widget.data, | |||||
); | |||||
} else { | |||||
// return Container(color: Colors.red, height: 126,margin: EdgeInsets.all(10),); | |||||
return Padding( | |||||
padding: const EdgeInsets.only(left: 5, right: 5), | |||||
child: Row( | |||||
children: List.generate(column, (c) { | |||||
int i = index * column + c; | |||||
return Expanded( | |||||
child: i < goods.length | |||||
? HomeGoodsItem( | |||||
goods[i], | |||||
_style, | |||||
data: widget.data, | |||||
) | |||||
: Container(), | |||||
); | |||||
}).toList(), | |||||
), | |||||
); | |||||
} | |||||
}); | |||||
}, | |||||
), | |||||
); | |||||
} | |||||
} |
@@ -0,0 +1,66 @@ | |||||
import 'dart:convert' as convert; | |||||
import 'package:cached_network_image/cached_network_image.dart'; | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_base_widget/widgets/goods_details/recommend/models/goods_detail_recommend_model.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
class GoodsDetailsRecommendWidget extends StatefulWidget { | |||||
final Map<String, dynamic> data; | |||||
const GoodsDetailsRecommendWidget(this.data, {Key key}) : super(key: key); | |||||
@override | |||||
_GoodsDetailsRecommendWidgetState createState() => | |||||
_GoodsDetailsRecommendWidgetState(); | |||||
} | |||||
class _GoodsDetailsRecommendWidgetState | |||||
extends State<GoodsDetailsRecommendWidget> { | |||||
GoodsDetailRecommendModel _style; | |||||
@override | |||||
void initState() { | |||||
String d = widget.data['data']; | |||||
Map<String, dynamic> json = convert.jsonDecode(d); | |||||
_style = GoodsDetailRecommendModel.fromJson(json); | |||||
super.initState(); | |||||
} | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Column( | |||||
children: <Widget>[ | |||||
_createTitle(), | |||||
], | |||||
); | |||||
} | |||||
Widget _createTitle() { | |||||
return Container( | |||||
width: double.infinity, | |||||
height: 50, | |||||
child: Row( | |||||
crossAxisAlignment: CrossAxisAlignment.center, | |||||
mainAxisAlignment: MainAxisAlignment.center, | |||||
children: <Widget>[ | |||||
CachedNetworkImage( | |||||
imageUrl: _style.recListIcon ?? '', | |||||
width: 15, | |||||
height: 15, | |||||
), | |||||
Padding( | |||||
padding: const EdgeInsets.only(left: 2.5), | |||||
child: Text( | |||||
_style.recListText, | |||||
style: TextStyle( | |||||
color: HexColor.fromHex(_style?.recListTextColor ?? 'FF4242'), | |||||
fontSize: 14), | |||||
), | |||||
) | |||||
], | |||||
), | |||||
); | |||||
} | |||||
} |
@@ -0,0 +1,72 @@ | |||||
class GoodsDetailRecommendModel { | |||||
String recListIcon; | |||||
String recListText; | |||||
String recListTextColor; | |||||
String recType; | |||||
String providerNameColor; | |||||
String providerBgColor; | |||||
String titleColor; | |||||
String shopIcon; | |||||
String shopNameColor; | |||||
String currentPriceColor; | |||||
String marketPriceColor; | |||||
String couponTextColor; | |||||
String couponBgColor; | |||||
String commissionTextColor; | |||||
String commissionBgColor; | |||||
GoodsDetailRecommendModel( | |||||
{this.recListIcon, | |||||
this.recListText, | |||||
this.recListTextColor, | |||||
this.recType, | |||||
this.providerNameColor, | |||||
this.providerBgColor, | |||||
this.titleColor, | |||||
this.shopIcon, | |||||
this.shopNameColor, | |||||
this.currentPriceColor, | |||||
this.marketPriceColor, | |||||
this.couponTextColor, | |||||
this.couponBgColor, | |||||
this.commissionTextColor, | |||||
this.commissionBgColor}); | |||||
GoodsDetailRecommendModel.fromJson(Map<String, dynamic> json) { | |||||
recListIcon = json['rec_list_icon']; | |||||
recListText = json['rec_list_text']; | |||||
recListTextColor = json['rec_list_text_color']; | |||||
recType = json['rec_type']; | |||||
providerNameColor = json['provider_name_color']; | |||||
providerBgColor = json['provider_bg_color']; | |||||
titleColor = json['title_color']; | |||||
shopIcon = json['shop_icon']; | |||||
shopNameColor = json['shop_name_color']; | |||||
currentPriceColor = json['current_price_color']; | |||||
marketPriceColor = json['market_price_color']; | |||||
couponTextColor = json['coupon_text_color']; | |||||
couponBgColor = json['coupon_bg_color']; | |||||
commissionTextColor = json['commission_text_color']; | |||||
commissionBgColor = json['commission_bg_color']; | |||||
} | |||||
Map<String, dynamic> toJson() { | |||||
final Map<String, dynamic> data = new Map<String, dynamic>(); | |||||
data['rec_list_icon'] = this.recListIcon; | |||||
data['rec_list_text'] = this.recListText; | |||||
data['rec_list_text_color'] = this.recListTextColor; | |||||
data['rec_type'] = this.recType; | |||||
data['provider_name_color'] = this.providerNameColor; | |||||
data['provider_bg_color'] = this.providerBgColor; | |||||
data['title_color'] = this.titleColor; | |||||
data['shop_icon'] = this.shopIcon; | |||||
data['shop_name_color'] = this.shopNameColor; | |||||
data['current_price_color'] = this.currentPriceColor; | |||||
data['market_price_color'] = this.marketPriceColor; | |||||
data['coupon_text_color'] = this.couponTextColor; | |||||
data['coupon_bg_color'] = this.couponBgColor; | |||||
data['commission_text_color'] = this.commissionTextColor; | |||||
data['commission_bg_color'] = this.commissionBgColor; | |||||
return data; | |||||
} | |||||
} |
@@ -1,32 +0,0 @@ | |||||
// GENERATED CODE - DO NOT MODIFY BY HAND | |||||
part of 'home_auth_model.dart'; | |||||
// ************************************************************************** | |||||
// JsonSerializableGenerator | |||||
// ************************************************************************** | |||||
HomeAuthModel _$HomeAuthModelFromJson(Map<String, dynamic> json) { | |||||
return HomeAuthModel( | |||||
json['taobao_auth_icon'] as String, | |||||
json['taoabo_tip_bg_color'] as String, | |||||
json['taoabo_tip_shadow_color'] as String, | |||||
json['taoabo_tip_text_color'] as String, | |||||
json['taoabo_tip_text'] as String, | |||||
json['taoabo_tip_btn_text_color'] as String, | |||||
json['taoabo_tip_btn_bg_color'] as String, | |||||
json['taoabo_tip_btn_text'] as String, | |||||
); | |||||
} | |||||
Map<String, dynamic> _$HomeAuthModelToJson(HomeAuthModel instance) => | |||||
<String, dynamic>{ | |||||
'taobao_auth_icon': instance.icon, | |||||
'taoabo_tip_bg_color': instance.bgColor, | |||||
'taoabo_tip_shadow_color': instance.shadowColor, | |||||
'taoabo_tip_text_color': instance.textColor, | |||||
'taoabo_tip_text': instance.text, | |||||
'taoabo_tip_btn_text_color': instance.tipBtnTextColor, | |||||
'taoabo_tip_btn_bg_color': instance.tipBtnBgColor, | |||||
'taoabo_tip_btn_text': instance.tipBtnText, | |||||
}; |
@@ -1,29 +0,0 @@ | |||||
// GENERATED CODE - DO NOT MODIFY BY HAND | |||||
part of 'home_goods_header_model.dart'; | |||||
// ************************************************************************** | |||||
// JsonSerializableGenerator | |||||
// ************************************************************************** | |||||
HomeGoodsHeaderModel _$HomeGoodsHeaderModelFromJson(Map<String, dynamic> json) { | |||||
return HomeGoodsHeaderModel( | |||||
json['type'] as String, | |||||
json['title'] as String, | |||||
json['subtitle'] as String, | |||||
json['tilte_text_color'] as String, | |||||
json['subtitle_bg_color'] as String, | |||||
json['subtitle_text_color'] as String, | |||||
); | |||||
} | |||||
Map<String, dynamic> _$HomeGoodsHeaderModelToJson( | |||||
HomeGoodsHeaderModel instance) => | |||||
<String, dynamic>{ | |||||
'type': instance.type, | |||||
'title': instance.title, | |||||
'subtitle': instance.subtitle, | |||||
'tilte_text_color': instance.tilteTextColor, | |||||
'subtitle_bg_color': instance.subtitleBgColor, | |||||
'subtitle_text_color': instance.subtitleTextColor, | |||||
}; |
@@ -1,38 +0,0 @@ | |||||
// GENERATED CODE - DO NOT MODIFY BY HAND | |||||
part of 'home_goods_model.dart'; | |||||
// ************************************************************************** | |||||
// JsonSerializableGenerator | |||||
// ************************************************************************** | |||||
HomeGoodsModel _$HomeGoodsModelFromJson(Map<String, dynamic> json) { | |||||
return HomeGoodsModel( | |||||
json['provider'] as String, | |||||
json['provider_name'] as String, | |||||
json['good_id'] as String, | |||||
json['good_image'] as String, | |||||
json['good_title'] as String, | |||||
json['shop_name'] as String, | |||||
json['coupon'] as String, | |||||
json['commission'] as String, | |||||
json['market_price'] as String, | |||||
json['current_price'] as String, | |||||
json['inorder_count'] as String, | |||||
); | |||||
} | |||||
Map<String, dynamic> _$HomeGoodsModelToJson(HomeGoodsModel instance) => | |||||
<String, dynamic>{ | |||||
'provider': instance.provider, | |||||
'provider_name': instance.providerName, | |||||
'good_id': instance.goodId, | |||||
'good_image': instance.goodImage, | |||||
'good_title': instance.goodTitle, | |||||
'shop_name': instance.shopName, | |||||
'coupon': instance.coupon, | |||||
'commission': instance.commission, | |||||
'market_price': instance.marketPrice, | |||||
'current_price': instance.currentPrice, | |||||
'inorder_count': instance.inorderCount, | |||||
}; |
@@ -1,44 +0,0 @@ | |||||
// GENERATED CODE - DO NOT MODIFY BY HAND | |||||
part of 'home_goods_style_model.dart'; | |||||
// ************************************************************************** | |||||
// JsonSerializableGenerator | |||||
// ************************************************************************** | |||||
HomeGoodsStyleModel _$HomeGoodsStyleModelFromJson(Map<String, dynamic> json) { | |||||
return HomeGoodsStyleModel( | |||||
(json['recommend_list'] as List) | |||||
?.map((e) => e == null | |||||
? null | |||||
: HomeGoodsHeaderModel.fromJson(e as Map<String, dynamic>)) | |||||
?.toList(), | |||||
json['provider_name_color'] as String, | |||||
json['provider_name_background_color'] as String, | |||||
json['shop_name_color'] as String, | |||||
json['shop_icon'] as String, | |||||
json['coupon_font_color'] as String, | |||||
json['coupon_bg_color'] as String, | |||||
json['commission_font_color'] as String, | |||||
json['commission_bg_color'] as String, | |||||
json['market_price_color'] as String, | |||||
json['current_price_color'] as String, | |||||
)..column = json['list_column'] as String; | |||||
} | |||||
Map<String, dynamic> _$HomeGoodsStyleModelToJson( | |||||
HomeGoodsStyleModel instance) => | |||||
<String, dynamic>{ | |||||
'list_column': instance.column, | |||||
'recommend_list': instance.recommendList, | |||||
'provider_name_color': instance.providerNameColor, | |||||
'provider_name_background_color': instance.providerNameBackgroundColor, | |||||
'shop_name_color': instance.shopNameColor, | |||||
'shop_icon': instance.shopIcon, | |||||
'coupon_font_color': instance.couponFontColor, | |||||
'coupon_bg_color': instance.couponBgColor, | |||||
'commission_font_color': instance.commissionFontColor, | |||||
'commission_bg_color': instance.commissionBgColor, | |||||
'market_price_color': instance.marketPriceColor, | |||||
'current_price_color': instance.currentPriceColor, | |||||
}; |
@@ -1,46 +0,0 @@ | |||||
// GENERATED CODE - DO NOT MODIFY BY HAND | |||||
part of 'mine_data_model.dart'; | |||||
// ************************************************************************** | |||||
// JsonSerializableGenerator | |||||
// ************************************************************************** | |||||
MineDataModel _$MineDataModelFromJson(Map<String, dynamic> json) { | |||||
return MineDataModel( | |||||
json['accumulated_earnings_name_color'] as String, | |||||
json['accumulated_earnings_color'] as String, | |||||
json['accumulated_earnings_bg_img'] as String, | |||||
json['btn_text'] as String, | |||||
json['btn_text_color'] as String, | |||||
json['btn_img'] as String, | |||||
json['required_login'] as String, | |||||
json['required_taobao_auth'] as String, | |||||
json['skip_identifier'] as String, | |||||
json['grid_view_bg_color'] as String, | |||||
json['grid_view_name_color'] as String, | |||||
json['grid_view_value_color'] as String, | |||||
(json['grid_view'] as List) | |||||
?.map((e) => e == null | |||||
? null | |||||
: MineProfileDataModel.fromJson(e as Map<String, dynamic>)) | |||||
?.toList(), | |||||
); | |||||
} | |||||
Map<String, dynamic> _$MineDataModelToJson(MineDataModel instance) => | |||||
<String, dynamic>{ | |||||
'accumulated_earnings_name_color': instance.accumulatedEarningsNameColor, | |||||
'accumulated_earnings_color': instance.accumulatedEarningsColor, | |||||
'accumulated_earnings_bg_img': instance.accumulatedEarningsBgImg, | |||||
'btn_text': instance.btnText, | |||||
'btn_text_color': instance.btnTextColor, | |||||
'btn_img': instance.btnImg, | |||||
'required_login': instance.requiredLogin, | |||||
'required_taobao_auth': instance.requiredTaobaoAuth, | |||||
'skip_identifier': instance.skipIdentifier, | |||||
'grid_view_bg_color': instance.gridViewBgColor, | |||||
'grid_view_name_color': instance.gridViewNameColor, | |||||
'grid_view_value_color': instance.gridViewValueColor, | |||||
'grid_view': instance.datas, | |||||
}; |
@@ -1,42 +0,0 @@ | |||||
// GENERATED CODE - DO NOT MODIFY BY HAND | |||||
part of 'mine_header_model.dart'; | |||||
// ************************************************************************** | |||||
// JsonSerializableGenerator | |||||
// ************************************************************************** | |||||
MineHeaderModel _$MineHeaderModelFromJson(Map<String, dynamic> json) { | |||||
return MineHeaderModel( | |||||
json['non_login_avatar'] as String, | |||||
json['user_name_color'] as String, | |||||
json['invited_code_text'] as String, | |||||
json['invited_code_color'] as String, | |||||
json['login_color'] as String, | |||||
json['login_name'] as String, | |||||
json['login_name_help_text'] as String, | |||||
json['coype_icon'] as String, | |||||
json['required_login'] as String, | |||||
json['required_taobao_auth'] as String, | |||||
json['skip_identifier'] as String, | |||||
) | |||||
..lvBgColor = json['lv_bg_color'] as String | |||||
..lvNameColor = json['lv_name_color'] as String; | |||||
} | |||||
Map<String, dynamic> _$MineHeaderModelToJson(MineHeaderModel instance) => | |||||
<String, dynamic>{ | |||||
'lv_bg_color': instance.lvBgColor, | |||||
'lv_name_color': instance.lvNameColor, | |||||
'non_login_avatar': instance.defaultAvatar, | |||||
'user_name_color': instance.userNameColor, | |||||
'invited_code_text': instance.invitedCodeText, | |||||
'invited_code_color': instance.invitedCodeColor, | |||||
'login_color': instance.loginColor, | |||||
'login_name': instance.loginName, | |||||
'login_name_help_text': instance.loginNameHelpText, | |||||
'coype_icon': instance.coypeIcon, | |||||
'required_login': instance.requiredLogin, | |||||
'required_taobao_auth': instance.requiredTaobaoAuth, | |||||
'skip_identifier': instance.skipIdentifier, | |||||
}; |
@@ -1,48 +0,0 @@ | |||||
// GENERATED CODE - DO NOT MODIFY BY HAND | |||||
part of 'mine_profile_model.dart'; | |||||
// ************************************************************************** | |||||
// JsonSerializableGenerator | |||||
// ************************************************************************** | |||||
MineProfileModel _$MineProfileModelFromJson(Map<String, dynamic> json) { | |||||
return MineProfileModel( | |||||
json['username'] as String, | |||||
json['avatar'] as String, | |||||
json['InviteCode'] as String, | |||||
json['user_lv_name'] as String, | |||||
json['user_lv_icon'] as String, | |||||
json['total'] as String, | |||||
(json['grid_views'] as List) | |||||
?.map((e) => e == null | |||||
? null | |||||
: MineProfileDataModel.fromJson(e as Map<String, dynamic>)) | |||||
?.toList(), | |||||
); | |||||
} | |||||
Map<String, dynamic> _$MineProfileModelToJson(MineProfileModel instance) => | |||||
<String, dynamic>{ | |||||
'username': instance.username, | |||||
'avatar': instance.avatar, | |||||
'InviteCode': instance.inviteCode, | |||||
'user_lv_name': instance.userLvName, | |||||
'user_lv_icon': instance.userLvIcon, | |||||
'total': instance.total, | |||||
'grid_views': instance.datas, | |||||
}; | |||||
MineProfileDataModel _$MineProfileDataModelFromJson(Map<String, dynamic> json) { | |||||
return MineProfileDataModel( | |||||
json['name'] as String, | |||||
json['value'] as String, | |||||
); | |||||
} | |||||
Map<String, dynamic> _$MineProfileDataModelToJson( | |||||
MineProfileDataModel instance) => | |||||
<String, dynamic>{ | |||||
'name': instance.name, | |||||
'value': instance.value, | |||||
}; |
@@ -84,7 +84,7 @@ class MineQuickEntry extends StatelessWidget { | |||||
), | ), | ||||
), | ), | ||||
onTap: () { | onTap: () { | ||||
// RouterUtil.route(model.items[index].toJson(), context); | |||||
RouterUtil.route(model.functionsList[index], model.functionsList[index].toJson(), context); | |||||
}, | }, | ||||
); | ); | ||||
}, | }, | ||||
@@ -1,3 +1,5 @@ | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
class MineQuickModel { | class MineQuickModel { | ||||
String myFunctionsText; | String myFunctionsText; | ||||
String myFunctionsTextColor; | String myFunctionsTextColor; | ||||
@@ -40,7 +42,7 @@ class MineQuickModel { | |||||
} | } | ||||
class MineQuickItemModel { | |||||
class MineQuickItemModel extends SkipModel { | |||||
String icon; | String icon; | ||||
String name; | String name; | ||||
String nameColor; | String nameColor; | ||||
@@ -54,7 +56,7 @@ class MineQuickItemModel { | |||||
this.nameColor, | this.nameColor, | ||||
this.requiredLogin, | this.requiredLogin, | ||||
this.requiredTaobaoAuth, | this.requiredTaobaoAuth, | ||||
this.skipIdentifier}); | |||||
this.skipIdentifier}): super(requiredLogin: requiredLogin, requiredTaobaoAuth: requiredTaobaoAuth, skipIdentifier: skipIdentifier,); | |||||
MineQuickItemModel.fromJson(Map<String, dynamic> json) { | MineQuickItemModel.fromJson(Map<String, dynamic> json) { | ||||
icon = json['icon']; | icon = json['icon']; | ||||
@@ -1,50 +0,0 @@ | |||||
// GENERATED CODE - DO NOT MODIFY BY HAND | |||||
part of 'mine_quick_model.dart'; | |||||
// ************************************************************************** | |||||
// JsonSerializableGenerator | |||||
// ************************************************************************** | |||||
MineQuickModel _$MineQuickModelFromJson(Map<String, dynamic> json) { | |||||
return MineQuickModel( | |||||
json['my_functions_text'] as String, | |||||
json['my_functions_text_color'] as String, | |||||
json['layout'] as String, | |||||
json['functions_bg_color'] as String, | |||||
(json['functions_list'] as List) | |||||
?.map((e) => e == null | |||||
? null | |||||
: MineQuickItemModel.fromJson(e as Map<String, dynamic>)) | |||||
?.toList(), | |||||
); | |||||
} | |||||
Map<String, dynamic> _$MineQuickModelToJson(MineQuickModel instance) => | |||||
<String, dynamic>{ | |||||
'my_functions_text': instance.title, | |||||
'my_functions_text_color': instance.titleColor, | |||||
'layout': instance.layout, | |||||
'functions_bg_color': instance.myFunctionsBgColor, | |||||
'functions_list': instance.items, | |||||
}; | |||||
MineQuickItemModel _$MineQuickItemModelFromJson(Map<String, dynamic> json) { | |||||
return MineQuickItemModel( | |||||
json['name'] as String, | |||||
json['icon'] as String, | |||||
json['required_login'] as String, | |||||
json['required_taobao_auth'] as String, | |||||
json['skip_identifier'] as String, | |||||
)..nameColor = json['name_color'] as String; | |||||
} | |||||
Map<String, dynamic> _$MineQuickItemModelToJson(MineQuickItemModel instance) => | |||||
<String, dynamic>{ | |||||
'name': instance.name, | |||||
'name_color': instance.nameColor, | |||||
'icon': instance.icon, | |||||
'required_login': instance.requiredLogin, | |||||
'required_taobao_auth': instance.requiredTaobaoAuth, | |||||
'skip_identifier': instance.skipIdentifier, | |||||
}; |