63 lines
1.6 KiB
Dart
63 lines
1.6 KiB
Dart
import 'package:drago_pos_printer/utils/esc_pos/generator.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/svg.dart';
|
|
import 'package:max_print_plus/print/bluetooth_printer_screen.dart';
|
|
|
|
enum HistoryTabData { reservation, dinein, waitinglist, pickup, delivery }
|
|
|
|
class MaxPrintBt extends StatefulWidget {
|
|
List<int> bytes;
|
|
EscGenerator generator;
|
|
Function(bool)? onSuccess;
|
|
bool? hideOption;
|
|
MaxPrintBt(
|
|
{Key? key,
|
|
required this.bytes,
|
|
required this.generator,
|
|
required this.onSuccess,
|
|
this.hideOption = true})
|
|
: super(key: key);
|
|
|
|
@override
|
|
State<MaxPrintBt> createState() => _MaxPrintBtState();
|
|
}
|
|
|
|
class _MaxPrintBtState extends State<MaxPrintBt> with TickerProviderStateMixin {
|
|
String? uid;
|
|
bool? isLogin;
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: const Color(0xFFFAFAFA),
|
|
appBar: AppBar(
|
|
leading: IconButton(
|
|
onPressed: () {
|
|
Navigator.of(context).pop();
|
|
},
|
|
icon: SvgPicture.asset(
|
|
'assets/image/ic_appbar_back.svg',
|
|
width: 30,
|
|
height: 30,
|
|
package: 'max_print_plus',
|
|
)),
|
|
backgroundColor: const Color(0xFFFAFAFA),
|
|
centerTitle: true,
|
|
title: const Text(
|
|
'Cetak',
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.bold,
|
|
// letterSpacing: 2.0,
|
|
fontSize: 16),
|
|
),
|
|
),
|
|
body: BluetoothPrinterScreen(
|
|
bytes: widget.bytes, generator: widget.generator),
|
|
);
|
|
}
|
|
}
|