skip to Main Content

fromJSON method not being called in Flutter

I am trying to call this method but TempReceiptModel.fromJSON is not being called. Future<TempReceiptModel?> getTempReceipt({ required UserModel? user, }) async { TempReceiptModel? tempReceipt; try { // print(tempReceipt.) SharedPreferences prefs = await SharedPreferences.getInstance(); String? accessToken = prefs.getString('accesstoken'); String? userID = user?.user_id;…

VIEW QUESTION

React native – Module not found: Can't resolve '@sanity/client' and '@sanity/image-url'

import sanityClient from "@sanity/client"; import imageUrlBuilder from "@sanity/image-url"; const client = sanityClient({ projectId: "7c4vy8nu", dataset: "production", useCdn: true, apiVersion: "2021-10-21", }); const builder = imageUrlBuilder(client); export const urlFor = (source) => builder.image(source); // sanity cors add https://localhost:19000 export default client;…

VIEW QUESTION
Back To Top
Search