n_image_picker 0.0.1+2 copy "n_image_picker: ^0.0.1+2" to clipboard
n_image_picker: ^0.0.1+2 copied to clipboard

Neil's Image Picker.

Neil's Image Picker #

With this widget, you can: #

  • Select images
  • Load images on startup
  • Name the JSON key of the image
  • Obtain the multipart file
  • Have error control when loading the image
  • Change the widgets displayed when loading the initial image, when selecting an image, when undoing the selection of an image, and when an error occurs.

Controller properties #

nImagePickerController.bytes -> Uint8List // Image in bytes list
nImagePickerController.error -> bool // When onLoadingImage has a url
nImagePickerController.file -> File
nImagePickerController.fileTypes -> List<String> // List of upported formats
nImagePickerController.image -> Image // Image filetype
nImagePickerController.imageKey -> String // key for json upload image
nImagePickerController.multipartFile -> MultipartFile // File ready for upload
nImagePickerController.path -> Path
  1. Create a controller and add a listener
NImagePickerController nImagePickerController = NImagePickerController();

@override
void initState() {
    super.initState();
    nImagePickerController.addListener(() => setState(() {}));
}
  1. Use the widget ;D
NImagePicker(
    controller      : nImagePickerController,
    onLoadingImage  : 'https://w.wallhaven.cc/full/jx/wallhaven-jxd1x5.jpg',
    bankgroundColor : Colors.blueGrey.withOpacity(0.5),
    height          : 250,
    width           : 250,
    enable          : true,
    filterOpacity   : 0.2,
    borderRadius    : BorderRadius.circular(50),
    fit             : BoxFit.cover,
    border          : Border.all(color: Colors.black, width: 4),
    shadow          : const BoxShadow(color: Colors.black, blurRadius: 10, blurStyle: BlurStyle.outer),
    margin          : const EdgeInsets.all(40),
),

3
likes
0
points
455
downloads

Publisher

unverified uploader

Weekly Downloads

Neil's Image Picker.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

file_picker, flutter, http, http_parser, plugin_platform_interface

More

Packages that depend on n_image_picker