flutter-卡片组件布局

Posted lxz-blogs

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了flutter-卡片组件布局相关的知识,希望对你有一定的参考价值。

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-卡片组件布局的主要内容,如果未能解决你的问题,请参考以下文章

颤动布局中的卡片视图

Flutter控件——布局控件:卡片

Flutter控件——布局控件:卡片

flutter学习AspectRatioCard卡片组件

flutter学习AspectRatioCard卡片组件

Flutter 布局备忘录