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; } void refresh() { NetUtil.request('/api/v1/config.json', onSuccess: (data) { List list = data; _tabs = list.map((item) { return Map.from(item); }).toList(); _tabController.add(_tabs); }); } }