connected all devices

This commit is contained in:
ashrafzarkanisala
2024-06-22 16:44:17 +03:00
parent 7c9b7fbb86
commit 1fe4603cbf
8 changed files with 169 additions and 144 deletions

View File

@ -1,10 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
import 'package:syncrow_app/features/app_layout/view/app_layout.dart';
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/devices_cubit.dart';
import 'package:syncrow_app/features/layout/view/layout_view.dart';
import 'package:syncrow_app/features/menu/view/menu_view.dart';
import 'package:syncrow_app/features/menu/view/widgets/create_home/create_home_view.dart';
@ -72,8 +74,15 @@ class Router {
builder: (_) => const SceneAddTasksView(), settings: settings);
case Routes.sceneControlDevicesRoute:
return MaterialPageRoute(
builder: (_) => BlocProvider(
create: (context) => TabBarBloc()..add(const TabChanged(0)),
builder: (_) => MultiBlocProvider(
providers: [
BlocProvider<TabBarBloc>(
create: (BuildContext context) => TabBarBloc()
..add(const TabChanged(selectedIndex: 0, roomId: '')),
),
BlocProvider<DevicesCubit>(
create: (context) => DevicesCubit.getInstance()),
],
child: const SceneControlDevicesView(),
),
settings: settings);