plugin_flutter_elgin 1.3.1
plugin_flutter_elgin: ^1.3.1 copied to clipboard
Plugin to use Android Elgin devices functionalities like printer. Other functionalities will be added
import 'package:flutter/material.dart';
import 'package:plugin_flutter_elgin_example/printer.dart';
import 'package:plugin_flutter_elgin_example/tef.dart';
void main() {
runApp(const MyApp());
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Center(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(0, 0, 0, 50),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
ElevatedButton(
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(builder: (BuildContext context) {
return const PrinterPage();
}));
},
child: const Text('Impressora')),
ElevatedButton(
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(builder: (BuildContext context) {
return const TefPage();
}));
},
child: const Text('Tef')),
],
),
),
],
));
}
}
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(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: const HomePage(),
));
}
}