import 'dart:convert';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'bloc.dart';

class CustomNoticeRepository {
  /// 获取父页面的数据
  Future<CustomNoticeModel> fetchParentData(CustomNoticeInitEvent event) async {
    try {
      String jsonStr = event.model['data'];
      return CustomNoticeModel.fromJson(jsonDecode(jsonStr));
    } catch (e) {
      Logger.log(e);
    }
    return null;
  }
}
