in_app_scanner

Last updated:

0 purchases

in_app_scanner Image
in_app_scanner Images
Add to Cart

Description:

in app scanner

in_app_scanner #
A Flutter widget for barcode scanning and image capturing using a single camera.
Features #

Capture images using the device's camera.
Scan barcodes from captured images.
Display the captured barcode result.

Getting started #
Prerequisites #

Flutter SDK installed on your machine.
Device with a camera (physical device recommended for testing).

Installation #
Add the following dependencies to your pubspec.yaml file:
dependencies:
flutter:
sdk: flutter
in_app_scanner: ^1.0.0 #use latest version
copied to clipboard
Run flutter pub get to install the dependencies.
Usage #
Create a new widget by extending InAppScannerBuilder:
import 'package:flutter/material.dart';
import 'package:in_app_scanner/in_app_scanner.dart';

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

class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Flutter Demo',
home: _Page(),
);
}
}

class _Page extends StatelessWidget {
const _Page();

@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (_) {
return const _Scanner();
},
),
);
},
child: const Text("Scan"),
),
),
);
}
}

class _Scanner extends StatelessWidget {
const _Scanner();

@override
Widget build(BuildContext context) {
return Scaffold(
body: InAppScannerBuilder(
controller: InAppScannerController(),
autoInitMode: true,
autoDisposeMode: true,
builder: (context, controller) {
return ListenableBuilder(
listenable: controller,
builder: (context, child) {
if (controller.isCameraInitialized) {
return Column(
children: [
Expanded(
child: InAppScannerView(
controller: controller,
),
),
],
);
} else {
return const Center(
child: CircularProgressIndicator(),
);
}
},
);
},
),
);
}
}
copied to clipboard
The InAppScannerBuilder widget provides the functionality to capture and scan barcodes and
the InAppScannerView widget provides the camera preview
Additional information #
For more information on how to contribute to the package, file issues, or seek support, please visit
the GitHub repository.
Contributions are welcome! Feel free to submit pull requests or file issues.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.