ajilo297 / Flutter-Dotted-Border

A Flutter package to easily add dashed borders around widgets
https://pub.dev/packages/dotted_border
MIT License
297 stars 62 forks source link

Whats app story like featue #10

Closed harshkumarkhatri closed 4 years ago

harshkumarkhatri commented 4 years ago

Hey. I have used this in one of my projects where I needed dashed border. Now in my other project, I was thinking to use it to show the count of the stories which the user has uploaded, something similar to the WhatsApp story feature. Is there a way that dashes that are displayed automatically render on the basis of story number?

ajilo297 commented 4 years ago

Are you sure you are not thinking of a LinearProgressIndicator which would be more apt in this case?

harshkumarkhatri commented 4 years ago

You are assuming it to be a different use case. The use case which I wanted to implement is the one which I have shown in the image attached. As the user will upload a story, the gaps and the edges for the dotted border should change automatically based on the count of the number of images that are uploaded. Screenshot from 2020-08-26 14-42-54 This image is from WhatsApp stories. I am thinking of implementing something similar. Although I found a solution to this which is not very efficient due to the following reasons. 1) It is hard to calculate the edges which are to be made as gaps are also to be changed dynamically based on the number of the images uploaded. 2) If a user has uploaded many images then the calculation becomes complex and the app freezes. The solution which I found:- https://github.com/feMoraes0/whatsapp-redesign-ui/blob/master/lib/components/status_bar.dart He has used a variable quantStatus o identify the number of stories but it is not an efficient way.

ajilo297 commented 4 years ago

This one can be used to do this.

ajilo297 commented 4 years ago

It's not worth the hassle to do this with Dotted Border.

harshkumarkhatri commented 4 years ago

I hope this helps.