mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-23 10:47:55 +00:00
finished rooms call with all devices and single devices call
This commit is contained in:
@@ -5,6 +5,8 @@ import 'package:syncrow_app/features/auth/view/otp_view.dart';
|
||||
import 'package:syncrow_app/features/auth/view/login_view.dart';
|
||||
import 'package:syncrow_app/features/auth/view/sign_up_view.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/dashboard_view.dart';
|
||||
import 'package:syncrow_app/features/devices/bloc/device_manager_bloc/device_manager_bloc.dart';
|
||||
import 'package:syncrow_app/features/devices/bloc/device_manager_bloc/device_manager_event.dart';
|
||||
import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
|
||||
import 'package:syncrow_app/features/layout/view/layout_view.dart';
|
||||
import 'package:syncrow_app/features/menu/view/menu_view.dart';
|
||||
@@ -75,12 +77,15 @@ class Router {
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider<TabBarBloc>(
|
||||
create: (BuildContext context) => TabBarBloc()
|
||||
BlocProvider(
|
||||
create: (BuildContext context) =>
|
||||
DeviceManagerBloc()..add(FetchAllDevices()),
|
||||
),
|
||||
BlocProvider(
|
||||
create: (BuildContext context) => TabBarBloc(
|
||||
context.read<DeviceManagerBloc>())
|
||||
..add(const TabChanged(selectedIndex: 0, roomId: '-1')),
|
||||
),
|
||||
BlocProvider<DevicesCubit>(
|
||||
create: (context) => DevicesCubit.getInstance()),
|
||||
],
|
||||
child: const SceneControlDevicesView(),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user