如何根据Flutter中的容器调整多行文字大小

时间:2018-09-11 06:22:59

标签: flutter

如果customeHeight和customeWidth的值更改,则子值也应更改。同时,必须根据父容器的高度和宽度来设置文本大小。

fontSize必须增加和减小。

//家长班

<ul class="widget-post-list">
// Define our WP Query Parameters
<?php $the_query = new WP_Query( 'posts_per_page=2' ); ?>

// Start our WP Query
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>

// Display the Post Title with Hyperlink
<li><h5 class="post-title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h5></li>

// Repeat the process and reset once it hits the limit
<?php 
endwhile;
wp_reset_postdata();
?>
</ul>

================================================ =========================

//儿童班 //它将作为子项返回其父项

Padding(
          padding:
              EdgeInsets.only(left: 60.0, top: 60.0, right: 20.0, bottom: 20.0),
          child: Container(
              height: customeHeight,
              width: customeWidth,
              child: widget.child,
              decoration: BoxDecoration(
                border: Border.all(color: Colors.red, width: 4.0),
                borderRadius: BorderRadius.circular(2.0),
              )
              ),


    ),

1 个答案:

答案 0 :(得分:-1)

使用没有固定高度的容器,并使用Maxline属性支持多行。

test: &default

  # Credentials for REST APIs
  client_id: AZeKLB9rkwMumoPHGg_xG-sMOtEREDh3VeSP2cgbdorScFDkGBAoG2WQ0ZNtIgdKM6eaCfYqKmXzxDqS
  client_secret: ELXfwfA4wGU_PEwjIiYllCvs7gQCYsaWyN_yzXux5XSrHv6ZxGEUasnSIHvkAZ4-rYXTcvC4Igy097xo

  # Mode can be 'live' or 'sandbox'
  mode: sandbox

  # Credentials for Classic APIs
  app_id: APP-80W284485P519543T
  username: jb-us-seller_api1.paypal.com
  password: WX4WTU3S8MY44S7F
  signature: AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy
  # # With Certificate
  # cert_path: "config/cert_key.pem"
  sandbox_email_address: kolbywebdev-facilitator@gmail.com

  # # IP Address
  # ip_address: 127.0.0.1
  # # HTTP Proxy
  # http_proxy: http://proxy-ipaddress:3129/

development:
  <<: *default

production:
  <<: *default
  mode: live