emvnfc 0.0.1
emvnfc: ^0.0.1 copied to clipboard
A Flutter plugin for reading EMV card data via NFC, supporting card scheme detection and transaction details.
example/lib/main.dart
import 'package:emvnfc_example/utils/app_theme.dart';
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'amount_entry_screen.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
// Lock to portrait orientation
await SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
// Set system UI overlay style
SystemChrome.setSystemUIOverlayStyle(
const SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.light,
systemNavigationBarColor: AppTheme.primaryDark,
systemNavigationBarIconBrightness: Brightness.light,
),
);
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(
title: 'NFC Card Reader',
debugShowCheckedModeBanner: false,
theme: AppTheme.theme,
home: const AmountEntryScreen(),
builder: (context, child) {
return MediaQuery(
data: MediaQuery.of(context).copyWith(
textScaler: TextScaler.noScaling,
),
child: child!,
);
},
);
}
}