connect_print_page.dart 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/services.dart';
  3. import 'package:lszlgl/base/base_lifecycle_state.dart';
  4. import 'package:lszlgl/drfit/model_factory.dart';
  5. import 'package:lszlgl/main.dart';
  6. import 'package:lszlgl/service/print_service.dart';
  7. import 'package:lszlgl/widget/loading_widget.dart';
  8. import 'package:lszlgl/widget/page_widget.dart';
  9. import 'package:signature/signature.dart';
  10. import 'package:lszlgl/widget/button.dart';
  11. import '../../drfit/database.dart';
  12. import '../../plugin/bluetooth_plugin.dart';
  13. import '../home/home_page.dart';
  14. class ConnectPrintPageArgs {
  15. int count;
  16. ConnectPrintPageArgs({this.count = 1});
  17. @override
  18. String toString() {
  19. return {'count': count}.toString();
  20. }
  21. }
  22. /// 电子签名
  23. class ConnectPrintPage extends StatefulWidget {
  24. final ConnectPrintPageArgs args;
  25. const ConnectPrintPage({
  26. super.key,
  27. required this.args,
  28. });
  29. @override
  30. State<ConnectPrintPage> createState() => _ConnectPrintPageState();
  31. }
  32. class _ConnectPrintPageState extends BaseLifecycleState<ConnectPrintPage> {
  33. @override
  34. Widget build(BuildContext context) {
  35. return myScaffold(
  36. child: Column(
  37. children: [
  38. myAppBar(title: '连接打印机'),
  39. const SizedBox(height: 18),
  40. // ...List.generate(
  41. // serviceList.length,
  42. // (index) => buildServiceItem(serviceList[index]),
  43. // ).toList(),
  44. ],
  45. ),
  46. );
  47. }
  48. // Widget buildServiceItem(ServiceModel service) {
  49. // return GestureDetector(
  50. // onTap: service.onTap,
  51. // child: Container(
  52. // margin: const EdgeInsets.only(left: 12, right: 12, bottom: 22),
  53. // padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 40),
  54. // clipBehavior: Clip.hardEdge,
  55. // decoration: BoxDecoration(
  56. // borderRadius: const BorderRadius.all(Radius.circular(12)),
  57. // boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.1), offset: const Offset(0, 5), blurRadius: 4)],
  58. // image: const DecorationImage(image: AssetImage(imgHomeListBg), fit: BoxFit.fill),
  59. // ),
  60. // child: Row(
  61. // children: [
  62. // Image.asset(service.icon, height: 64),
  63. // const SizedBox(width: 12),
  64. // Expanded(
  65. // child: Column(
  66. // mainAxisSize: MainAxisSize.min,
  67. // children: [
  68. // Text(
  69. // "${service.name}${scanDeviceState == DeviceState.scanStart ? "中..." : ""}",
  70. // textAlign: TextAlign.center,
  71. // style: const TextStyle(color: Color(0xFF333333), fontSize: 20, fontWeight: FontWeight.w500),
  72. // ),
  73. // ],
  74. // ),
  75. // ),
  76. // ],
  77. // ),
  78. // ),
  79. // );
  80. // }
  81. }