如何在抖动中向图像添加文本

时间:2019-06-24 06:53:27

标签: image flutter editing flutter-web

如何在颤动网络中向图像添加文本 如何在移动Web图像上添加文字?是否有用于图像编辑的小部件。我们如何实现这一目标?

2 个答案:

答案 0 :(得分:2)

答案 1 :(得分:1)

  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