在加载ModalProgressHUD时插入文本失败。

问题描述 投票:0回答:1

如何在refreshindicator下加入一段文字?

Widget build(BuildContext context) {
    return new Scaffold(
      body: ModalProgressHUD(child: page(context), inAsyncCall: _loading, progressIndicator: RefreshProgressIndicator(), color: Colors.black),
    );
  }
flutter dart
1个回答
0
投票

你必须将ModalProgressHUD包裹在一个带有子列的列中,然后你可以在ModalProgressHUD之后并在该列中添加一个Text()子列。

body: Column(
children: <Widget>[
ModalProgressHUD(),
Text('your text'),
]
),
© www.soinside.com 2019 - 2024. All rights reserved.