基础库
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

image_util.dart 463 B

4 년 전
12345678910111213141516
  1. import 'package:zhiying_comm/models/base/base_setting_model.dart';
  2. class ImageUtil {
  3. // 拼接链接
  4. static String getUrl(String originUrl) {
  5. if (originUrl.startsWith('http://') || originUrl.startsWith('https://')) {
  6. return originUrl;
  7. }
  8. BaseSettingModel setting = BaseSettingModel.setting;
  9. return (setting?.fileBucketHostProtocol ?? '') +
  10. '://' +
  11. (setting?.fileBucketHost ?? '') +
  12. '/' +
  13. originUrl;
  14. }
  15. }