Last active
September 14, 2021 06:05
-
-
Save EduardinDev/e5fdb6e61a99332e946ba30585029a39 to your computer and use it in GitHub Desktop.
Alinear widgets de flutter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Ejemplo 1 | |
Widget myLayoutWidget() { | |
return Align( | |
alignment: Alignment(0.7, -0.5), | |
child: Text( | |
"widget", | |
style: TextStyle(fontSize: 30), | |
), | |
); | |
} | |
#Ejemplo 2 | |
Align( | |
alignment: Alignment.centerRight, | |
child: Text("widget"), | |
) | |
#Enunciado | |
donde para cualquier posición relativa (x,y) | |
Alignment.topLeft es Alignment(-1.0, -1.0) | |
Alignment.topCenter es Alignment(0.0, -1.0) | |
Alignment.topRight es Alignment(1.0, -1.0) | |
Alignment.centerLeft es Alignment(-1.0, 0.0) | |
Alignment.center es Alignment(0.0, 0.0) | |
Alignment.centerRight es Alignment(1.0, 0.0) | |
Alignment.bottomLeft es Alignment(-1.0, 1.0) | |
Alignment.bottomCenter es Alignment(0.0, 1.0) | |
Alignment.bottomRight es Alignment(1.0, 1.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment