boh
This commit is contained in:
@@ -236,23 +236,10 @@ class HomeScreen extends StatelessWidget {
|
||||
label: context.l10n.commonTask,
|
||||
color: Colors.teal,
|
||||
onTap: () {
|
||||
final companyId = context.read<SessionCubit>().state.company!.id!;
|
||||
final currentStaffId = context
|
||||
.read<SessionCubit>()
|
||||
.state
|
||||
.currentStaffMember!
|
||||
.id!;
|
||||
final emptyTask = TaskModel.empty(
|
||||
companyId: companyId,
|
||||
createdById: currentStaffId,
|
||||
);
|
||||
final savedTask = GetIt.I.get<TaskRepository>().createTask(
|
||||
emptyTask,
|
||||
);
|
||||
context.pushNamed(
|
||||
Routes.taskForm,
|
||||
pathParameters: {'id': 'new'},
|
||||
extra: savedTask,
|
||||
extra: (task: null),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user