基础组件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

withdraw_bloc.dart 644 B

1234567891011121314151617181920212223242526
  1. import 'dart:async';
  2. import 'package:zhiying_base_widget/pages/withdraw_page/withdraw_model.dart';
  3. import 'package:zhiying_comm/util/base_bloc.dart';
  4. import 'package:zhiying_comm/zhiying_comm.dart';
  5. class WithdrawBloc extends BlocBase {
  6. WithdrawModel model;
  7. StreamController<WithdrawModel> _dataController =
  8. StreamController<WithdrawModel>();
  9. Stream<WithdrawModel> get outData => _dataController.stream;
  10. @override
  11. void dispose() {
  12. _dataController.close();
  13. _dataController = null;
  14. }
  15. void refresh() {
  16. NetUtil.request('/api/v1/config.json', onSuccess: (data) {
  17. _dataController.add(model);
  18. });
  19. }
  20. }