cherry_scan 0.0.1 cherry_scan: ^0.0.1 copied to clipboard
A new Flutter project.
example/lib/main.dart
import 'package:cherry_scan/cherry_scan.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
localizationsDelegates: const [
ScanViewLocalizations.delegate
],
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: const Home(),
),
);
}
}
class Home extends StatelessWidget {
const Home({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: TextButton(
child: const Text('scan view'),
onPressed: () {
Navigator.push(context, MaterialPageRoute(
builder: (context) => const ScanViewPage()));
},
),
),
);
}
}