• flutter SingleChildScrollView就像是IOS里面的ScrollView


    import 'package:flutter/material.dart';
    
    void main() {
      runApp( MaterialApp(
        title: 'Flutter gesture',
        home: LearnListView(),
      ));
    }
    class LearnListView extends StatefulWidget{
      @override
      State<StatefulWidget> createState() {
        return new _LearnListView();
      }
    }
    class _LearnListView extends State<StatefulWidget>{
    
      @override
      Widget build(BuildContext context) {
        return new MaterialApp(
          title: 'SingleChildScrollView Demo',
          home: new Scaffold(
            appBar: AppBar(
              title: new Text('SingleChildScrollView Demo'),
            ),
            body: new SingleChildScrollView(
              physics: BouncingScrollPhysics(),
              child: new Center(
                child: new Column(
                  children: <Widget>[
                    Container(
                       300.0,
                      height: 200.0,
                      color: Colors.blue,
                    ),
                    Container(
                       300.0,
                      height: 200.0,
                      color: Colors.yellow,
                    ),
                    Container(
                       300.0,
                      height: 200.0,
                      color: Colors.pink,
                    ),
                    Container(
                       300.0,
                      height: 200.0,
                      color: Colors.blue,
                    ),
                    Container(
                       300.0,
                      height: 200.0,
                      color: Colors.yellow,
                    ),
                    Container(
                       300.0,
                      height: 200.0,
                      color: Colors.pink,
                    ),
                    Container(
                       300.0,
                      height: 200.0,
                      color: Colors.blue,
                    ),
                  ],
                ),
              ),
            ),
          ),
        );
      }
    }

     

  • 相关阅读:
    MySQL 存储过程 (2)
    MySQL 存储过程
    MySQL 数据库常用命令
    oracle 控制文件多路复用
    oracle定时清理日志操作
    git 常用的分支技巧
    golang tcp keepalive实践
    TCP keepalive的详解(解惑)
    勾践为什么卧薪尝胆
    golang context学习记录1
  • 原文地址:https://www.cnblogs.com/gaozhang12345/p/11959183.html
Copyright © 2020-2023  润新知