import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../index.dart';

class BluetoothCardReaderView extends GetView<BluetoothCardReaderController> {
  const BluetoothCardReaderView({super.key});
  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        const Image(
          image: AssetImage('assets/images/card_reader.png'),
          width: 100,
        ),
        const SizedBox(height: 20),
        const Text(
          '已连接读卡器',
          style: TextStyle(
            fontSize: 26,
            fontWeight: FontWeight.bold,
          ),
        ),
        const SizedBox(height: 20),
        const Text(
          '请将身份证放置在读卡器上',
          style: TextStyle(
            fontSize: 18,
          ),
          textAlign: TextAlign.center,
        ),
        const SizedBox(height: 20),
        ElevatedButton(
          onPressed: () {
            Get.back();
            // FIXME 模拟读取到数据
            // controller.onReadInfo("mockData");
          },
          child: const Text(
            '取消',
            style: TextStyle(fontSize: 20),
          ),
        ),
      ],
    );
  }
}
