@@ -1,5 +1,6 @@ | |||
package cn.zhios.zhiying_base_widget_example; | |||
import android.content.Intent; | |||
import android.graphics.Color; | |||
import android.graphics.drawable.ColorDrawable; | |||
import android.os.Build; | |||
@@ -38,6 +39,13 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN | |||
} | |||
@Override | |||
protected void onNewIntent(@NonNull Intent intent) { | |||
super.onNewIntent(intent); | |||
setIntent(intent); | |||
MobLink.updateNewIntent(getIntent(), this); | |||
} | |||
@Override | |||
public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { | |||
GeneratedPluginRegistrant.registerWith(flutterEngine); | |||
@@ -82,7 +90,7 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN | |||
Map map = new HashMap(); | |||
map.put("domain", "http://inapi.izhyin.cn"); //"http://120.76.175.204:8989"); | |||
// map.put("domain", "http://192.168.0.113:5000"); | |||
map.put("master_id", "123456"); | |||
map.put("master_id", "template_database"); | |||
map.put("secret_key", "123456"); | |||
// map.put("token", "123465"); | |||
return map; | |||
@@ -61,6 +61,9 @@ class _MyAppState extends State<MyApp> { | |||
ChangeNotifierProvider.value(value: UserInfoNotifier()), | |||
], | |||
child: MaterialApp( | |||
routes: <String, WidgetBuilder>{ | |||
'/homePage': (BuildContext context) => HomePage() , | |||
}, | |||
navigatorKey: navigatorKey, | |||
localizationsDelegates: [ | |||
RefreshLocalizations.delegate, | |||
@@ -86,7 +89,7 @@ class _MyAppState extends State<MyApp> { | |||
} | |||
}, | |||
child: LaunchPage( | |||
builder: (context) => HomePage(), | |||
// builder: (context) => HomePage(), | |||
), | |||
), | |||
), | |||
@@ -3,6 +3,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart'; | |||
import 'package:provider/provider.dart'; | |||
import 'package:flutter_bloc/flutter_bloc.dart'; | |||
import 'package:zhiying_base_widget/pages/main_page/notifier/main_page_notifier.dart'; | |||
import 'package:zhiying_base_widget/widgets/empty/empty_widget.dart'; | |||
import 'package:zhiying_base_widget/widgets/refresh/refresh_footer/refresh_footer.dart'; | |||
import 'package:zhiying_base_widget/widgets/refresh/refresh_header/refresh_header.dart'; | |||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||
@@ -178,7 +179,9 @@ class __CustomItemPageContainerState extends State<_CustomItemPageContainer> wit | |||
/// 空数据 | |||
Widget _buildEmptyWidget() { | |||
return Container(); | |||
return Container( | |||
child: EmptyWidget(), | |||
); | |||
} | |||
/// 骨架图 | |||
@@ -46,11 +46,11 @@ class _LaunchPageState extends State<LaunchPage> { | |||
if (widget.builder != null) { | |||
Navigator.of(context) | |||
.pushReplacement(CupertinoPageRoute(builder: widget.builder)); | |||
Navigator.of(context).pushReplacement(CupertinoPageRoute(builder: widget.builder)); | |||
} else { | |||
Navigator.of(context).pushReplacement( | |||
CupertinoPageRoute(builder: (context) => HomePage())); | |||
// Navigator.of(context).pushReplacement( | |||
// CupertinoPageRoute(builder: (context) => HomePage())); | |||
Navigator.of(context).pushReplacementNamed('/homePage'); | |||
} | |||
}).catchError((err) { | |||
Logger.error(err); | |||
@@ -141,7 +141,7 @@ class BaseWidgetRegister { | |||
// 注册页面 | |||
static void registPage() { | |||
PageFactory.regist('LaunchPage', (model) => LaunchPage()); | |||
PageFactory.regist('homePage', (model) => HomePage()); | |||
// PageFactory.regist('homePage', (model) => HomePage()); | |||
PageFactory.regist('pub.flutter.index', (model) => MainPage(model)); | |||
PageFactory.regist('pub.flutter.profile', (model) => MainPage(model)); | |||
PageFactory.regist( | |||
@@ -30,7 +30,7 @@ class GoodsDetailsFooterWidget extends StatelessWidget { | |||
child: BlocProvider<GoodsDetailsFooterBloc>( | |||
create: (_) => GoodsDetailsFooterBloc(repository: GoodsDetailsFooterRepository()), | |||
//..add(GoodsDetailsFooterInitEvent(model: model)), | |||
child: GooddsDetailsFooterContainer( | |||
child: _GoodsDetailsFooterContainer( | |||
model, | |||
key: UniqueKey(), | |||
), | |||
@@ -39,16 +39,16 @@ class GoodsDetailsFooterWidget extends StatelessWidget { | |||
} | |||
} | |||
class GooddsDetailsFooterContainer extends StatefulWidget { | |||
class _GoodsDetailsFooterContainer extends StatefulWidget { | |||
final Map<String, dynamic> model; | |||
const GooddsDetailsFooterContainer(this.model, {Key key}) : super(key: key); | |||
const _GoodsDetailsFooterContainer(this.model, {Key key}) : super(key: key); | |||
@override | |||
_GooddsDetailsFooterContainerState createState() => _GooddsDetailsFooterContainerState(); | |||
_GoodsDetailsFooterContainerState createState() => _GoodsDetailsFooterContainerState(); | |||
} | |||
class _GooddsDetailsFooterContainerState extends State<GooddsDetailsFooterContainer> { | |||
class _GoodsDetailsFooterContainerState extends State<_GoodsDetailsFooterContainer> { | |||
UserInfoModel _user; | |||
@override | |||
@@ -65,11 +65,19 @@ class _GooddsDetailsFooterContainerState extends State<GooddsDetailsFooterContai | |||
/// 打开首页 | |||
void _openHome() { | |||
Navigator.pushAndRemoveUntil( | |||
context, | |||
CupertinoPageRoute(builder: (BuildContext context) => PageFactory.create('homePage', null)), | |||
(Route<dynamic> route) => false, | |||
); | |||
// Navigator.pushAndRemoveUntil( | |||
// context, | |||
// CupertinoPageRoute(builder: (BuildContext context) => PageFactory.create('homePage', null)), | |||
// (Route<dynamic> route) => false, | |||
// ); | |||
// Navigator.popUntil( | |||
// context, | |||
// CupertinoPageRoute(builder: (BuildContext context) => PageFactory.create('homePage', null)), | |||
// (Route<dynamic> route) => false, | |||
// ); | |||
RouterUtil.goBackHomePage(context); | |||
} | |||
/// 收藏 | |||
@@ -11,7 +11,7 @@ import 'package:zhiying_comm/util/base_bloc.dart'; | |||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||
class GoodsDetailCommendCreater extends WidgetCreater { | |||
final EventBus _eventBus = EventBus(); | |||
// final EventBus _eventBus = EventBus(); | |||
@override | |||
List<Widget> createWidgets(Map<String, dynamic> model) { | |||
@@ -25,13 +25,37 @@ class GoodsDetailCommendCreater extends WidgetCreater { | |||
// child: HomeGoodsHeader(model, _eventBus), | |||
// ); | |||
String provider = 'taobao'; | |||
Map<String, dynamic> json = convert.jsonDecode(model['data']); | |||
bool haveProvider = false; | |||
try{ | |||
haveProvider = json.containsKey('provider') && !EmptyUtil.isEmpty(json['provider']); | |||
if(haveProvider){ | |||
provider = json['provider']; | |||
} | |||
}catch(e, s){ | |||
provider = 'taobao'; | |||
Logger.error(e,s); | |||
} | |||
try { | |||
if(!haveProvider) { | |||
var listStyle = json['list_style']; | |||
provider = listStyle['product_type']?.toString() ?? 'taobao'; | |||
} | |||
} catch (e, s) { | |||
provider = 'taobao'; | |||
Logger.error(e, s); | |||
} | |||
Logger.warn(model?.toString()); | |||
return [ | |||
SliverToBoxAdapter( | |||
child: GoodsDetailsRecommendWidget(model), | |||
), | |||
GoodsDetailCommendList( | |||
model, | |||
provider: 'taobao', // 猜你喜欢数据源暂无数据 | |||
provider: provider, // 猜你喜欢数据源暂无数据 | |||
), | |||
]; | |||
} | |||
@@ -3,7 +3,7 @@ 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_comm/zhiying_comm.dart'; | |||
import 'package:zhiying_base_widget/pages/main_page/notifier/main_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'; | |||
@@ -86,7 +86,7 @@ class _GoodsDetailCommendListContainerState extends State<_GoodsDetailCommendLis | |||
} | |||
List<HomeGoodsModel> goods = snapshot.data; | |||
int column = 2; | |||
int column = int.parse(_style?.listStyle?.listColumn ?? '2') ; | |||
int count = ((goods?.length ?? 0) / column).ceil(); | |||
return SliverList( | |||
delegate: SliverChildBuilderDelegate( | |||
@@ -161,18 +161,18 @@ class HomeGoodsItem extends StatelessWidget { | |||
Widget _createCupone() { | |||
List<Widget> widgets = List(); | |||
if (goods.coupon != null && goods.coupon != '') { | |||
var couponDe = style?.listStyle?.couponCommission?.coupon?.isImg == '1' | |||
var couponDe = style?.listStyle?.couponCommission?.coupon?.bgType == 'img' | |||
? BoxDecoration( | |||
image: DecorationImage( | |||
image: CachedNetworkImageProvider( | |||
style?.listStyle?.couponCommission?.coupon?.couponBgImg ?? | |||
style?.listStyle?.couponCommission?.coupon?.bgImg ?? | |||
''), | |||
), | |||
borderRadius: BorderRadius.circular(2.5), | |||
) | |||
: BoxDecoration( | |||
color: HexColor.fromHex( | |||
style?.listStyle?.couponCommission?.coupon?.couponBgColor), | |||
style?.listStyle?.couponCommission?.coupon?.bgColor), | |||
borderRadius: BorderRadius.circular(2.5), | |||
); | |||
@@ -204,17 +204,17 @@ class HomeGoodsItem extends StatelessWidget { | |||
height: 1, | |||
fontSize: 11, | |||
color: HexColor.fromHex(style | |||
?.listStyle?.couponCommission?.coupon?.couponFontColor), | |||
?.listStyle?.couponCommission?.coupon?.fontColor), | |||
), | |||
children: [ | |||
TextSpan( | |||
text: | |||
'${style?.listStyle?.couponCommission?.coupon?.couonText ?? '元劵'}', | |||
'${style?.listStyle?.couponCommission?.coupon?.text ?? '元劵'}', | |||
style: TextStyle( | |||
height: 1, | |||
fontSize: 11, | |||
color: HexColor.fromHex(style | |||
?.listStyle?.couponCommission?.coupon?.couponFontColor), | |||
?.listStyle?.couponCommission?.coupon?.fontColor), | |||
), | |||
) | |||
]), | |||
@@ -224,18 +224,18 @@ class HomeGoodsItem extends StatelessWidget { | |||
if (goods.commission != null || goods.commission != '') { | |||
var commissionDe = | |||
style?.listStyle?.couponCommission?.commission?.isImg == '1' | |||
style?.listStyle?.couponCommission?.commission?.bgType == 'img' | |||
? BoxDecoration( | |||
image: DecorationImage( | |||
image: CachedNetworkImageProvider(style?.listStyle | |||
?.couponCommission?.commission?.commissionBgImg ?? | |||
?.couponCommission?.commission?.bgImg ?? | |||
''), | |||
), | |||
borderRadius: BorderRadius.circular(2.5), | |||
) | |||
: BoxDecoration( | |||
color: HexColor.fromHex(style?.listStyle?.couponCommission | |||
?.commission?.commissionBgColor), | |||
?.commission?.bgColor), | |||
borderRadius: BorderRadius.circular(2.5), | |||
); | |||
@@ -252,12 +252,12 @@ class HomeGoodsItem extends StatelessWidget { | |||
textAlign: TextAlign.center, | |||
text: TextSpan( | |||
text: | |||
'${style?.listStyle?.couponCommission?.commission?.commissionText ?? ''}', | |||
'${style?.listStyle?.couponCommission?.commission?.text ?? ''}', | |||
style: TextStyle( | |||
height: 1, | |||
fontSize: 11, | |||
color: HexColor.fromHex(style?.listStyle?.couponCommission | |||
?.commission?.commissionFontColor), | |||
?.commission?.fontColor), | |||
), | |||
children: [ | |||
TextSpan( | |||
@@ -266,7 +266,7 @@ class HomeGoodsItem extends StatelessWidget { | |||
height: 1, | |||
fontSize: 11, | |||
color: HexColor.fromHex(style?.listStyle?.couponCommission | |||
?.commission?.commissionFontColor), | |||
?.commission?.fontColor), | |||
), | |||
) | |||
]), | |||
@@ -167,18 +167,18 @@ class HomeGoodsItemSingle extends StatelessWidget { | |||
Widget _createCupone() { | |||
List<Widget> widgets = List(); | |||
if (goods.coupon != null && goods.coupon != '') { | |||
var couponDe = style?.listStyle?.couponCommission?.coupon?.isImg == '1' | |||
var couponDe = style?.listStyle?.couponCommission?.coupon?.bgImg == 'img' | |||
? BoxDecoration( | |||
image: DecorationImage( | |||
image: CachedNetworkImageProvider( | |||
style?.listStyle?.couponCommission?.coupon?.couponBgImg ?? | |||
style?.listStyle?.couponCommission?.coupon?.bgImg ?? | |||
''), | |||
), | |||
borderRadius: BorderRadius.circular(2.5), | |||
) | |||
: BoxDecoration( | |||
color: HexColor.fromHex( | |||
style?.listStyle?.couponCommission?.coupon?.couponBgColor), | |||
style?.listStyle?.couponCommission?.coupon?.bgColor), | |||
borderRadius: BorderRadius.circular(2.5), | |||
); | |||
@@ -211,17 +211,17 @@ class HomeGoodsItemSingle extends StatelessWidget { | |||
height: 1, | |||
fontSize: 11, | |||
color: HexColor.fromHex(style | |||
?.listStyle?.couponCommission?.coupon?.couponFontColor), | |||
?.listStyle?.couponCommission?.coupon?.fontColor), | |||
), | |||
children: [ | |||
TextSpan( | |||
text: | |||
'${style?.listStyle?.couponCommission?.coupon?.couonText ?? '元劵'}', | |||
'${style?.listStyle?.couponCommission?.coupon?.text ?? '元劵'}', | |||
style: TextStyle( | |||
height: 1, | |||
fontSize: 11, | |||
color: HexColor.fromHex(style | |||
?.listStyle?.couponCommission?.coupon?.couponFontColor), | |||
?.listStyle?.couponCommission?.coupon?.fontColor), | |||
), | |||
) | |||
]), | |||
@@ -231,18 +231,18 @@ class HomeGoodsItemSingle extends StatelessWidget { | |||
if (goods.commission != null || goods.commission != '') { | |||
var commissionDe = | |||
style?.listStyle?.couponCommission?.commission?.isImg == '1' | |||
style?.listStyle?.couponCommission?.commission?.bgType == 'img' | |||
? BoxDecoration( | |||
image: DecorationImage( | |||
image: CachedNetworkImageProvider(style?.listStyle | |||
?.couponCommission?.commission?.commissionBgImg ?? | |||
?.couponCommission?.commission?.bgImg ?? | |||
''), | |||
), | |||
borderRadius: BorderRadius.circular(2.5), | |||
) | |||
: BoxDecoration( | |||
color: HexColor.fromHex(style?.listStyle?.couponCommission | |||
?.commission?.commissionBgColor), | |||
?.commission?.bgColor), | |||
borderRadius: BorderRadius.circular(2.5), | |||
); | |||
@@ -271,12 +271,11 @@ class HomeGoodsItemSingle extends StatelessWidget { | |||
textAlign: TextAlign.center, | |||
text: TextSpan( | |||
text: | |||
'${style?.listStyle?.couponCommission?.commission?.commissionText ?? ''}', | |||
'${style?.listStyle?.couponCommission?.commission?.text ?? ''}', | |||
style: TextStyle( | |||
height: 1, | |||
fontSize: 11, | |||
color: HexColor.fromHex(style?.listStyle?.couponCommission | |||
?.commission?.commissionFontColor), | |||
color: HexColor.fromHex(style?.listStyle?.couponCommission?.commission?.fontColor), | |||
), | |||
children: [ | |||
TextSpan( | |||
@@ -284,8 +283,7 @@ class HomeGoodsItemSingle extends StatelessWidget { | |||
style: TextStyle( | |||
height: 1, | |||
fontSize: 11, | |||
color: HexColor.fromHex(style?.listStyle?.couponCommission | |||
?.commission?.commissionFontColor), | |||
color: HexColor.fromHex(style?.listStyle?.couponCommission?.commission?.fontColor), | |||
), | |||
) | |||
]), | |||
@@ -12,6 +12,7 @@ class HomeGoodsListStyleModel { | |||
String shopIcon; | |||
HomeGoodsStyleModelCouponCommission couponCommission; | |||
HomeGoodsStyleModelHotRank hotRank; | |||
String listColumn; | |||
HomeGoodsListStyleModel( | |||
{this.hotRankIconList, | |||
@@ -26,11 +27,14 @@ class HomeGoodsListStyleModel { | |||
this.saleCountText, | |||
this.shopIcon, | |||
this.couponCommission, | |||
this.hotRank}); | |||
this.hotRank, | |||
this.listColumn, | |||
}); | |||
HomeGoodsListStyleModel.fromJson(Map<String, dynamic> json) { | |||
hotRankIconList = json['hot_rank_icon_list'].cast<String>(); | |||
topMargin = json['top_margin']; | |||
listColumn = json['list_column']; | |||
leftRighMargin = json['left_righ_margin']; | |||
if (json['providers'] != null) { | |||
providers = new List<HomeGoodsStyleModelProviders>(); | |||
@@ -57,6 +61,7 @@ class HomeGoodsListStyleModel { | |||
Map<String, dynamic> toJson() { | |||
final Map<String, dynamic> data = new Map<String, dynamic>(); | |||
data['hot_rank_icon_list'] = this.hotRankIconList; | |||
data['list_column'] = this.listColumn; | |||
data['top_margin'] = this.topMargin; | |||
data['left_righ_margin'] = this.leftRighMargin; | |||
if (this.providers != null) { | |||
@@ -103,18 +108,14 @@ class HomeGoodsStyleModelProviders { | |||
} | |||
class HomeGoodsStyleModelCouponCommission { | |||
HomeGoodsStyleModelCoupon coupon; | |||
HomeGoodsStyleModelCommission commission; | |||
Left coupon; | |||
Left commission; | |||
HomeGoodsStyleModelCouponCommission({this.coupon, this.commission}); | |||
HomeGoodsStyleModelCouponCommission.fromJson(Map<String, dynamic> json) { | |||
coupon = json['left'] != null | |||
? new HomeGoodsStyleModelCoupon.fromJson(json['left']) | |||
: null; | |||
commission = json['right'] != null | |||
? new HomeGoodsStyleModelCommission.fromJson(json['right']) | |||
: null; | |||
coupon = json['left'] != null ? new Left.fromJson(json['left']) : null; | |||
commission = json['right'] != null ? new Left.fromJson(json['right']) : null; | |||
} | |||
Map<String, dynamic> toJson() { | |||
@@ -129,72 +130,127 @@ class HomeGoodsStyleModelCouponCommission { | |||
} | |||
} | |||
class HomeGoodsStyleModelCoupon { | |||
String couonText; | |||
String couponFontColor; | |||
String couponBgColor; | |||
String couponBgImg; | |||
String isImg; | |||
HomeGoodsStyleModelCoupon( | |||
{this.couonText, | |||
this.couponFontColor, | |||
this.couponBgColor, | |||
this.couponBgImg, | |||
this.isImg}); | |||
HomeGoodsStyleModelCoupon.fromJson(Map<String, dynamic> json) { | |||
couonText = json['couon_text']?.toString(); | |||
couponFontColor = json['coupon_font_color']?.toString(); | |||
couponBgColor = json['coupon_bg_color']?.toString(); | |||
couponBgImg = json['coupon_bg_img']?.toString(); | |||
isImg = json['is_img']?.toString(); | |||
} | |||
class Left { | |||
String text; | |||
String fontColor; | |||
String bgType; | |||
String bgColor; | |||
String bgImg; | |||
Map<String, dynamic> toJson() { | |||
final Map<String, dynamic> data = new Map<String, dynamic>(); | |||
data['couon_text'] = this.couonText; | |||
data['coupon_font_color'] = this.couponFontColor; | |||
data['coupon_bg_color'] = this.couponBgColor; | |||
data['coupon_bg_img'] = this.couponBgImg; | |||
data['is_img'] = this.isImg; | |||
return data; | |||
} | |||
} | |||
Left({this.text, this.fontColor, this.bgType, this.bgColor, this.bgImg}); | |||
class HomeGoodsStyleModelCommission { | |||
String commissionText; | |||
String commissionFontColor; | |||
String commissionBgColor; | |||
String commissionBgImg; | |||
String isImg; | |||
HomeGoodsStyleModelCommission( | |||
{this.commissionText, | |||
this.commissionFontColor, | |||
this.commissionBgColor, | |||
this.commissionBgImg, | |||
this.isImg}); | |||
HomeGoodsStyleModelCommission.fromJson(Map<String, dynamic> json) { | |||
commissionText = json['commission_text']?.toString(); | |||
commissionFontColor = json['commission_font_color']?.toString(); | |||
commissionBgColor = json['commission_bg_color']?.toString(); | |||
commissionBgImg = json['commission_bg_img']?.toString(); | |||
isImg = json['is_img']?.toString(); | |||
Left.fromJson(Map<String, dynamic> json) { | |||
text = json['text']; | |||
fontColor = json['font_color']; | |||
bgType = json['bg_type']; | |||
bgColor = json['bg_color']; | |||
bgImg = json['bg_img']; | |||
} | |||
Map<String, dynamic> toJson() { | |||
final Map<String, dynamic> data = new Map<String, dynamic>(); | |||
data['commission_text'] = this.commissionText; | |||
data['commission_font_color'] = this.commissionFontColor; | |||
data['commission_bg_color'] = this.commissionBgColor; | |||
data['commission_bg_img'] = this.commissionBgImg; | |||
data['is_img'] = this.isImg; | |||
data['text'] = this.text; | |||
data['font_color'] = this.fontColor; | |||
data['bg_type'] = this.bgType; | |||
data['bg_color'] = this.bgColor; | |||
data['bg_img'] = this.bgImg; | |||
return data; | |||
} | |||
} | |||
// class HomeGoodsStyleModelCouponCommission { | |||
// HomeGoodsStyleModelCoupon coupon; | |||
// HomeGoodsStyleModelCommission commission; | |||
// | |||
// HomeGoodsStyleModelCouponCommission({this.coupon, this.commission}); | |||
// | |||
// HomeGoodsStyleModelCouponCommission.fromJson(Map<String, dynamic> json) { | |||
// coupon = json['left'] != null | |||
// ? new HomeGoodsStyleModelCoupon.fromJson(json['left']) | |||
// : null; | |||
// commission = json['right'] != null | |||
// ? new HomeGoodsStyleModelCommission.fromJson(json['right']) | |||
// : null; | |||
// } | |||
// | |||
// Map<String, dynamic> toJson() { | |||
// final Map<String, dynamic> data = new Map<String, dynamic>(); | |||
// if (this.coupon != null) { | |||
// data['left'] = this.coupon.toJson(); | |||
// } | |||
// if (this.commission != null) { | |||
// data['right'] = this.commission.toJson(); | |||
// } | |||
// return data; | |||
// } | |||
// } | |||
// class HomeGoodsStyleModelCoupon { | |||
// String couonText; | |||
// String couponFontColor; | |||
// String couponBgColor; | |||
// String couponBgImg; | |||
// String isImg; | |||
// | |||
// HomeGoodsStyleModelCoupon( | |||
// {this.couonText, | |||
// this.couponFontColor, | |||
// this.couponBgColor, | |||
// this.couponBgImg, | |||
// this.isImg}); | |||
// | |||
// HomeGoodsStyleModelCoupon.fromJson(Map<String, dynamic> json) { | |||
// couonText = json['couon_text']?.toString(); | |||
// couponFontColor = json['coupon_font_color']?.toString(); | |||
// couponBgColor = json['coupon_bg_color']?.toString(); | |||
// couponBgImg = json['coupon_bg_img']?.toString(); | |||
// isImg = json['is_img']?.toString(); | |||
// } | |||
// | |||
// Map<String, dynamic> toJson() { | |||
// final Map<String, dynamic> data = new Map<String, dynamic>(); | |||
// data['couon_text'] = this.couonText; | |||
// data['coupon_font_color'] = this.couponFontColor; | |||
// data['coupon_bg_color'] = this.couponBgColor; | |||
// data['coupon_bg_img'] = this.couponBgImg; | |||
// data['is_img'] = this.isImg; | |||
// return data; | |||
// } | |||
// } | |||
// class HomeGoodsStyleModelCommission { | |||
// String commissionText; | |||
// String commissionFontColor; | |||
// String commissionBgColor; | |||
// String commissionBgImg; | |||
// String isImg; | |||
// | |||
// HomeGoodsStyleModelCommission( | |||
// {this.commissionText, | |||
// this.commissionFontColor, | |||
// this.commissionBgColor, | |||
// this.commissionBgImg, | |||
// this.isImg}); | |||
// | |||
// HomeGoodsStyleModelCommission.fromJson(Map<String, dynamic> json) { | |||
// commissionText = json['commission_text']?.toString(); | |||
// commissionFontColor = json['commission_font_color']?.toString(); | |||
// commissionBgColor = json['commission_bg_color']?.toString(); | |||
// commissionBgImg = json['commission_bg_img']?.toString(); | |||
// isImg = json['is_img']?.toString(); | |||
// } | |||
// | |||
// Map<String, dynamic> toJson() { | |||
// final Map<String, dynamic> data = new Map<String, dynamic>(); | |||
// data['commission_text'] = this.commissionText; | |||
// data['commission_font_color'] = this.commissionFontColor; | |||
// data['commission_bg_color'] = this.commissionBgColor; | |||
// data['commission_bg_img'] = this.commissionBgImg; | |||
// data['is_img'] = this.isImg; | |||
// return data; | |||
// } | |||
// } | |||
class HomeGoodsStyleModelHotRank { | |||
String isOpen; | |||
String bgColor; | |||