import 'package:fis_ui/index.dart';
import 'package:flutter/cupertino.dart';
import 'package:flyinsono/pages/upload/upload.dart';

/// 上传示例卡片
class UploadSampleCard extends FStatelessWidget {
  /// 上传示例卡片
  ///
  /// [type] 示例类型
  const UploadSampleCard({
    Key? key,
    required this.type,
  }) : super(key: key);

  final UploadSampleType type;

  @override
  FWidget build(BuildContext context) {
    switch (type) {
      case UploadSampleType.idCardFront:
        return FImage.asset(
          'assets/images/idcard_front.png',
          width: 190,
          height: 120,
          fit: BoxFit.fill,
        );
      case UploadSampleType.idCardBack:
        return FImage.asset(
          'assets/images/idcard_back.png',
          width: 190,
          height: 120,
          fit: BoxFit.fill,
        );
    }
  }
}
