fix group image for three people group
This commit is contained in:
+21
-15
@@ -45,10 +45,13 @@ class GroupImage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
child: Flex(
|
child: Flex(
|
||||||
direction: Axis.vertical,
|
direction: Axis.vertical,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
|
fit: FlexFit.tight,
|
||||||
child: Flex(
|
child: Flex(
|
||||||
direction: Axis.horizontal,
|
direction: Axis.horizontal,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: images
|
children: images
|
||||||
.take(2)
|
.take(2)
|
||||||
.map((url) => Flexible(
|
.map((url) => Flexible(
|
||||||
@@ -61,21 +64,24 @@ class GroupImage extends StatelessWidget {
|
|||||||
.toList(),
|
.toList(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Flexible(
|
if (images.length > 2)
|
||||||
child: Flex(
|
Flexible(
|
||||||
direction: Axis.horizontal,
|
fit: FlexFit.tight,
|
||||||
children: images
|
child: Flex(
|
||||||
.skip(2)
|
direction: Axis.horizontal,
|
||||||
.map((url) => Flexible(
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
fit: FlexFit.tight,
|
children: images
|
||||||
child: CachedNetworkImage(
|
.skip(2)
|
||||||
imageUrl: url,
|
.map((url) => Flexible(
|
||||||
fit: BoxFit.cover,
|
fit: FlexFit.tight,
|
||||||
),
|
child: CachedNetworkImage(
|
||||||
))
|
imageUrl: url,
|
||||||
.toList(),
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
)
|
))
|
||||||
|
.toList(),
|
||||||
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user