朋友们你好,我正在学习在 Flutter 中构建应用程序。我在 Flutter 中创建了一个应用程序,我想在我的代码中正确实现 SingleChildScrollView。 我怎么能这样做?有什么帮助吗?先谢谢各位朋友
我的代码:
sudo: required
language: generic
services:
- docker
stages:
- dev
- prod
jobs:
include:
- stage: dev
if: NOT(branch=master)
scripts:
- docker build -t harryyy27/allies_art_club/frontend -f ./client/Dockerfile.dev ./client
- docker build -t harryyy27/allies_art_club/backend -f ./src/Dockerfile.dev ./src
- docker run -e CI=true harryyy27/allies_art_club/frontend npm test
- docker run -e CI=true harryyy27/allies_art_club/backend npm test
- stage: prod
if: branch=master
before_deploy:
- docker build -t harryyy27/aac-client ./client
- docker tag harryyy27/aac-client registry.heroku.com/$HEROKU_APP/client
- docker build -t harryyy27/aac-src ./src
- docker tag harryyy27/aac-src registry.heroku.com/$HEROKU_APP/src
- docker build -t harryyy27/aac-nginx ./nginx
- docker tag harryyy27/aac-nginx registry.heroku.com/$HEROKU_APP/nginx
# Log in to docker CLI
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_ID" --password-stdin
- curl https://cli-assets.heroku.com/install.sh | sh
- echo "$HEROKU_API_KEY" | docker login -u "$HEROKU_USERNAME" --password-stdin registry.heroku.com
- docker push harryyy27/aac-client;
- docker push registry.heroku.com/$HEROKU_APP/client;
- docker push harryyy27/aac-src;
- docker push registry.heroku.com/$HEROKU_APP/src;
- docker push harryyy27/aac-nginx;
- docker push registry.heroku.com/$HEROKU_APP/nginx;
deploy:
skip_cleanup: true
provider: script
script:
heroku container:login;
heroku container:release client src nginx --app $HEROKU_APP;
如何正确实现 SingleChildScrollView?
如何正确实现 SingleChildScrollView?
答案 0 :(得分:1)
为 SingleChildScrollView
的父容器设置一些高度。你需要给父容器高度。
答案 1 :(得分:0)
你能试试这个代码吗
CustomScrollView(
scrollDirection: Axis.vertical,
slivers: [
SliverFillRemaining(
hasScrollBody: false,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text('everything works'),
for (int i = 0; i < 10; i++) const FlutterLogo(size: 80)
],
),
),
],
),