dynamsoft_capture_vision_flutter 3.4.1200
dynamsoft_capture_vision_flutter: ^3.4.1200 copied to clipboard
The Dynamsoft Capture Vision Flutter SDK provides a wrapper for building barcode scanning, document scanning and MRZ scanning applications with Flutter SDK.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'scan_page.dart';
void main() {
runApp(const MyApp());
}
final RouteObserver<PageRoute> routeObserver = RouteObserver<PageRoute>();
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Scan Document',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.orange),
),
navigatorObservers: [routeObserver],
home: const MyHomePage(title: 'Scan Document'),
);
}
}
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: Center(
child: TextButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const ScannerPage()),
);
},
style: TextButton.styleFrom(
backgroundColor: Colors.orange,
foregroundColor: Colors.white,
),
child: const Text('Open Document Scanner'),
),
),
);
}
}