card_reader_view.dart 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import 'package:flutter/material.dart';
  2. import 'package:get/get.dart';
  3. import '../index.dart';
  4. class BluetoothCardReaderView extends GetView<BluetoothCardReaderController> {
  5. const BluetoothCardReaderView({super.key});
  6. @override
  7. Widget build(BuildContext context) {
  8. return Column(
  9. mainAxisAlignment: MainAxisAlignment.center,
  10. children: [
  11. const Image(
  12. image: AssetImage('assets/images/card_reader.png'),
  13. width: 100,
  14. ),
  15. const SizedBox(height: 20),
  16. const Text(
  17. '已连接读卡器',
  18. style: TextStyle(
  19. fontSize: 26,
  20. fontWeight: FontWeight.bold,
  21. ),
  22. ),
  23. const SizedBox(height: 20),
  24. const Text(
  25. '请将身份证放置在读卡器上',
  26. style: TextStyle(
  27. fontSize: 18,
  28. ),
  29. textAlign: TextAlign.center,
  30. ),
  31. const SizedBox(height: 20),
  32. ElevatedButton(
  33. onPressed: () {
  34. Get.back();
  35. // FIXME 模拟读取到数据
  36. // controller.onReadInfo("mockData");
  37. },
  38. child: const Text(
  39. '取消',
  40. style: TextStyle(fontSize: 20),
  41. ),
  42. ),
  43. ],
  44. );
  45. }
  46. }