import 'package:ef/ef.dart';
import 'package:flutter/material.dart';
import 'package:vbvs_app/controller/repair/repair_controller.dart';

import '../../controller/mh_controller/apply_repair_controller.dart';

class ImgPreviewDefaultWidget extends GetView {
  ApplyRepairController applyRepairController;

  ImgPreviewDefaultWidget({required this.applyRepairController}) {}
  RepairController repairController = Get.find();
  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: () async {
        await applyRepairController.uploadImg();
      },
      child: Container(
        width: MediaQuery.sizeOf(context).width * 0.25,
        height: MediaQuery.sizeOf(context).height * 0.15,
        constraints: BoxConstraints(
          minHeight: 152,
        ),
        decoration: BoxDecoration(
          color: Colors.white,
        ),
        child: Column(
          mainAxisSize: MainAxisSize.max,
          children: [
            Expanded(
              child: Container(
                width: MediaQuery.sizeOf(context).width,
                height: MediaQuery.sizeOf(context).height * 0.116,
                constraints: BoxConstraints(
                  minHeight: 152,
                ),
                decoration: BoxDecoration(
                  color: Color(0xFFF3F5F6),
                  borderRadius: BorderRadius.circular(16),
                ),
                child: Align(
                  alignment: AlignmentDirectional(0, 0),
                  child: Container(
                    width: 35,
                    height: 35,
                    decoration: BoxDecoration(
                      image: DecorationImage(
                        fit: BoxFit.cover,
                        image: Image.asset(
                          'assets/images/camera.png',
                        ).image,
                      ),
                    ),
                  ),
                ),
              ),
            ),
            Align(
              alignment: AlignmentDirectional(0, 0),
              child: Padding(
                padding: EdgeInsetsDirectional.fromSTEB(0, 8, 0, 13),
                child: Text(
                  ' ',
                  style: TextStyle(
                    fontFamily: 'Readex Pro',
                    color: Color(0xFF9EA4B7),
                    fontSize: 11,
                    letterSpacing: 0,
                  ),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
