import 'dart:convert';

import 'package:zhiying_base_widget/widgets/goods_details/coupon/bloc/bloc.dart';
import 'package:zhiying_base_widget/widgets/goods_details/coupon/model/counpon_model.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class CounponRepository {

  /// 获取父页面传进来的数据
  Future<CounponModel> fetchParentData(CounponInitEvent event) async{
    try{
      return CounponModel.fromJson(json.decode(event.model['data']));
    }catch(e){
      Logger.log('CounponRepository e = $e');
    }
    return null;
  }

}
