美文网首页Flutter
flutter 暂无数据 或者我是底线

flutter 暂无数据 或者我是底线

作者: 小郭米 | 来源:发表于2019-01-30 11:11 被阅读5次

import 'package:flutter/material.dart';

class EndLine extends StatelessWidget {

  @override

  Widget build(BuildContext context) {

    return new Container(

      color: const Color(0xFFEEEEEE),

      padding: const EdgeInsets.fromLTRB(5.0, 15.0, 5.0, 15.0),

      child: new Row(

        children: <Widget>[

          new Expanded(

            child: new Divider(height: 10.0,),

            flex: 1,

          ),

          new Text("我是有底线的",style: new TextStyle(color: Theme.of(context).accentColor),),

          new Expanded(

            child: new Divider(height: 10.0,),

            flex: 1,

          ),

        ],

      ),

    );

  }

}

class NoData extends StatelessWidget {

  @override

  Widget build(BuildContext context) {

    return new Container(

      color: const Color(0xFFEEEEEE),

      padding: const EdgeInsets.fromLTRB(5.0, 15.0, 5.0, 15.0),

      child: new Row(

        children: <Widget>[

          new Expanded(

            child: new Divider(height: 10.0,),

            flex: 1,

          ),

          new Text("暂无数据",style: new TextStyle(color: Theme.of(context).accentColor),),

          new Expanded(

            child: new Divider(height: 10.0,),

            flex: 1,

          ),

        ],

      ),

    );

  }

}

相关文章

网友评论

    本文标题:flutter 暂无数据 或者我是底线

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