import 'dart:async'; import 'package:zhiying_comm/util/base_bloc.dart'; import 'package:zhiying_comm/zhiying_comm.dart'; class WalletPageBloc extends BlocBase { List> _tabs = List(); StreamController>> _tabController = StreamController>>(); Stream>> get outData => _tabController.stream; @override void dispose() { _tabController.close(); _tabController = null; } loadData(String skipIdentifier) { NetUtil.request('/api/v1/mod/${skipIdentifier}', method: NetMethod.GET, onCache: (data) { _loadData(data); }, onSuccess: (data) { _loadData(data); }); } void refresh() {} ///处理加载的数据 void _loadData(data) { print(data["mod_lis"]); var list = List.from(data["mod_list"]).map((v) { return Map.from(v); }).toList(); _tabController.add(list); } }