// assets_util.dart
import 'package:flutter/widgets.dart';
import 'package:flutter/foundation.dart';

/**
 * AssetsUtil
 * @description: 资源工具类
 * @author guangfei.zhao
 */
class AssetsUtil {

  static const String packageName = 'ai_chat_assistant';

  static AssetImage getImage(String imageName) {
    return AssetImage(
      'assets/images/$imageName',
      package: packageName,
    );
  }

  static Widget getImageWidget(String imageName, {BoxFit? fit, double? width, double? height}) {
    return Image.asset(
      'assets/images/$imageName',
      package: packageName,
      fit: fit,
      width: width,
      height: height,
    );
  }

}