Text ------widget树由两个widget:Center(及其子widget)和Text组成

import 'package:flutter/material.dart';

void main() => runApp(new Center(
        child: new Text(
      'Hello, world!',
      textDirection: TextDirection.ltr,
      textAlign: TextAlign.center,
      maxLines: 1,
      overflow: TextOverflow.ellipsis,
      style: TextStyle(fontSize: 80.0, color: Colors.yellow),
    )));

 

posted @ 2019-04-25 17:44  飞雪飘鸿  阅读(230)  评论(0编辑  收藏  举报
https://damo.alibaba.com/ https://tianchi.aliyun.com/course?spm=5176.21206777.J_3941670930.5.87dc17c9BZNvLL