import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:native_vision_example/doc_scan_page.dart'; import 'package:native_vision_example/loading_overlay.dart'; void main() { if (kReleaseMode) { debugPrint = (String? message, {int? wrapWidth}) {}; } runApp(const MyApp()); } class MyApp extends StatefulWidget { const MyApp({Key? key}) : super(key: key); @override State createState() => _MyAppState(); } class _MyAppState extends State { @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return const MaterialApp( home: HomePage(), ); } } class HomePage extends StatefulWidget { const HomePage({Key? key}) : super(key: key); @override State createState() { return HomePageState(); } } class HomePageState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text("首页"), ), body: Center( child: TextButton( style: TextButton.styleFrom(backgroundColor: Colors.blueAccent), onPressed: () { Navigator.push( context, MaterialPageRoute( builder: (context) => const LoadingOverlay(child: DocScanPage())), ); }, child: const Text( "文档实时扫描", style: TextStyle(fontSize: 24, color: Colors.yellow), ), )), ); } }