其他分享
首页 > 其他分享> > 水平列表

水平列表

作者:互联网

 

 

 

 

 

import 'package:flutter/material.dart';
void main() {   runApp(MyApp()); }
class MyApp extends StatelessWidget {   @override   Widget build(BuildContext context) {     return MaterialApp(         home: Scaffold(       appBar: AppBar(title: Text("flutterDemo")),       body: HomeContent(),     ));   } }
class HomeContent extends StatelessWidget {   @override   Widget build(BuildContext context) {     return Container(       height: 180.0,       child: ListView(         scrollDirection: Axis.horizontal,         children: <Widget>[           Container(             width: 180.0,             height: 180.0,             color: Colors.red,           ),           Container(             width: 180.0,             height: 180.0,             color: Colors.orange,             child: ListView(               children: <Widget>[                 Image.network(                   "https://www.itying.com/images/202004/goods_img/1101_P_1587123548040.jpg",                 ),                 Text('我是文本'),               ],             ),           ),           Container(             width: 180.0,             height: 180.0,             color: Colors.blue,           ),           Container(             width: 180.0,             height: 180.0,             color: Colors.deepOrange,           ),           Container(             width: 180.0,             height: 180.0,             color: Colors.deepPurpleAccent,           )         ],       ),     );   } }

标签:180.0,Container,color,水平,height,width,Colors,列表
来源: https://www.cnblogs.com/eric-share/p/15085244.html