change routes with names
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flux/core/blocs/session/session_cubit.dart';
|
||||
import 'package:flux/core/routes/app_router.dart';
|
||||
import 'package:flux/core/theme/theme.dart';
|
||||
import 'package:flux/core/utils/extensions.dart';
|
||||
import 'package:flux/features/home/latest_store_operations/bloc/latest_store_operations_bloc.dart';
|
||||
@@ -48,7 +49,7 @@ class _LatestOperationsCardContent extends StatelessWidget {
|
||||
side: BorderSide(color: theme.dividerColor.withValues(alpha: 0.5)),
|
||||
),
|
||||
child: InkWell(
|
||||
onTap: () => context.push('/operations'),
|
||||
onTap: () => context.pushNamed(operationsRoute),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
@@ -134,8 +135,9 @@ class _LatestOperationsCardContent extends StatelessWidget {
|
||||
itemBuilder: (context, index) {
|
||||
final operation = state.operations[index];
|
||||
return InkWell(
|
||||
onTap: () => context.push(
|
||||
'/operations/form/id=${operation.id}',
|
||||
onTap: () => context.pushNamed(
|
||||
operationFormRoute,
|
||||
pathParameters: {'id': operation.id!},
|
||||
extra: operation,
|
||||
),
|
||||
child: Padding(
|
||||
|
||||
Reference in New Issue
Block a user