marvel_printer 0.0.1 copy "marvel_printer: ^0.0.1" to clipboard
marvel_printer: ^0.0.1 copied to clipboard

Flutter plugin for printing text and images to Marvel Bluetooth thermal printers on Android.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:marvel_printer/marvel_printer.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) => MaterialApp(home: const Home());
}

class Home extends StatefulWidget {
  const Home({super.key});
  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {

  Future<void> _printSampleData() async {
   await MarvelPrinter.printSample();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Marvel Printer Example')),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            ElevatedButton(
              onPressed: () async {
                await MarvelPrinter.autoConnect();
              },
              child: const Text('Auto connect'),
            ),
            ElevatedButton(
              onPressed: _printSampleData,
              child: const Text('Print sale (Android)'),
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
0
points
6
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter plugin for printing text and images to Marvel Bluetooth thermal printers on Android.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on marvel_printer

Packages that implement marvel_printer