
import 'package:cpt_auth/modules/select_estate/select_estate_state.dart';
import 'package:cpt_auth/modules/select_unit/select_unit_page.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

part 'select_estate_view_model.g.dart';

@riverpod
class SelectEstateViewModel extends _$SelectEstateViewModel {

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

  /// 提交并进入下一步
  void submitEstate() {
    SelectUnitPage.startInstance();
  }

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