January 2020
Intermediate to advanced
368 pages
12h 45m
English
To specify an absolute position for a widget as x-y coordinates, nest it in a Positioned widget that is itself nested in a Stack widget. Positioned gives you access to properties like top, left, right, and bottom, similar to CSS. Here’s an example:
// Stack and Positioned
Stack( 1
children: [
Positioned( 2
child: Text("Lorem ipsum"),
left: 24.0,
top: 24.0,
),
Text("Not positioned"), 3
],
),
For an in-depth look at Row and Column, read chapter 2. For an ...
Read now
Unlock full access