i’m a newbie on flutter. i’m making a app with multiple buttons and i did this:
Container( margin: const EdgeInsets.fromLTRB(10, 10, 10, 10), child: FilledButton( style: ButtonStyle( backgroundColor: WidgetStateProperty.all(Colors.grey)), child: const Text( "Send To Display(s)", style: TextStyle(fontSize: 20), )), ), Container( margin: const EdgeInsets.fromLTRB(10, 10, 10, 10), child: FilledButton( style: ButtonStyle( backgroundColor: WidgetStateProperty.all(Colors.red)), child: const Text( "Clear Displays(s)", style: TextStyle(fontSize: 20), )), ),
nothing weird.
But when i change the first button margin to margin: const EdgeInsets.fromLTRB(10, 10, 10, 5),
then the second to margin: const EdgeInsets.fromLTRB(5, 10, 10, 10),
the first button is larger than the other one.
i runned the app on 24.04 6.8.0-39 ubuntu and 127.0.6533.88 chrome. i will update this post later after trying it on android
how to do i keep the distance between these two button 10 and not 20?
n550jv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.