水平列表

 

 

水平列表

 

 

 

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,           )         ],       ),     );   } }
上一篇:pytorch_函数


下一篇:javascript高级程序设计(六)集合类型引用