ImagePickerService class
origin: kt_ifm_gtid_mob/lib/shared/services/image_picker_service.dart author: himsayudhistira2, anovsiradj, opencode-go/glm-5.2 version: 2024-12-16, revised: 2026-08-17
Permission-aware media/file picker. Android-version-aware (API 33+ uses photos/videos perms).
note: source used GetX Rx<File?> + Get.context — rewritten to plain File? + caller-passed context (D5).
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getAndroidVersion(
) → Future< int> -
pickFile(
BuildContext context) → Future< File?> - Pick arbitrary file (docs/images/videos) via FilePicker.
-
pickImage(
BuildContext context, {bool isVideo = false}) → Future< File?> - Show bottom-sheet chooser (camera/gallery). Returns picked File or null.
-
pickImageFromCamera(
{bool isVideo = false}) → Future< File?> -
pickImageFromGallery(
{bool isVideo = false}) → Future< File?> -
requestStoragePermission(
BuildContext context) → Future< bool> - Request media/storage permission (Android-version-aware). iOS = always granted.