美文网首页
Flutter-11-卡片组件布局

Flutter-11-卡片组件布局

作者: 忆往昔Code | 来源:发表于2019-05-24 11:27 被阅读0次

    import 'package:flutter/material.dart';
    void main () => runApp(MyApp());

    class MyApp extends StatelessWidget{
    @override
    Widget build(BuildContext context ){
    var card = new Card(
    child: Column(
    children: <Widget>[
    ListTile(
    title:new Text('水电费水电费',style: TextStyle(fontWeight: FontWeight.w500),),
    subtitle: new Text('wqeqwe'),
    leading: new Icon(Icons.account_box,color: Colors.lightBlue,),
    ),
    new Divider(),
    ListTile(
    title:new Text('请问请问请问',style: TextStyle(fontWeight: FontWeight.w500),),
    subtitle: new Text(':wqeqw'),
    leading: new Icon(Icons.account_box,color: Colors.lightBlue,),
    ),
    new Divider(),
    ListTile(
    title:new Text('123123123',style: TextStyle(fontWeight: FontWeight.w500),),
    subtitle: new Text('213123'),
    leading: new Icon(Icons.account_box,color: Colors.lightBlue,),
    ),
    new Divider(),

           ],
         ),
      
      );
      return MaterialApp(
        title:'ListView widget',
        home:Scaffold(
          appBar:new AppBar(
            title:new Text('卡片布局'),
          ),
          body:Center(child:card),
        ),
      );
    

    }
    }

    相关文章

      网友评论

          本文标题:Flutter-11-卡片组件布局

          本文链接:https://www.haomeiwen.com/subject/qqfgzqtx.html