no_card_reader_view.dart 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import 'package:date_format/date_format.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:get/get.dart';
  4. import '../index.dart';
  5. class NoCardReaderView extends GetView<CardReaderController> {
  6. const NoCardReaderView({super.key});
  7. @override
  8. Widget build(BuildContext context) {
  9. return Container(
  10. child: Column(
  11. mainAxisAlignment: MainAxisAlignment.center,
  12. children: [
  13. const Icon(
  14. Icons.warning_amber_rounded,
  15. size: 80,
  16. color: Colors.red,
  17. ),
  18. const SizedBox(height: 20),
  19. const Text(
  20. '未连接读卡器',
  21. style: TextStyle(
  22. fontSize: 20,
  23. fontWeight: FontWeight.bold,
  24. ),
  25. ),
  26. const SizedBox(height: 20),
  27. const Text(
  28. '请连接读卡器后重试',
  29. textAlign: TextAlign.center,
  30. ),
  31. const SizedBox(height: 20),
  32. ElevatedButton(
  33. onPressed: () {
  34. controller.debugConnectCardReader();
  35. },
  36. child: const Text('重试'),
  37. ),
  38. ],
  39. ),
  40. );
  41. }
  42. }