nova_avx 1.0.2
nova_avx: ^1.0.2 copied to clipboard
A Flutter package for QR code scanning and product authentication with image quality analysis.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:nova_avx/nova_avx.dart';
import 'config.dart';
void main() {
// Configure the API before running the app
// The actual API URL is stored in config.dart
NovaAvxConfig.configureApi(
baseUrl: ApiConfig.getApiBaseUrl(),
timeoutSeconds: ApiConfig.getApiTimeout(),
);
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
backgroundColor: const Color(0xFF2196F3),
foregroundColor: Colors.white,
title: const Text('Nova AVX Example'),
centerTitle: true,
),
backgroundColor: const Color(0xFFF3F8FF),
body: Builder(
builder: (context) => Center(
child: ElevatedButton.icon(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => NovaAvx.startScanning(),
),
);
},
icon: const Icon(Icons.qr_code_scanner),
label: const Text('Start QR Scanning'),
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF2196F3),
foregroundColor: Colors.white,
padding: const EdgeInsets.symmetric(
horizontal: 32,
vertical: 16,
),
textStyle: const TextStyle(fontSize: 18),
),
),
),
),
),
);
}
}