|
- import 'dart:async';
-
- import 'package:zhiying_comm/util/base_bloc.dart';
- import 'package:zhiying_comm/zhiying_comm.dart';
-
- class WalletPageBloc extends BlocBase {
- List<Map<String, dynamic>> _tabs = List();
-
- StreamController<List<Map<String, dynamic>>> _tabController =
- StreamController<List<Map<String, dynamic>>>();
-
- Stream<List<Map<String, dynamic>>> 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<String, dynamic>.from(item);
- }).toList();
- _tabController.add(_tabs);
- });
- }
- }
|