You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.2 KiB

3 years ago
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/widget/beeImageNetwork.dart';
import 'package:flutter/material.dart';
4 years ago
class StackAvatar extends StatelessWidget {
4 years ago
final List<String?> avatars;
3 years ago
4 years ago
const StackAvatar({Key? key, required this.avatars}) : super(key: key);
3 years ago
double get offset => 35.w;
3 years ago
4 years ago
int get length => avatars.length;
3 years ago
@override
Widget build(BuildContext context) {
return Stack(
children: [
SizedBox(
width: 44.w * 2 + 26.w,
height: 44.w + 6.w,
),
...List.generate(length, (index) {
return Positioned(
left: index * offset,
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(22.w + 2.w),
border: Border.all(color: Color(0xFF999999)),
),
clipBehavior: Clip.antiAlias,
child: BeeImageNetwork(
width: 44.w,
height: 44.w,
urls: [avatars[index] ?? ''],
),
),
);
}),
],
);
}
}