30 lines
1.0 KiB
Dart
30 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:sk_base_mobile/app_theme.dart';
|
|
import 'package:sk_base_mobile/util/media_util.dart';
|
|
import 'package:sk_base_mobile/util/screen_adaper_util.dart';
|
|
import 'package:sk_base_mobile/widgets/fade_in_cache_image.dart';
|
|
|
|
class SkAvatar extends StatelessWidget {
|
|
final String? url;
|
|
const SkAvatar({super.key, this.url});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ClipRRect(
|
|
borderRadius: BorderRadius.circular(ScreenAdaper.sp(80)),
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
color: Colors.grey[200],
|
|
border: Border.all(color: AppTheme.dividerColor),
|
|
borderRadius: BorderRadius.circular(ScreenAdaper.sp(80))),
|
|
child: FadeInCacheImage(
|
|
defaultWidget: Icon(Icons.person_2_outlined,
|
|
size: ScreenAdaper.height(60), color: AppTheme.grey),
|
|
height: ScreenAdaper.height(80),
|
|
width: ScreenAdaper.height(80),
|
|
url: MediaUtil.getMediaUrl(url)),
|
|
),
|
|
);
|
|
}
|
|
}
|