美文网首页
Flutter 背景剧中显示,两层背景文字剧中显示

Flutter 背景剧中显示,两层背景文字剧中显示

作者: 曾经也是个少年 | 来源:发表于2019-12-04 17:50 被阅读0次
    Container(
                            margin: EdgeInsets.symmetric(horizontal: 30),
                            decoration: BoxDecoration(
                              image: DecorationImage(
                                image: ImageUtil.getAssetImage('mall/mall_bg_timebg@3x',),
                                fit: BoxFit.fill,
                              ),
                            ),
                            child: Container(
                              height: 65,
                              padding: EdgeInsets.symmetric(vertical: 9),
                              child: Column(
                                children: <Widget>[
                                   Container(
                                    child: Text(
                                      '${widget.entity.name}',
                                      style: TextStyle(
                                        color: Color(0XFF2B95E9),
                                        fontSize: 14.0,
                                        fontWeight: FontWeight.bold,
                                      ),
                                      // overflow: TextOverflow.ellipsis,
                                    ),
                                  ),
                                  Row(
                                    crossAxisAlignment: CrossAxisAlignment.center,
                                    mainAxisAlignment: MainAxisAlignment.center,
                                    children: <Widget>[
                                      SizedBox(
                                        width: 4.0,
                                      ),
                                      Container(
                                        padding: EdgeInsets.all(2),
                                        margin: EdgeInsets.symmetric(horizontal: 2),
                                        decoration: BoxDecoration(
                                          color: Color(0XFF2B95E9),
                                          borderRadius: BorderRadius.all(Radius.circular(5.0)),
                                        ),
                                        child: Text('$hourString',
                                            style: TextStyle(color: Colors.white, fontSize: 12)),
                                      ),
                                      Text(':',
                                          style:
                                              TextStyle(color: Color(0XFF2B95E9), fontSize: 16)),
                                      Container(
                                        padding: EdgeInsets.all(2),
                                        margin: EdgeInsets.symmetric(horizontal: 2),
                                        decoration: BoxDecoration(
                                          color: Color(0XFF2B95E9),
                                          borderRadius: BorderRadius.all(Radius.circular(5.0)),
                                        ),
                                        child: Text('$minuteString',
                                            style: TextStyle(color: Colors.white, fontSize: 12)),
                                      ),
                                      Text(':',
                                          style:
                                              TextStyle(color: Color(0XFF2B95E9), fontSize: 16)),
                                      Container(
                                        padding: EdgeInsets.all(2),
                                        margin: EdgeInsets.symmetric(horizontal: 2),
                                        decoration: BoxDecoration(
                                          color: Color(0XFF2B95E9),
                                          borderRadius:
                                              new BorderRadius.all(new Radius.circular(5.0)),
                                        ),
                                        child: Text('$secondString',
                                            style: TextStyle(color: Colors.white, fontSize: 12)),
                                      ),
                                    ],
                                  )
                                ],
                              ),
                              
                            ),
                          );
    
    image.png

    相关文章

      网友评论

          本文标题:Flutter 背景剧中显示,两层背景文字剧中显示

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