import 'dart:async';

import 'package:ef/ef.dart';
import 'package:flutter/material.dart';
import 'package:vbvs_app/common/util/FitTool.dart';

class EmptyMessageWidget extends StatelessWidget {
  final String imagePath;
  final double width;
  final double height;
  var empty = "".obs;

  EmptyMessageWidget({
    Key? key,
    this.imagePath = 'assets/images/new_empty.png', // 默认图片路径
    double? width, // 默认宽度
    double? height, // 默认高度
  })  : width = 164.rpx, // 初始化宽度
        height = 230.rpx, // 初始化高度变为原来的三分之二
        super(key: key);

  @override
  Widget build(BuildContext context) {
    Timer(Duration(milliseconds: 5000), () {
      empty.value = "assets/images/new_empty.png";
    });
    return Center(
      child: Image.asset(
        imagePath,
        width: width,
        height: height,
        color: Colors.white,
      ),

    );
  }
}
