image_input 0.0.2 copy "image_input: ^0.0.2" to clipboard
image_input: ^0.0.2 copied to clipboard

A pacakage to be used for image input in flutter. It can be used to take image from camera or gallery or from a url.

Image_input #

pub package

A pacakage to be used for image input in flutter.

image_input_example

Getting Started #

Import image_input package #

import 'package:image_input/image_input.dart';

Profile Avatar #

    ProfileAvatar(
        radius: 100,
        allowEdit: true,
        backgroundColor: Colors.grey,
        addImageIcon: Container(
            decoration: BoxDecoration(
            color: Theme.of(context).colorScheme.primaryContainer,
            borderRadius: BorderRadius.circular(100),
            ),
            child: const Padding(
            padding: EdgeInsets.all(8.0),
            child: Icon(Icons.add_a_photo),
            ),
        ),
        removeImageIcon: Container(
            decoration: BoxDecoration(
            color: Theme.of(context).colorScheme.primaryContainer,
            borderRadius: BorderRadius.circular(100),
            ),
            child: const Padding(
            padding: EdgeInsets.all(8.0),
            child: Icon(Icons.close),
            ),
        ),
        onImageChanged: (XFile? image) {
            //save image to cloud and get the url
            //or
            //save image to local storage and get the path
            String? tempPath = image?.path;
            print(tempPath);
        },
    )

Usage of Profile Avatar #

  • Use in listview to show profile images.
  • use in creating a new user to take profile image input from user.

ImageInput #

    ImageInput(
        allowEdit: true,
        allowMaxImage: 5,
        onImageSelected: (image, index) {
        //save image to cloud and get the url
        //or
        //save image to local storage and get the path
        String? tempPath = image?.path;
        print(tempPath);
        },
    ),

Usage of Image Input #

  • Use to show/preview multiple images from a path
  • Use to take input of multiple images from user

Issues #

Please file issues, bugs, or feature requests in issue tracker.

6
likes
130
pub points
80%
popularity

Publisher

verified publisheraakashpamnani.in

A pacakage to be used for image input in flutter. It can be used to take image from camera or gallery or from a url.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

cached_network_image, flutter, image_picker

More

Packages that depend on image_input