Merge branch 'newHost' of https://git.oa00.com/1281228557/aku_new_community into newHost
# Conflicts: # lib/pages/personal/clock_in/clock_in_page.dart # lib/pages/personal/personal_page.dart # lib/ui/community/community_views/my_community_view.dartpull/1/head
Before Width: | Height: | Size: 70 B |
After Width: | Height: | Size: 998 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 7.8 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 500 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 252 KiB |
After Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 998 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 7.5 KiB |
@ -0,0 +1,46 @@
|
||||
import 'package:aku_new_community/constants/saas_api.dart';
|
||||
import 'package:aku_new_community/gen/assets.gen.dart';
|
||||
import 'package:aku_new_community/model/common/img_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
||||
class BeeAvatarWidget extends StatelessWidget {
|
||||
final List<ImgModel>? imgs;
|
||||
final List<String>? urls;
|
||||
final double? width;
|
||||
final double? height;
|
||||
final BoxFit? fit;
|
||||
|
||||
const BeeAvatarWidget(
|
||||
{Key? key,
|
||||
this.imgs,
|
||||
this.width,
|
||||
this.height,
|
||||
this.urls,
|
||||
this.fit = BoxFit.cover})
|
||||
: assert(imgs != null || urls != null),
|
||||
super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ClipOval(
|
||||
child: FadeInImage.assetNetwork(
|
||||
placeholder: Assets.images.placeholder.path,
|
||||
image: imgs == null
|
||||
? SAASAPI.image(urls!.isEmpty ? '' : urls!.first)
|
||||
: SAASAPI.image(ImgModel.first(imgs)),
|
||||
imageErrorBuilder: (context, obj, stackTrace) {
|
||||
return Image.asset(
|
||||
Assets.newIcon.avatarPlaceholder.path,
|
||||
width: width ?? 128.w,
|
||||
height: height ?? 128.w,
|
||||
fit: fit,
|
||||
);
|
||||
},
|
||||
height: height ?? 128.w,
|
||||
width: width ?? 128.w,
|
||||
fit: fit,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|