import 'package:ef/base/widget/flutterflow/FlutterFlowTheme.dart';
import 'package:ef/ef.dart';
import 'package:flutter/material.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/color/appConstants.dart';
import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/component/tool/CustomCard.dart';
import 'package:vbvs_app/routers/routers.dart';

class RepairHistoryInfoWidget extends StatefulWidget {
  const RepairHistoryInfoWidget({super.key});

  @override
  State<RepairHistoryInfoWidget> createState() =>
      _RepairHistoryInfoWidgetState();
}

class _RepairHistoryInfoWidgetState extends State<RepairHistoryInfoWidget> {
  @override
  void initState() {
    super.initState();
  }

  @override
  void dispose() {
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return CustomCard(
      borderRadius: AppConstants().normal_container_radius,
      onTap: () {
        //跳转详情
      },
      colors: [
        themeController.currentColor.sc5,
      ],
      child: Container(
        width: double.infinity,
        decoration: BoxDecoration(
          color: themeController.currentColor.sc5,
          borderRadius:
              BorderRadius.circular(AppConstants().normal_container_radius),
        ),
        child: Padding(
          padding:
              EdgeInsetsDirectional.fromSTEB(30.rpx, 36.rpx, 0.rpx, 36.rpx),
          child: Container(
            width: double.infinity,
            decoration: BoxDecoration(),
            child: Column(
              mainAxisSize: MainAxisSize.max,
              children: [
                Container(
                  width: double.infinity,
                  decoration: BoxDecoration(),
                  child: Row(
                    mainAxisSize: MainAxisSize.max,
                    children: [
                      Container(
                        width: MediaQuery.sizeOf(context).width * 0.14,
                        constraints: BoxConstraints(
                          maxWidth: 130.rpx,
                        ),
                        decoration: BoxDecoration(),
                        child: Text(
                          '设备类型'.tr,
                          maxLines: 2,
                          overflow: TextOverflow.ellipsis,
                          style: TextStyle(
                            fontSize: 26.rpx,
                            letterSpacing: 0.0,
                            fontWeight: FlutterFlowTheme.of(context)
                                .bodyMedium
                                .fontWeight,
                            fontStyle: FlutterFlowTheme.of(context)
                                .bodyMedium
                                .fontStyle,
                            color: themeController.currentColor.sc4,
                          ),
                        ),
                      ),
                      Text(
                        '智能床',
                        maxLines: 2,
                        overflow: TextOverflow.ellipsis,
                        style: TextStyle(
                          fontSize: 26.rpx,
                          letterSpacing: 0.0,
                          fontWeight: FlutterFlowTheme.of(context)
                              .bodyMedium
                              .fontWeight,
                          fontStyle:
                              FlutterFlowTheme.of(context).bodyMedium.fontStyle,
                          color: themeController.currentColor.sc3,
                        ),
                      ),
                    ].divide(SizedBox(width: 33.rpx)),
                  ),
                ),
                Container(
                  width: double.infinity,
                  decoration: BoxDecoration(),
                  child: Row(
                    mainAxisSize: MainAxisSize.max,
                    children: [
                      Container(
                        width: MediaQuery.sizeOf(context).width * 0.14,
                        constraints: BoxConstraints(
                          maxWidth: 130.rpx,
                        ),
                        decoration: BoxDecoration(),
                        child: Text(
                          '设备ID'.tr,
                          maxLines: 2,
                          overflow: TextOverflow.ellipsis,
                          style: TextStyle(
                            fontSize: 26.rpx,
                            letterSpacing: 0.0,
                            fontWeight: FlutterFlowTheme.of(context)
                                .bodyMedium
                                .fontWeight,
                            fontStyle: FlutterFlowTheme.of(context)
                                .bodyMedium
                                .fontStyle,
                            color: themeController.currentColor.sc4,
                          ),
                        ),
                      ),
                      Text(
                        '15561651',
                        maxLines: 2,
                        overflow: TextOverflow.ellipsis,
                        style: TextStyle(
                          fontSize: 26.rpx,
                          letterSpacing: 0.0,
                          fontWeight: FlutterFlowTheme.of(context)
                              .bodyMedium
                              .fontWeight,
                          fontStyle:
                              FlutterFlowTheme.of(context).bodyMedium.fontStyle,
                          color: themeController.currentColor.sc3,
                        ),
                      ),
                    ].divide(SizedBox(width: 33.rpx)),
                  ),
                ),
                Container(
                  width: double.infinity,
                  decoration: BoxDecoration(),
                  child: Row(
                    mainAxisSize: MainAxisSize.max,
                    children: [
                      Container(
                        width: MediaQuery.sizeOf(context).width * 0.14,
                        constraints: BoxConstraints(
                          maxWidth: 130.rpx,
                        ),
                        decoration: BoxDecoration(),
                        child: Text(
                          '联系人'.tr,
                          maxLines: 2,
                          overflow: TextOverflow.ellipsis,
                          style: TextStyle(
                            fontSize: 26.rpx,
                            letterSpacing: 0.0,
                            fontWeight: FlutterFlowTheme.of(context)
                                .bodyMedium
                                .fontWeight,
                            fontStyle: FlutterFlowTheme.of(context)
                                .bodyMedium
                                .fontStyle,
                            color: themeController.currentColor.sc4,
                          ),
                        ),
                      ),
                      Text(
                        '王明',
                        maxLines: 2,
                        overflow: TextOverflow.ellipsis,
                        style: TextStyle(
                          fontSize: 26.rpx,
                          letterSpacing: 0.0,
                          fontWeight: FlutterFlowTheme.of(context)
                              .bodyMedium
                              .fontWeight,
                          fontStyle:
                              FlutterFlowTheme.of(context).bodyMedium.fontStyle,
                          color: themeController.currentColor.sc3,
                        ),
                      ),
                    ].divide(SizedBox(width: 33.rpx)),
                  ),
                ),
                Container(
                  width: double.infinity,
                  decoration: BoxDecoration(),
                  child: Row(
                    mainAxisSize: MainAxisSize.max,
                    children: [
                      Container(
                        width: MediaQuery.sizeOf(context).width * 0.14,
                        constraints: BoxConstraints(
                          maxWidth: 130.rpx,
                        ),
                        decoration: BoxDecoration(),
                        child: Text(
                          '发生时间'.tr,
                          maxLines: 2,
                          overflow: TextOverflow.ellipsis,
                          style: TextStyle(
                            fontSize: 26.rpx,
                            letterSpacing: 0.0,
                            fontWeight: FlutterFlowTheme.of(context)
                                .bodyMedium
                                .fontWeight,
                            fontStyle: FlutterFlowTheme.of(context)
                                .bodyMedium
                                .fontStyle,
                            color: themeController.currentColor.sc4,
                          ),
                        ),
                      ),
                      Text(
                        '2022-08-01 15:05',
                        maxLines: 2,
                        overflow: TextOverflow.ellipsis,
                        style: TextStyle(
                          fontSize: 26.rpx,
                          letterSpacing: 0.0,
                          fontWeight: FlutterFlowTheme.of(context)
                              .bodyMedium
                              .fontWeight,
                          fontStyle:
                              FlutterFlowTheme.of(context).bodyMedium.fontStyle,
                          color: themeController.currentColor.sc3,
                        ),
                      ),
                    ].divide(SizedBox(width: 33.rpx)),
                  ),
                ),
              ].divide(SizedBox(height: 34.rpx)),
            ),
          ),
        ),
      ),
    );
  }
}
