cyrax111 / avatar_stack Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
For starters i wanted to say great job on this package.
I am having one issue though. Since the avatars
property on the AvatarStack
is only able to have ImageProvider
widgets i am running into an issue when i want to make each avatar clickable in order to perform some action.
Here is an example of my code
AvatarStack(
settings: settings,
height: 60,
avatars: ride.approvedRiders!.map((e) {
return NetworkImage(getInitialsAvatarUrl(e.user?.name ?? ''));
}).toList(),
)
I want to be able to wrap the NetworkImage
in an InkWell
for example to have onTap
functionality
Is there a way around this or is it currently not supported? If not then will this be something you are willing to add in the future?
Thanks
I follow this issue: #2
And adjust my code and the image stack is set to rectangle. I try to change to circle but it not working
Awesome package!
I think it would be better if we could pass a Widget instead ImageProvider for cases where the users doesn't have a picture but you still want to display their initials.
Hi there,
I was looking for just this! I need to make the list vertical instead of horizontal. Is this possible?
Thanks in advance
`======== Exception caught by widgets library =======================================================
The following UnsupportedError was thrown building LayoutBuilder:
Unsupported operation: Infinity or NaN toInt
The relevant error-causing widget was:
WidgetStack WidgetStack:lib/feature/presentation/widgets/main/header/main_header_widget.dart:164:25
When the exception was thrown, this was the stack:
#0 double.toInt (dart:core-patch/double.dart)
#1 RestrictedPositions._calculateMaxCapacityItems (package:avatar_stack/src/positions/restricted_positions.dart:75:21)
#2 RestrictedPositions.calculate (package:avatar_stack/src/positions/restricted_positions.dart:64:48)
#3 WidgetStack.build. (package:avatar_stack/src/widget_stack.dart:35:29)
#4 _LayoutBuilderElement._layout.layoutCallback (package:flutter/src/widgets/layout_builder.dart:122:31)
#5 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2531:19)
#6 _LayoutBuilderElement._layout (package:flutter/src/widgets/layout_builder.dart:154:12)
#7 RenderObject.invokeLayoutCallback. (package:flutter/src/rendering/object.dart:1962:59)
#8 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:910:15)
#9 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:1962:14)
#10 RenderConstrainedLayoutBuilder.rebuildIfNecessary (package:flutter/src/widgets/layout_builder.dart:228:7)
#11 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:317:5)
#12 RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
#13 RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:233:12)
#14 RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
#15 RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:277:14)
#16 RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
#17 ChildLayoutHelper.layoutChild (package:flutter/src/rendering/layout_helper.dart:56:11)
#18 RenderFlex._computeSizes (package:flutter/src/rendering/flex.dart:829:43)
#19 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:931:32)
#20 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1707:7)
#21 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:879:18)
#22 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:497:19)
#23 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:883:13)
#24 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:363:5)
#25 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1145:15)
#26 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1082:9)
#27 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:996:5)
#31 _invoke (dart:ui/hooks.dart:150:10)
#32 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:270:5)
#33 _drawFrame (dart:ui/hooks.dart:114:31)
(elided 3 frames from dart:async)`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.