-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Multiple overlapping percent strokes. #68
Comments
Hello, this is not supported right now. If you want to implement this
feature, go ahead you are welcome! Just don't forget to do it on
LinearPercentIndicator too and add a couple of samples.
Thanks
…On Thu, Jul 23, 2020, 2:44 AM Vedant Rathore ***@***.***> wrote:
Hello @diegoveloper <https://github.com/diegoveloper> , Thanks for this
amazing package. I was wondering if there is any support for multiple
percent strokes, preferably overlapping. Something like this
[image: image]
<https://user-images.githubusercontent.com/14354315/88257907-7968bc80-ccdc-11ea-90eb-c6bf54034b3f.png>
If not, then I'd like to work on this feature and send out a PR. Just want
to know your thoughts on how should we proceed in implementing this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#68>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABFL3UE6AMDXA36RXMR3ABDR47S7PANCNFSM4PFOQVPA>
.
|
@vedantrathore did you end up developing this feature? I'm currently searching for the same feature but for the LinearPercentIndicator... |
Hey @diegoveloper and @vedantrathore , is this feature supported? |
Hey @Lorenzohidalgo and @om-ha Unfortunately I did not end up working on this as the design requirements for this feature changed and this was not needed anymore. Feel free to pick this up if needed. |
Hey @vedantrathore and @diegoveloper I just tested this, it's easily achievable with a Stack widget! Enjoy: import 'package:flutter/material.dart';
import 'package:percent_indicator/percent_indicator.dart';
class MultiLevelPercentIndicatorExample extends StatelessWidget {
const MultiLevelPercentIndicatorExample({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
children: const [
SizedBox(height: 36),
_MultiLevelPercentIndicatorWidget(),
Spacer(),
],
),
);
}
}
class _MultiLevelPercentIndicatorWidget extends StatelessWidget {
const _MultiLevelPercentIndicatorWidget({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
// Background
return Container(
height: 8,
padding: const EdgeInsets.all(2),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0),
color: Colors.redAccent.shade100,
),
child: Stack(
children: [
// low-intensity color (bottom)
LinearPercentIndicator(
padding: const EdgeInsets.symmetric(horizontal: 2), // for some reason we need to re-apply padding for horizontal
percent: 0.8,
backgroundColor: Colors.transparent,
progressColor: Colors.redAccent.shade100,
),
// high-intensity color (top)
LinearPercentIndicator(
padding: const EdgeInsets.symmetric(horizontal: 2), // for some reason we need to re-apply padding for horizontal
percent: 0.4,
backgroundColor: Colors.transparent,
progressColor: Colors.redAccent.shade400,
),
],
),
);
}
} |
This Worked for me, but this only works if one has fixed amount of metrics
|
Will this be picked up? |
Hello @diegoveloper , Thanks for this amazing package. I was wondering if there is any support for multiple percent strokes, preferably overlapping. Something like this
If not, then I'd like to work on this feature and send out a PR. Just want to know your thoughts on how should we proceed in implementing this.
The text was updated successfully, but these errors were encountered: