Created
June 21, 2023 01:08
-
-
Save nick45chen/fd0a0d8775288282a911da68a99ec612 to your computer and use it in GitHub Desktop.
Flutter 置中,且內容保持有 46 px,並且可以上下滑動(內容消失的邊界為螢幕)
This file contains 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
ScrollView( | |
child: Padding( | |
padding: const EdgeInsets.all(46.0), // 添加 46px 的邊距 | |
child: Container( | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: <Widget>[ | |
Text('這是第一行文字'), | |
Text('這是第二行文字'), | |
// 你可以在此處添加更多的 Widget | |
], | |
), | |
), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment