w
This commit is contained in:
@@ -18,6 +18,7 @@ import 'package:flux/features/customers/models/customer_model.dart';
|
||||
import 'package:flux/features/customers/ui/customer_detail_screen.dart';
|
||||
import 'package:flux/features/customers/ui/customer_form_screen.dart';
|
||||
import 'package:flux/features/customers/ui/customers_list_screen.dart';
|
||||
import 'package:flux/features/home/dashboard_task_list/blocs/dashboard_task_list_cubit.dart';
|
||||
import 'package:flux/features/home/ui/home_screen.dart';
|
||||
import 'package:flux/features/master_data/master_data_hub_content.dart';
|
||||
import 'package:flux/features/master_data/products/blocs/product_cubit.dart';
|
||||
@@ -43,6 +44,7 @@ import 'package:flux/features/operations/ui/operation_form_screen.dart';
|
||||
import 'package:flux/features/operations/ui/operation_list_screen.dart';
|
||||
import 'package:flux/features/settings/settings_screen.dart';
|
||||
import 'package:flux/features/settings/theme_settings_view.dart';
|
||||
import 'package:flux/features/tasks/models/task_model.dart';
|
||||
import 'package:flux/features/tickets/blocs/ticket_form_cubit.dart';
|
||||
import 'package:flux/features/tickets/models/ticket_model.dart';
|
||||
import 'package:flux/features/tickets/ui/ticket_form_screen.dart';
|
||||
@@ -133,7 +135,16 @@ class AppRouter {
|
||||
GoRoute(
|
||||
path: '/',
|
||||
name: Routes.home,
|
||||
builder: (context, state) => const HomeScreen(),
|
||||
builder: (context, state) {
|
||||
return MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider<DashboardTaskListCubit>(
|
||||
create: (context) => DashboardTaskListCubit(),
|
||||
),
|
||||
],
|
||||
child: HomeScreen(),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
// ==========================================
|
||||
@@ -224,6 +235,11 @@ class AppRouter {
|
||||
name: Routes.notes,
|
||||
builder: (context, state) => const NotesListScreen(),
|
||||
),
|
||||
/* GoRoute(
|
||||
path: '/tasks',
|
||||
name: Routes.tasks,
|
||||
builder: (context, state) => const TaskListScreen(),
|
||||
), */
|
||||
],
|
||||
),
|
||||
|
||||
@@ -482,6 +498,33 @@ class AppRouter {
|
||||
);
|
||||
},
|
||||
),
|
||||
/* GoRoute(
|
||||
path: '/task/edit/:id',
|
||||
name: Routes.taskForm,
|
||||
builder: (context, state) {
|
||||
final id = state.pathParameters['id']!;
|
||||
final TaskModel task = state.extra as TaskModel;
|
||||
|
||||
// Creiamo il BLoC "al volo" solo per questa schermata
|
||||
return MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider<AttachmentsBloc>(
|
||||
create: (context) => AttachmentsBloc(
|
||||
parentId: id,
|
||||
parentType: AttachmentParentType.note,
|
||||
),
|
||||
),
|
||||
BlocProvider<TaskFormCubit>(
|
||||
create: (context) => TaskFormCubit(
|
||||
existingTask: task,
|
||||
),
|
||||
)
|
||||
],
|
||||
|
||||
child: TaskFormScreen(task: task),
|
||||
);
|
||||
},
|
||||
), */
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user