mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 22:17:55 +00:00
updated project hardcoded values
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
||||
import 'package:syncrow_app/features/auth/model/project_model.dart';
|
||||
import 'package:syncrow_app/features/auth/model/user_model.dart';
|
||||
import 'package:syncrow_app/features/menu/bloc/create_unit_bloc/create_unit_event.dart';
|
||||
import 'package:syncrow_app/features/menu/bloc/create_unit_bloc/create_unit_state.dart';
|
||||
import 'package:syncrow_app/services/api/home_creation_api.dart';
|
||||
import 'package:syncrow_app/utils/constants/temp_const.dart';
|
||||
import 'package:syncrow_app/utils/helpers/snack_bar.dart';
|
||||
|
||||
class CreateUnitBloc extends Bloc<CreateUnitEvent, CreateUnitState> {
|
||||
@@ -239,8 +241,13 @@ Future<String> _createNewRoom(
|
||||
required String communityId}) async {
|
||||
try {
|
||||
Map<String, String> body = {'subspaceName': roomName};
|
||||
Project? project = HomeCubit.getInstance().project;
|
||||
|
||||
final response = await HomeCreation.createRoom(
|
||||
communityId: communityId, spaceId: unitId, body: body);
|
||||
communityId: communityId,
|
||||
spaceId: unitId,
|
||||
body: body,
|
||||
projectId: project?.uuid ?? TempConst.projectIdDev);
|
||||
// if (response['data']['uuid'] != '') {
|
||||
// final result = await _assignToRoom(roomId: response['data']['uuid'], userId: userId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user