0
I have the following code on the flutter:
import 'package:flutter/material.dart';
class LoginPage extends StatefulWidget {
@override
_LoginPageState createState() => _LoginPageState();
}
class _LoginPageState extends State<LoginPage> {
final TextEditingController emailController = new TextEditingController();
final TextEditingController passwordController = new TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height - 40,
child: Column(
children: <Widget>[
Container(
color: Colors.blue,
alignment: Alignment.topCenter,
child: Text("A"),
),
Container(
color: Colors.green,
alignment: Alignment.center,
child: Text("B"),
),
Container(
color: Colors.red,
alignment: Alignment.bottomCenter,
child: Text("C"),
)
],
),
),
),
),
);
}
}
I’m having a problem positioning the widgets
in the column. Therefore, all are in the same position in sequence. For example, "center" or "start" I wanted A to be at the top, B at the center, and C at the bottom. Can anyone tell if it is possible to do this with the columns? Or would I have to use another widget? If so, which one? pq the stack "solves" the problem but it gets responsive little and I wanted a more responsive solution to the problem, well that’s it.
Thanks, you’ve really helped
– Hiran Júnior
@Hiranjúnior do not forget to mark the answers as 'accepted', if they answer your question.
– Julio Henrique Bitencourt