【问题标题】:How to add a text to an image in flutter如何在颤动中向图像添加文本
【发布时间】:2019-11-05 22:40:15
【问题描述】:

如何在 Flutter Web 中向图像添加文本 如何将文本添加到 Flutter Web 上的图像中?是否有用于图像编辑的小部件。我们怎样才能做到这一点?

【问题讨论】:

标签: image flutter editing flutter-web


【解决方案1】:
【解决方案2】:
  import 'package:flutter/material.dart';

  void main(){
  runApp(MyApp());
 }

class MyApp  extends StatelessWidget {
 @override
 Widget build(BuildContext context) {
  // TODO: implement build
  return MaterialApp(
   home: Scaffold(
     appBar: AppBar(
       title: Text("Add Text to an Image"),
     ),
     body:Container(
      margin: EdgeInsets.only(top: 50.0),
      child: Stack(
        children: <Widget>[
           Image.network("http://www.panama-offshore-services.com/wp- 
      content/uploads/2014/08/Tech-business-panama.jpg"),
          Container(
            margin: EdgeInsets.only(top:20.0),
          ),
          Text("This is text",
            style: TextStyle(
                color: Colors.red,
                fontSize: 18.0
            ),)
           ],
        ),
       )
      ),
     );
    }

    }







  // use stack to add text on image 

【讨论】:

  • 你能把这张图片和文字一起保存吗?
猜你喜欢
  • 1970-01-01
  • 2020-01-18
  • 2021-06-22
  • 2022-11-30
  • 1970-01-01
  • 2021-08-11
  • 1970-01-01
  • 2022-11-01
  • 1970-01-01
相关资源
最近更新 更多