import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:lszlgl/base/base_lifecycle_state.dart'; import 'package:lszlgl/drfit/model_factory.dart'; import 'package:lszlgl/main.dart'; import 'package:lszlgl/service/print_service.dart'; import 'package:lszlgl/widget/loading_widget.dart'; import 'package:lszlgl/widget/page_widget.dart'; import 'package:signature/signature.dart'; import 'package:lszlgl/widget/button.dart'; import '../../drfit/database.dart'; import '../../plugin/bluetooth_plugin.dart'; import '../home/home_page.dart'; class ConnectPrintPageArgs { int count; ConnectPrintPageArgs({this.count = 1}); @override String toString() { return {'count': count}.toString(); } } /// 电子签名 class ConnectPrintPage extends StatefulWidget { final ConnectPrintPageArgs args; const ConnectPrintPage({ super.key, required this.args, }); @override State createState() => _ConnectPrintPageState(); } class _ConnectPrintPageState extends BaseLifecycleState { @override Widget build(BuildContext context) { return myScaffold( child: Column( children: [ myAppBar(title: '连接打印机'), const SizedBox(height: 18), // ...List.generate( // serviceList.length, // (index) => buildServiceItem(serviceList[index]), // ).toList(), ], ), ); } // Widget buildServiceItem(ServiceModel service) { // return GestureDetector( // onTap: service.onTap, // child: Container( // margin: const EdgeInsets.only(left: 12, right: 12, bottom: 22), // padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 40), // clipBehavior: Clip.hardEdge, // decoration: BoxDecoration( // borderRadius: const BorderRadius.all(Radius.circular(12)), // boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.1), offset: const Offset(0, 5), blurRadius: 4)], // image: const DecorationImage(image: AssetImage(imgHomeListBg), fit: BoxFit.fill), // ), // child: Row( // children: [ // Image.asset(service.icon, height: 64), // const SizedBox(width: 12), // Expanded( // child: Column( // mainAxisSize: MainAxisSize.min, // children: [ // Text( // "${service.name}${scanDeviceState == DeviceState.scanStart ? "中..." : ""}", // textAlign: TextAlign.center, // style: const TextStyle(color: Color(0xFF333333), fontSize: 20, fontWeight: FontWeight.w500), // ), // ], // ), // ), // ], // ), // ), // ); // } }