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

A Flutter package which will help you to overlay borders on the camera widget, highly customizable and flexible.

pub package

A Flutter package which will help you to overlay borders on the camera or scanner widget, highly customizable and flexible.

Features #

  • Highly customizable
  • Easy to use

Getting started #

  1. Add the dependency.
scanner_overlay: ^0.0.2;
  1. Import the package.
import 'package:scanner_overlay/scanner_overlay.dart';
  1. Use the widget in your code.
ScannerOverlay(
    height: 300, 
    width: 300,

    /// Additional Parameters
    borderColor: Colors.amber,
    borderRadius: 20,
    borderThickness: 5,
    )

Usage #

This full code is from the example folder. You can run the example to see.

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: const Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ScannerOverlay(height: 300, width: 300),
          ],
        ),
      ),
    );
  }
}
4
likes
160
pub points
67%
popularity
screenshot

Publisher

verified publishercooltechie.info

A Flutter package which will help you to overlay borders on the camera widget, highly customizable and flexible.

Repository (GitHub)
View/report issues

Topics

#scanner-shape #scanner-widget #scanner-overlay #scanner-borders #camera-border

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on scanner_overlay