import 'package:cpt_auth/modules/select_role/select_role_page.dart';
import 'package:cpt_auth/modules/select_unit/select_unit_state.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

part 'select_unit_view_model.g.dart';

@riverpod
class SelectUnitViewModel extends _$SelectUnitViewModel {

  @override
  SelectUnitState build() {
    return SelectUnitState();
  }

  /// 提交选择的街道与单元
  void submitUnit() {
    SelectRolePage.startInstance();
  }

  void setRemainingSpace(double remainingSpace) {
    state = state.copyWith(remainingSpace: remainingSpace);
  }

}
