import 'package:ef/ef.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';

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

  @override
  State<NullDataWidget> createState() => _TestWidgetState();
}

class _TestWidgetState extends State<NullDataWidget> {
  final scaffoldKey = GlobalKey<ScaffoldState>();

  @override
  Widget build(BuildContext context) {
    ThemeController themeController = Get.find();
    return GestureDetector(
      child: Scaffold(
        backgroundColor: Colors.transparent,
        key: scaffoldKey,
        body: SafeArea(
          top: true,
          child: Container(
            decoration: BoxDecoration(
              color: Colors.transparent,
            ),
            width: MediaQuery.sizeOf(context).width,
            height: MediaQuery.sizeOf(context).height * 1,
            child: Column(
              mainAxisSize: MainAxisSize.max,
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Padding(
                  padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0),
                  child: Container(
                    width: 56.rpx,
                    height: 69.rpx,
                    // width: double.infinity,
                    decoration: BoxDecoration(),
                    child: SvgPicture.asset(
                      'assets/img/icon/nulldata.svg',
                      fit: BoxFit.cover,
                      color: themeController.currentColor.sc4.withOpacity(0.5),
                    ),
                  ),
                ),
                Container(
                  width: MediaQuery.sizeOf(context).width,
                  height: MediaQuery.sizeOf(context).height * 0.04,
                  constraints: BoxConstraints(
                    minHeight: 40,
                  ),
                  child: Align(
                    alignment: AlignmentDirectional(0, 0),
                    child: Text(
                      '暂无数据'.tr,
                      style: TextStyle(
                        fontFamily: "PingFangSC",
                        letterSpacing: 0.0,
                        fontSize: 26.rpx,
                        color: themeController.currentColor.sc4,
                      ),
                    ),
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
