当前位置:网站首页>Fluent development: setting method of left and right alignment of child controls in row
Fluent development: setting method of left and right alignment of child controls in row
2022-07-05 09:47:00 【Third shopkeeper 666】
Preface
stay Flutter Development process , about UI Interface layout operation is also a very important skill , Especially according to the equal proportion of actual business needs 、 Bisection display 、 Symmetrical display 、 Align both ends and so on , These are common operations , Then this article will share the settings about the alignment of both ends , For developers who are not familiar with the layout, you can have a good look , This article takes Row The left and right alignment of child controls in , Easy to read and use .
About Row There are four ways to set the left and right alignment of child controls in , For the need to align the left and right ends of the same line , Easy to implement , And there are four implementation methods : By setting spaceBetween Alignment mode 、 By using Expanded fill style 、 By using Spacer() fill style 、 By using Flexible The way , The specific four methods are as follows .
Method 1 : By setting spaceBetween Alignment mode
By setting spaceBetween Align the left and right ends , It's mainly about setting up Row Properties of control mainAxisAlignment: MainAxisAlignment.spaceBetween, To set up . Specific examples are as follows :
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
new Text("left"),
new Text("right"),
]
);
边栏推荐
猜你喜欢
cent7安装Oracle数据库报错
Dry goods sorting! How about the development trend of ERP in the manufacturing industry? It's enough to read this article
百度智能小程序巡檢調度方案演進之路
LeetCode 503. Next bigger Element II
基于模板配置的数据可视化平台
从“化学家”到开发者,从甲骨文到 TDengine,我人生的两次重要抉择
Unity skframework framework (XXIII), minimap small map tool
百度评论中台的设计与探索
[reading notes] Figure comparative learning gnn+cl
Understand the window query function of tdengine in one article
随机推荐
Unity SKFramework框架(二十二)、Runtime Console 运行时调试工具
百度智能小程序巡检调度方案演进之路
Understand the window query function of tdengine in one article
SQL learning alter add new field
解决Navicat激活、注册时候出现No All Pattern Found的问题
Lepton 无损压缩原理及性能分析
Why do offline stores need cashier software?
tongweb设置gzip
Go 语言使用 MySQL 的常见故障分析和应对方法
基于模板配置的数据可视化平台
搞数据库是不是越老越吃香?
Solve the problem of no all pattern found during Navicat activation and registration
百度交易中台之钱包系统架构浅析
Application of data modeling based on wide table
idea用debug调试出现com.intellij.rt.debugger.agent.CaptureAgent,导致无法进行调试
Vs code problem: the length of long lines can be configured through "editor.maxtokenizationlinelength"
uni-app---uni. Navigateto jump parameter use
uni-app---uni.navigateTo跳转传参使用
How to empty uploaded attachments with components encapsulated by El upload
LeetCode 503. Next bigger Element II