awesome_image_selector 1.0.0 copy "awesome_image_selector: ^1.0.0" to clipboard
awesome_image_selector: ^1.0.0 copied to clipboard

A package to help you select, view, and edit an image with an easy workflow.

example/lib/main.dart

import 'package:awesome_image_selector/awesome_image_selector.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: ImageSelectorDemo(),
    );
  }
}

class ImageSelectorDemo extends StatefulWidget {
  @override
  _ImageSelectorDemoState createState() => _ImageSelectorDemoState();
}

class _ImageSelectorDemoState extends State<ImageSelectorDemo> {
  XFile? selectedImage;

  void onImageChanged(XFile file) {
    setState(() {
      selectedImage = file;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Image Selector Demo'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            AwesomeImageSelector(
              onImageChanged: onImageChanged,
              initialImage: null,
              selectText: "SELECT IMAGE",
              changeText: "CHANGE IMAGE",
            ),
          ],
        ),
      ),
    );
  }
}
2
likes
150
points
63
downloads

Publisher

verified publishersalehwaleed.com

Weekly Downloads

A package to help you select, view, and edit an image with an easy workflow.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, image_picker, universal_html, universal_image_picker_web

More

Packages that depend on awesome_image_selector