Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 924 Bytes

File metadata and controls

25 lines (14 loc) · 924 Bytes

Use IntrinsicWidth, not fixed width

Ever tried to force multiple Text widgets to have the same fixed width (e.g. with a parent SizedBox)?

Don’t do that, as this will break your layout when the text size changes.

Instead, use IntrinsicWidth and let Flutter calculate the right size for you. 👍


Credit for this tip goes to @devangelslondon, who showcased it during his talk at FlutterCon 23:


Found this useful? Show some love and share the original tweet 🙏


Previous Next
Replace Container with nested widgets Combining Streams with RxDart