secure_print 0.0.1
secure_print: ^0.0.1 copied to clipboard
A Flutter plugin for secure in-memory PDF printing without the option to save.
example/lib/main.dart
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:secure_print/secure_print.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: PrintScreen(),
);
}
}
class PrintScreen extends StatelessWidget {
final Uint8List pdfData = Uint8List.fromList([1, 2, 3, 4, 5, 6]);
PrintScreen({super.key}); // Load your PDF data here
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Secure Print Example'),
),
body: Center(
child: ElevatedButton(
onPressed: () {
SecurePrint.printDocument(pdfData);
},
child: const Text('Print Document'),
),
),
);
}
}