当前位置: 首页 > 面试题库 >

如何将图像置于抖动图像中

宰父志新
2023-03-14
问题内容

https://i.stack.imgur.com/w5mLQ.png

就像我们在大图片中看到的一个小的圆形图像一样。以及如何安排图片中的文字

https://i.stack.imgur.com/w5mLQ.png


问题答案:
Widget build(BuildContext context) {
  return new Container(
    height: 150.0,
    margin: new EdgeInsets.all(10.0),
    decoration: new BoxDecoration(borderRadius: new BorderRadius.all(new Radius.circular(10.0)),
        gradient: new LinearGradient(colors: [Colors.yellow[700], Colors.redAccent],
            begin: Alignment.centerLeft, end: Alignment.centerRight, tileMode: TileMode.clamp)),
    child: new Row(
      crossAxisAlignment: CrossAxisAlignment.center,
      children: <Widget>[
        new Padding(padding: new EdgeInsets.only(left: 10.0, right: 10.0),
          child: new CircleAvatar(radius: 35.0, backgroundImage: NetworkImage('https://wallpapercave.com/wp/wp2365076.jpg'),)
        ),
        new Expanded(child: new Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            new Text('New York', style: new TextStyle(fontSize: 20.0, color: Colors.white70, fontWeight: FontWeight.bold),),
            new SizedBox(height: 8.0,),
            new Text('Sunny', style: new TextStyle(fontSize: 12.0, color: Colors.white70),),
            new SizedBox(height: 10.0,),
            new Row(children: <Widget>[
              new Column(children: <Widget>[
                new Text('2342', style: new TextStyle(fontSize: 12.0, color: Colors.white)),
                new Text('Popularity', style: new TextStyle(fontSize: 10.0, color: Colors.white)),
              ],),
              new Column(children: <Widget>[
                new Text('2342', style: new TextStyle(fontSize: 12.0, color: Colors.white)),
                new Text('Like', style: new TextStyle(fontSize: 10.0, color: Colors.white)),
              ],),
              new Column(children: <Widget>[
                new Text('2342', style: new TextStyle(fontSize: 12.0, color: Colors.white)),
                new Text('Followed', style: new TextStyle(fontSize: 10.0, color: Colors.white)),
              ],)
            ],)
          ],)),
        new Padding(padding: new EdgeInsets.only(left: 10.0, right: 10.0),
          child: new Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
            new Text('12°', style: new TextStyle(fontSize: 30.0, color: Colors.white70),),
            new Text('Ranking', style: new TextStyle(fontSize: 14.0, color: Colors.white70),),
          ],))

      ],),
  );
}

在此处输入图片说明



 类似资料:
  • 问题内容: Flutter提供了几种基于路径(即剪切路径)的蒙版方法。我试图找出一种方法,可以像下面的示例一样使用透明层来拍摄图像,并使用该图像来遮罩另一幅图像/视图或用作一般遮罩。 我的第一个直觉是看CustomPaint类,但是我无法通过最初的想法来解决。 问题答案: Flutter具有BoxDecoration类,该类接受BlendMode枚举。通过利用这些,您可以使用图像实现各种蒙版效果,

  • 我将图像路径(来自图库的图像)存储在SQLite数据库中,现在加载到图像视图中。。。并使用此代码: 和错误: E/BitmapFactory:无法解码流:java.io.FileNotFoundException:/storage/emulated/0/DCIM/Camera/IMG_20161230_224205.jpg(权限被拒绝)

  • 问题内容: 如何将图像的白色背景转换为透明背景?谁能给我打电话怎么做? 问题答案: Google的第一个结果是: 使颜色透明 http://www.rgagnon.com/javadetails/java-0265.html 它使图像的蓝色部分透明,但是我敢肯定您可以对其进行调整以使用白色 (提示:传递给函数,而不是)

  • 问题内容: 我在许多“现代”网站(例如,facebook和google图片搜索)中都注意到了这一点,只有当用户向下滚动页面足以将其带入可见视口区域时,折叠下方的图像才会加载(在查看源时,页面显示_X_个标记,但不是立即从服务器获取的)。这种技术叫什么,它如何工作以及在多少浏览器中工作。并且有一个jQuery插件可以用最少的编码实现此行为。 编辑 奖励:有人可以解释HTML元素是否存在“ onScr

  • 好的,我需要一个功能,我需要能够在图像本身的框架内正确定位图像。 正如您在图像中看到的,图像容器的大小是固定的,如果图像大于框架本身,我需要能够在框架内重新定位图像。我尝试用矩形剪切图像并将图像定位在矩形内,但剪辑会创建一个等于矩形大小的新图像,因此到目前为止还没有成功。类中是否有任何属性可以让我们移动图像位置?所以我找不到任何属性。非常感谢任何帮助。谢谢。

  • 问题内容: 我正在尝试使用以下代码将Icon()转换为Image(): 问题是,函数在上抛出。 对于记录,该值为默认图标(通过获取) 以下是引发异常的详细信息: 如果您需要更多详细信息,请告诉我,我将编辑我的信息以添加它们。 谢谢! 问题答案: 刚刚找到了一个代码段,如果您想更频繁地包装那些表现不佳的LAF提供的图标,可能会有所帮助: 要在您的代码段中使用,只需传递任意组件:

  • 问题内容: 我是Rails编程的初学者,试图在页面上显示许多图像。有些图像要放在其他图像之上。为简单起见,假设我要一个蓝色正方形,在蓝色正方形的右上角有一个红色正方形(但在角落不紧)。由于性能问题,我试图避免进行合成(使用ImageMagick等)。 我只想相对于彼此放置重叠的图像。 举一个更困难的例子,想象一下将里程表放在更大的图像中。对于六位数字,我将需要合成一百万个不同的图像,或者即时进行处