This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:io'; | |
| import 'package:ai38re/model/product_model.dart'; | |
| import 'package:ai38re/viewmodel/image_view_model.dart'; | |
| import 'package:ai38re/viewmodel/product_view_model.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:fluttertoast/fluttertoast.dart'; | |
| import 'package:image_picker/image_picker.dart'; | |
| import 'package:provider/provider.dart'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:ai38re/repo/image_repo.dart'; | |
| import 'package:flutter/material.dart'; | |
| class ImageViewModel extends ChangeNotifier { | |
| final ImageRepo _imageRepo; | |
| ImageViewModel({required ImageRepo imageRepo}) : _imageRepo = imageRepo; | |
| bool _loading = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:ai38re/repo/image_repo.dart'; | |
| import 'package:cloudinary_public/cloudinary_public.dart'; | |
| class ImageRepoImpl implements ImageRepo { | |
| final cloudinary = CloudinaryPublic( | |
| "dvztiygb9", // replace with yours cloud name | |
| "projects", // replace with yours unsigned present | |
| cache: false, | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.c38.view | |
| import android.app.Activity | |
| import android.net.Uri | |
| import android.os.Bundle | |
| import android.widget.Toast | |
| import androidx.activity.ComponentActivity | |
| import androidx.activity.compose.setContent | |
| import androidx.activity.enableEdgeToEdge | |
| import androidx.compose.animation.scaleOut |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.c38.utils | |
| import android.Manifest | |
| import android.app.Activity | |
| import android.content.Intent | |
| import android.net.Uri | |
| import android.os.Build | |
| import android.provider.MediaStore | |
| import android.util.Log | |
| import androidx.activity.result.ActivityResultLauncher |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.c37b.viewmodel | |
| import android.content.Context | |
| import android.net.Uri | |
| import androidx.lifecycle.ViewModel | |
| import com.example.c37b.repository.CommonRepository | |
| class ImageViewModel(val repo: ImageRepo) : ViewModel() { | |
| fun uploadImage( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.c38.repository | |
| import android.content.Context | |
| import android.database.Cursor | |
| import android.net.Uri | |
| import android.os.Handler | |
| import android.os.Looper | |
| import android.provider.OpenableColumns | |
| import com.cloudinary.Cloudinary | |
| import com.cloudinary.utils.ObjectUtils |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.c38.repository | |
| import android.content.Context | |
| import android.net.Uri | |
| interface ImageRepo { | |
| fun uploadImage( | |
| context: Context, | |
| imageUri: Uri, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.c38re.view | |
| import android.os.Bundle | |
| import androidx.activity.ComponentActivity | |
| import androidx.activity.compose.setContent | |
| import androidx.activity.enableEdgeToEdge | |
| import androidx.compose.foundation.layout.Row | |
| import androidx.compose.foundation.layout.Spacer | |
| import androidx.compose.foundation.layout.fillMaxSize | |
| import androidx.compose.foundation.layout.fillMaxWidth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.ai37c | |
| import androidx.compose.ui.test.junit4.createAndroidComposeRule | |
| import androidx.compose.ui.test.onNodeWithTag | |
| import androidx.compose.ui.test.performClick | |
| import androidx.compose.ui.test.performTextInput | |
| import androidx.test.espresso.Espresso.onView | |
| import androidx.test.ext.junit.runners.AndroidJUnit4 | |
| import org.junit.Before | |
| import org.junit.Rule |
NewerOlder