我想在右上角有一個跳過教程文本按鈕,我該怎么做?
ListView(
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.symmetric(horizontal: 15),
children: [
Row(
children: [
const SizedBox(
height: 80,
width: 20,
),
Padding(
padding: const EdgeInsets.only(left: 241, top: 20),
child: TextButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const RootWidget()),
);
},
child: const Text(
"überspringen",
style: TextStyle(color: Colors.white),
)),
)
],
),
Text(
"Welcome",
style: themeData.textTheme.headline1!.copyWith(
....還有更多代碼,但對于這個問題并不重要。你可以幫我嗎?:D 就像在這個螢屏截圖中一樣,但是當我使用不同的 Mediaquery 時,它的位置是錯誤的。所以我需要它取決于媒體查詢。
uj5u.com熱心網友回復:
Column(children: [
SafeArea(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
TextButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const RootWidget()),
);
},
child: const Text(
"überspringen",
style: TextStyle(color: Colors.white),
)),
],
),
),
Expanded(
child: ListView(physics: const BouncingScrollPhysics(), padding: const EdgeInsets.symmetric(horizontal: 15), children: [
Text(
"Welcome",
),
]),
)
]);
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/511685.html
標籤:扑镖用户界面
