码迷,mamicode.com
首页 > 其他好文 > 详细

flutter-卡片组件布局

时间:2020-07-02 18:32:30      阅读:64      评论:0      收藏:0      [点我收藏+]

标签:out   override   port   oid   bbb   new   void   extend   组件   

import ‘package:flutter/material.dart‘;

void main ()=>runApp(MyApp());

class MyApp extends StatelessWidget{
  @override
  Widget build(BuildContext context){
    
    var card=Card(
      child: Column(
        children: <Widget>[
          ListTile(
               title:new Text(‘aaaaaaaaaaa‘,style: TextStyle(fontWeight: FontWeight.w500),),
               subtitle: new Text(‘aaa:123213123321‘),
               leading: new Icon(Icons.account_box,color: Colors.lightBlue,),
             ),
             new Divider(),
              ListTile(
               title:new Text(‘bbbbbbbbbb‘,style: TextStyle(fontWeight: FontWeight.w500),),
               subtitle: new Text(‘bbb:1513938888‘),
               leading: new Icon(Icons.account_box,color: Colors.lightBlue,),
             ),
             new Divider(),
              ListTile(
               title:new Text(‘ccccccccccccc‘,style: TextStyle(fontWeight: FontWeight.w500),),
               subtitle: new Text(‘ccc:1513938888‘),
               leading: new Icon(Icons.account_box,color: Colors.lightBlue,),
             ),
             new Divider(),
        ],
      ),
    );

    return MaterialApp(
      title:"layout",
      home:Scaffold(
        appBar: AppBar(
          title:Text(‘层叠布局Stack‘)
        ),
        body: card
      )
    );
  }
}

技术图片

 

flutter-卡片组件布局

标签:out   override   port   oid   bbb   new   void   extend   组件   

原文地址:https://www.cnblogs.com/lxz-blogs/p/13226086.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!