changePage method

Future<void> changePage(
  1. ChangePageAction action,
  2. BuildContext context
)

Implementation

Future<void> changePage(
  ChangePageAction action,
  BuildContext context,
) async {
  //final component = state.pa
  await Navigator.of(context).push(
    CupertinoPageRoute(
      builder: (context) => BlocProvider(
        create: (_) => PageCubit(
          const PageState(
            isPage: true,
            nodes: [],
            fit: ComponentFit.absolute,
          ),
          getIt(),
        ),
        child: Scaffold(body: context.getPage(action.componentID)),
      ),
    ),
  );
}