I am trying to create something like this in flutter:
Image 1 -
Image 2
The two main aspects are:
the filled part of the vertical container has this elipse with darker color on the top, which gives the 3d depth effect
on Image 2 there is that % indicator, moving accordingly
What I have tried is:
tried to modify different progress_indicator packages, so that to achieve the 2 things above. However, I was never able to do that 3d depth effect.
tried to implement it as 2 expanded containers, where the flex of the bottom one represents the persentage. However again I was not able to do the elipse on the top.
From my searches online, it looks like I need to use the CustomPaint class, but it look very complicated.
If you have any better suggestions, or ever code pieces that can help, I would be extremely thankful !
Related
If you have a file which include objects for example for EE like transistors, resistors etc and if you group them into one and then from the corner drag it to zoom in a bigger figure.
How can I make sure that these components are not zoom in only wiring changes?
The problem is that I have like 30 images with different sizes and I'm placing them in a table with many images side by side. However, if I keep the same scale then some images looks small compared to other. So I tried to scale them to get the same size. However, this make the components's sizes are also scaled up with different scale factors.
Here is an example of circuit using the bult-in shapes in Visio. As you can see the components'sizes got bigger when I scaled up the object. This is usually desired. However, in my specific case I want to keep the component's size same.
Here is the Visio file or I think you can also use any available components in Visio.
https://file.io/VRUCR8yVgYxs
I enabled gridlines like below.
tree.EnableGridLines = TreeViewGridLines.Both;
But the problem is the lines are barely visible like below (if you think there are no gridlines, zoom the image, and look really hard). Gtk.TreeView had GridLineWidth, but it was read-only. How can I make them more visible?
I have tried to find C# equivalent of the answer's C code and the following worked. Making the gridlines thicker worked but the problem was that in Ubuntu, the colour of the gridline is too light that it was not really visible even it it were thicker. So, I changed the colour instead.
var p = new CssProvider();
p.LoadFromData("*{border-color:darkgray;}");
tree.StyleContext.AddProvider(p,Gtk.StyleProviderPriority.Application);
You could use a CSS provider and set the grid line width to a larger value than one pixel. Again, the following code snippets are written in "C"; however, it should be easy enough to interpret the code to use equivalent C# statements.
First, off one would create a GTK CSS provider.
GtkCssProvider *provider;
provider = gtk_css_provider_new();
Then, the customized CSS style information would be defined for the CSS provider widget and the CSS provider widget would be associated with your tree view.
gtk_css_provider_load_from_data(provider, "*{-GtkTreeView-grid-line-width: 4;}", -1, NULL);
gtk_style_context_add_provider(gtk_widget_get_style_context(view), GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
Note that GTK defines a specific set of attributes for grid elements as opposed to using a standard element such as "border-width". The attribute needing customization in this scenario is "-GtkTreeView-grid-line-width".
Having set the grid width to an exaggerated width of four pixels, the following sample illustrates the effect of the custom CSS style enhancement.
I hope that points you in the correct direction.
Regards.
Let's say I have a container. I want to surround it with a border (or anything that would outline it) and be able to change it's start and end points. This would be similar to the trim paths effect in Adobe After effects. I've looked up options for container borders but the best I could find was to add it to juts one side and that is not the look I want.
The best way I can describe what I want to do is to have a border or outline to the container that looks sort of like a circular progress (but isn't round and takes the shape of the container) that has the start and end points move.
Here is a quick example I made in After Effects of what I am looking for: https://drive.google.com/file/d/1DgHZbLv_TX1D_lpfYJlL4QA0kOVbQZDe/view?usp=sharing
This needs to be done through CustomPainters. Here is a repo I came across which does this through custom painters https://github.com/divyanshub024/flutter_path_animation.
I would like to create a widget (I know it must be a CustomPainter) to draw something like this:
Notice that there are n concentric cell circles.
The main problem is that I need to access/paint each of this cells when needed to repaint it in different colors. I have been checking the CustomPainter canvas class and the only thing that could fit my needs is the draw arc thing. But, I can't provide a width for the arc (I tought I could draw a draw for every cell).
My last resort is using an image/sprite that would represent a cell. This way I could duplicate and transform it along a circle path to obtain something like the image. But I don't like the idea.
Has anybody accomplished this before in flutter?
I'm using iOS-Charts with Swift to draw line charts, and I'm looking for a way to place a gap between the data points (circles) and the lines themselves.
Something like this: example
I've tried playing around with some values under the drawLinear section of LineChartRenderer.swift, but I don't know enough about Core Graphics to do anything useful.
Having a white outline for the circles is unfortunately not an option, since I'm displaying multiple datasets with images containing transparent layers, and the datasets need to be able to overlap (as in the example image)
Any help would be greatly appreciated - thanks :)