Flutter学习(滚动视图)

import 'package:flutter/material.dart';

class SecondPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return CustomScrollView (
      shrinkWrap: true,
      slivers: [
        new SliverPadding(
            padding: const EdgeInsets.all(20),
            sliver: new SliverList(
                delegate: new SliverChildListDelegate(
                  [
                    new Image.network(
                        "http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg",
                        fit: BoxFit.cover

                    ),
                    new Image.network(
                        "http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg",
                        fit: BoxFit.cover

                    ),
                    new Image.network(
                      "http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg",
                      fit: BoxFit.cover

                    ),
                    new Image.network(
                      "http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg",
                      fit: BoxFit.cover

                   ),
                    new Image.network(
                      "http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg",
                      fit: BoxFit.cover

                   ),
                    new Image.network(
                      "http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg",
                      fit: BoxFit.cover

                   ),
                    new Image.network(
                      "http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg",
                      fit: BoxFit.cover

                   ),
                    new Image.network(
                        "http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg",
                        fit: BoxFit.cover

                    ),
                    new Image.network(
                        "http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg",
                        fit: BoxFit.cover

                    ),
                    new Image.network(
                        "http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg",
                        fit: BoxFit.cover

                    ),
                    new Image.network(
                        "http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg",
                        fit: BoxFit.cover

                    ),
                  ],
                ),
            ),
        ),
      ],
    );
  }
}

你可能感兴趣的:(Flutter)