Home > Blockchain >  How can I edit a text and add photo on image in flutter?
How can I edit a text and add photo on image in flutter?

Time:10-21

cv template and I want to edit it with flutter

CodePudding user response:

Everything in Flutter is widgets, this image would be an Image widget in your Flutter app. You can use Stack widget to put things over each other. so You can put image over an image by using Stack widget. Unfortunately you can't edit text of an image in Flutter, Instead I would rather to edit this image (for putting image and editing text) by Photoshop for example and then implementing it as one piece widget in my Flutter app.

CodePudding user response:

What I assess from your question is you want to have a layout like the one given in your link, right? For a circular image, you could use CircleAvatar. As for the text you could use the Text widget. Now put these widgets inside a Column or Row. You seem to be new to Flutter and I'd suggest you to get a good grip on the basics first. Anyhow, here's a little dummy code snippet you could extend to achieve what you're looking for

Column(
      crossAxisAlignment: CrossAxisAlignment
          .start, //if you want your widgets to align on left in your col
      children: [
        CircleAvatar(
          radius: 70,
          foregroundImage: AssetImage("pathToYourAssetImg"),
        ),
        SizedBox(
          height: 20, //set this to your intended value
        ),
        Text( //you could also create a custom text widget and pass the arguments if you don't want to hardcode text widgets over & over again for all of your text
          "yourText",
          style: TextStyle(
              color: Colors.black87,
              fontSize: 20, //set this to your value
              fontWeight: FontWeight.bold //if you want to have a bold text
),
        ),
      ],
    );
  • Related