get method

Future get(
  1. BuildContext context,
  2. PageCubit pageCubit,
  3. CMSQueryAction action,
  4. JsonVar variable,
)

Implementation

Future<dynamic> get(
  BuildContext context,
  PageCubit pageCubit,
  CMSQueryAction action,
  JsonVar variable,
) async {
  final currentContext = context;
  final client = pageCubit.cmsClient;
  final newVar = variable.copyWith(data: await action.performSelect(client));
  if (currentContext.mounted) {
    context.appCubit.updateVariable(
      action.cubitID,
      action.stateID,
      newVar,
    );
  }
}