当前位置:网站首页>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"),
]
);边栏推荐
- 项目实战 | Excel导出功能
- 百度APP 基于Pipeline as Code的持续集成实践
- Wechat applet obtains household area information
- 干货整理!ERP在制造业的发展趋势如何,看这一篇就够了
- 分布式数据库下子查询和 Join 等复杂 SQL 如何实现?
- MYSQL 对字符串类型排序不生效问题
- Resolve the horizontal (vertical) sliding conflict between viewpager and WebView
- Unity skframework framework (24), avatar controller third person control
- 【对象数组的排序】
- [JS sort according to the attributes in the object array]
猜你喜欢

项目实战 | Excel导出功能

Solve the problem of no all pattern found during Navicat activation and registration

Why does everyone want to do e-commerce? How much do you know about the advantages of online shopping malls?

Lepton 无损压缩原理及性能分析

OpenGL - Lighting

OpenGL - Model Loading

Online chain offline integrated chain store e-commerce solution

90%的人都不懂的泛型,泛型的缺陷和应用场景

VS Code问题:长行的长度可通过 “editor.maxTokenizationLineLength“ 进行配置

Unity SKFramework框架(二十二)、Runtime Console 运行时调试工具
随机推荐
【两个对象合并成一个对象】
Cross process communication Aidl
Uncover the practice of Baidu intelligent testing in the field of automatic test execution
Observation cloud and tdengine have reached in-depth cooperation to optimize the cloud experience of enterprises
为什么不建议你用 MongoDB 这类产品替代时序数据库?
Design and exploration of Baidu comment Center
基于模板配置的数据可视化平台
Evolution of Baidu intelligent applet patrol scheduling scheme
Solve liquibase – waiting for changelog lock Cause database deadlock
OpenGL - Model Loading
从“化学家”到开发者,从甲骨文到TDengine,我人生的两次重要抉择
Unity skframework framework (XXII), runtime console runtime debugging tool
Principle and performance analysis of lepton lossless compression
Analysis on the wallet system architecture of Baidu trading platform
百度APP 基于Pipeline as Code的持续集成实践
La voie de l'évolution du système intelligent d'inspection et d'ordonnancement des petites procédures de Baidu
MySQL installation configuration and creation of databases and tables
Unity SKFramework框架(二十四)、Avatar Controller 第三人称控制
基于宽表的数据建模应用
[app packaging error] to proceed, either fix the issues identified by lint, or modify your build script as follow