Taking many pictures and photos list in the same page

Overview

Custom Camera Preview

A component has developed with Flutter

Purpose

Instead of taking photos of a product and taking them one by one when users need to upload anywhere, they can use custom camera preview to take their photos on the same screen, see them as a list and remove them from the list if they want.

Instruction

The Camera Preview as the photo

Users can take photos via camera button and save in photo list as below

If the user would like to delete a photo from the list, the user should use 'delete' button over the image. We deleted dog photo (third photo) from the list (You can compare previous screenshot with photo below)

Camera Implementation

https://pub.dev/packages/camera

You need import 'package:camera/camera.dart' in the camera preview page. Also, you should initialize your camera controller in initState

@override
  void initState() {
    super.initState();
    availableCameras().then((availableCameras) {
      cameras = availableCameras;
      if (cameras.isNotEmpty) {
        setState(() {
          selectedCameraIdx = 0;
        });
        _initCameraController(cameras[selectedCameraIdx]).then((void v) {});
      } else {
        print("No camera available");
      }
    }).catchError((err) {
      print('Error: $err.code\nError Message: $err.message');
    });
  }

Usage

If the camera controller is null or uninitialized, return a loading indicator. If not, return custom camera preview with parameters that you must given a empty list with the type of File and a camera controller

if (controller == null || !controller!.value.isInitialized) {
   return const Center(
     child: CircularProgressIndicator(
       color: Colors.red,
     ));
   }
   return CustomCameraPreview(
     imageFiles: _homeController.imageFiles,
     cameraController: controller!,
);

Demo

customCameraPreview.mp4
You might also like...

An isolated worker for Flutter (Isolate) and Web (Web Worker). Behaves almost the same as the compute function, except it is not a one-off worker.

A singleton isolated worker for all platforms. On most platforms, it uses Flutter's Isolate, except on the web, since Isolate is not available, it use

Nov 11, 2022

Build a calculator app in iOS and Android with the same code by using flutter.

flutter_calculator Preview Structure Input Widgets input widgets is all extends StatefulWidget, because they need to response the onTap gesture. Numbe

Nov 24, 2022

Mobile, desktop and website Apps with the same code

Mobile, desktop and website Apps with the same code

Mobile, desktop and website Apps with the same code This project shows how the source code can be architectured to run on multiple devices. As of now,

Jan 1, 2023

Todo app - contains same UI and different state management techniques (without using StatefulWidget)

Todo app - contains same UI and different state management techniques (without using StatefulWidget)

This repo contains same UI and different state management techniques (without using StatefulWidget) to compare and prefer based on your coding style.

May 19, 2022

[Flutter package] An easy and quick way to check if the local app is updated with the same version in their respective stores (Play Store / Apple Store ).

Retrieve version and url for local app update against store app Android and iOS Features Using as reference packages like in_app_update , version_chec

Nov 9, 2022

Album Image is based in photo_manager package and has the same concept as image_picker but with a more attractive interface to choose an image or video from the device gallery, whether it is Android or iOS

Album Image is based in photo_manager package and has the same concept as image_picker but with a more attractive interface to choose an image or video from the device gallery, whether it is Android or iOS

Album Image is based in photo_manager package and has the same concept as image_picker but with a more attractive interface to choose an image or vide

Oct 13, 2022

OnBoarding Animation provides page like animation to the onBoarding screens with the page indicator

OnBoarding Animation OnBoarding Animation provides page like animation to the onBoarding screens with the page indicator. Screenshots and Screen recor

Oct 12, 2022

Login-page-ui - An animated login page, designed with dart

Login-page-ui - An animated login page, designed with dart

Beautiful Login Page UI Design and Animation ScreenShots This is one of my best

Nov 22, 2022
Owner
Okan
Okan
Flutter package to create list of radio button, by providing a list of objects it can be a String list or list of Map.

Custom Radio Group List Flutter package to create list of radio button, by providing a list of objects it can be a String list or list of Map. Feature

Ashok Kumar Verma 0 Nov 30, 2021
I created a welcome page, login page and signup page using Flutter

welcome_page UI design for welcome page, signUp page & Login page by Joy Obor Getting Started This project is a starting point for a Flutter applicati

spyder 0 Dec 29, 2021
Automatically generate profile picture with random first name and background color. But you can still provide pictures if you have them. As the default color, based on the name of the first letter. :fire: :fire: :fire:

FLUTTER PROFILE PICTURE Automatically generate profile picture with random first name and background color. But you can still provide pictures if you

Aditya Dharmawan Saputra 10 Dec 20, 2022
DiceBear API wrapper. DiceBear is an avatar library for designers and developers. Generate random avatar profile pictures!

dice_bear Flutter Package DiceBear API wrapper. DiceBear is an avatar library for designers and developers. Generate random avatar profile pictures! C

Zaif Senpai 8 Oct 31, 2022
🚀 A simple & beautiful mobile tool for pictures uploading built by flutter

Flutter-PicGo 图片上传+管理新体验 应用概述 Flutter-PicGo: 一个用于快速上传图片并获取图片URL链接的手机版工具 Flutter-PicGo 本体支持如下图床: GitHub [v1.0+] SM.MS [v1.1+] Gitee [v1.2+] 七牛云 [v1.3+]

PicGo 320 Jan 5, 2023
A sample app of using the image_picker + path_provider and permission_handler package to request permission and store photos on mobile

image_picker_example A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you sta

iang12 4 Apr 19, 2022
Gallery with thousands of photos, no time to organize, no way to search and not enough space

Artificial Intelligence-Powered Gallery Overview Gallery with thousands of photos, no time to organize, no way to search and not enough space; these a

Abd al-Rahman al-Ktefane 4 Jul 25, 2022
MiXplash - Home of Photos and Wallpapers

MiXplash MiXplash : Beautiful Images and Wallpapers ?? Table of Contents ?? Table of Contents ??️ Screenshots ?? About ?? Getting Started Prerequisite

Yasir Shariff 15 Oct 19, 2022
Rooftop - A photos and videos application which is able to show curated content from Pexel database on the press of a button

rooftop RoofTop is a photos and videos application which is able to show curated

null 2 Feb 7, 2022
Receive sharing photos, videos, text, URLs, or any other file types from another app.

Receive Sharing Files To Flutter App Through Other Apps Receive sharing photos, videos, text, URLs, or any other file types from another app. Visit :

Jaimil Patel 21 Dec 25, 2022