Flutter – Captura de imagen de la cámara o galleria utilizando libreria image_cropper

 

En cualquier app moderna, que implique subir una imagén , bien sea de galeria o directamente desde la camára, es prioritario incorporar a nuestro codigo, una libreria que nos permita hacer una captura que sea posible recortar, aumentar o disminuir la imagen, para adaptarla al cuadro de la imagen final!! pues en el caso de flutter , la libreria image_cropper ^0.0.8.

He realizado una pequeña aplicación en flutter, para capturar la imagen según la selección del usuario : galeria o camára, despues se hará el crop de la imagen. Este desarrollo se ha realizado en la plataforma android studio, codigo dart2 , en flutter.

He seguido las instrucciones de este blog Developer-Libs A cotinuación se muestra la funcionalidad de esta mariavillosa libreria , en mi caso , al tener instalado flutter en la plataforma Android Studio, se tiene que poner en el Manifest.xml el activity  «com.yalantis.ucrop.UCropActivity«.

 

Despúes de haber guardado en Android Manifest.xml, podremos guardar en pubspec.yaml , la librería image_cropper: ^0.0.8  (dentro de la plataforma de desarrollo xcode no es necesario guaradar este activity, solo para Android)

 

Esta es la funcionalidad de la libreria – image_cropper – de flutter, podemos alinear la imagen a nuestro gusto, girar, hacer más grande o más pequeño.

 

 

A continuación mostramos la pantalla inicial de la aplicación, tal como la encontraria el usuario :

 

Y finalmente la imagen queda asi:

Ver video en Linkedln    https://www.linkedin.com/feed/update/urn:li:activity:6464827493160353792

Tags:
8 Comments
  • ibtissem bourai
    Posted at 09:50h, 05 abril Responder

    hello i just wanna ask you if you got this problem ‘Failed to handle method call’ ?
    because when i take the picture the app stoped

    • admin
      Posted at 17:12h, 06 abril Responder

      Hi Dear,

      No, I haven’t this issue, but I recommended to you to updated plugin Image Picker.

  • 7. koğuştaki mucize full izle
    Posted at 10:44h, 19 enero Responder

    Hello, I would like to subscribe for this blog to obtain latest updates, so where can i do it please help out. Jacquette Lorin Kelby

  • filmkovasi
    Posted at 10:08h, 30 enero Responder

    It is appropriate time to make a few plans for the longer term and it is time to be happy. Andie Sancho Shalne

  • erotik
    Posted at 22:41h, 30 enero Responder

    I am really impressed with your writing skills and also with the layout on your blog. Is this a paid theme or did you modify it yourself? Either way keep up the excellent quality writing, it is rare to see a great blog like this one these days.. Margit Ellerey Ern

  • yabanci
    Posted at 11:40h, 31 enero Responder

    If you would like to get a great deal from this post then you have to apply these strategies to your won blog. Sarah Pauly Thom

  • watch
    Posted at 11:58h, 01 febrero Responder

    I dugg some of you post as I cerebrated they were invaluable very useful Anastasia Quillan Alben

  • 720p
    Posted at 21:37h, 01 febrero Responder

    Awwwww! That is so cute! I will definitely be keeping up with this comic more! ^w^ Leeanne Esra Alane

Post A Comment