'i am so bad with styling in flutter.. what to do?
I tried to build a small application with flutter. I know how all the log things work in flutter I understand the logical concepts really good (state, context, route). But I'm really bad at styling, it frustrates me. I feel like I can not put text on an image without causing a problem (usually find in google and never do alone). I dont know what to do. i feel so bad with styling. what to do?
code example I built with google 95% (I'm not okay with that :( )
InkWell(
onTap: () => selectManufacturer,
borderRadius: BorderRadius.circular(20),
child: Card(
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
elevation: 9,
margin: EdgeInsets.all(10),
child: Stack(fit: StackFit.expand, children: [
ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Image.network(
"./image.png",
),
),
Positioned(
bottom: 100,
left: 0,
child: Column(children: [
Text(
widget.name,
style: TextStyle(fontSize: 26, color: Colors.red),
),
]))
]),
));
Solution 1:[1]
Styling is about the only thing I am "ok" at in Flutter, lol.
Here are my tips:
- When you first layout a page, start with either a Column or a Row.
- Then add an Expanded widget with a Container in it with a certain Color, different from other Colors.
- You can repeat steps 1 and 2 recursively -- inside existing Expanded widgets-- to "drill down" and add even more detailed layout control
The tips above let you build little colored squares that show you how your layout will be before you jump into making it more complicated. By adding different sized "flex" attributes to each Expanded, you can tweak your layout from the start, before you make it more complicated.
In the HTML/CSS world, this approximates building a page with different colored DIVs.
I hope this helps!
Solution 2:[2]
You should remove ConfigureAwait(false) invocations from ASP.NET pipeline code. That includes controller action methods.
As it is, if the code after that is using HttpContext.Current, its value will be null.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Paulo Morgado |
