card_reader_view.dart 1.2 KB

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