Home > Enterprise >  Flutter how to stretch Arabic word?
Flutter how to stretch Arabic word?

Time:09-19

enter image description here

How can I write this kind of text? I've searched a DELIRIUM font but couldn't succeed.

CodePudding user response:

You have to use especially font style for this.

CodePudding user response:

I had the similar issue then i try to use this. Example:

  _downloadPdf(EPostModel contentData) async {
    if (Platform.isIOS || Platform.isAndroid) {
      bool status = await Permission.storage.isGranted;
      if (!status) await Permission.storage.request();
    }
    var image = contentData.imagePath;
    if (image == "") {
      await Printing.layoutPdf(
          onLayout: (var format) async => await Printing.convertHtml(
                format: format,
                html:
                    '<html><h4>${contentData.publishDateTime}</h4><br><h1>${contentData.title}</h1><br><br><br><body><h3>${contentData.articleBody}</h3></body></html>', // pass generated html here
              ));
    } else {
      await Printing.layoutPdf(
          onLayout: (var format) async => await Printing.convertHtml(
                format: format,
                html:
                    '<html><img src="${contentData.imagePath}"  width="100%" height="350"><br><br><h4>${contentData.publishDateTime}</h4><br><h1>${contentData.title}</h1><br><br><br><body><h3>${contentData.articleBody}</h3></body></html>', // pass generated html here
              ));
    }
  }

Add this in your pubspc.yml

dependencies:
  printing: ^5.9.3

You will be able to view any language

  • Related