小编Neh*_*hal的帖子

如何在 PDF Flutter 中使用网络图像

我有一个数据库文档,其中有多个图像的链接。我想以 pdf 格式显示此图像。

我正在使用pdf: ^2.1.0编辑 pdf 文件并flutter_pdfview: ^1.0.1查看 pdf。

我目前正在显示这样的图像,但这只能显示资产中的图像

final profileImage = pw.MemoryImage(
  (await rootBundle.load('assets/images/image.png')).buffer.asUint8List(),
);

//Inside Widgets
pw.Image(profileImage)
Run Code Online (Sandbox Code Playgroud)

我想使用链接显示图像,但这是不可能的。

database pdf image flutter

5
推荐指数
1
解决办法
174
查看次数

使用 *(星号)代替 。在颤动文本字段中

我有一个自定义表单字段来输入应用程序的 pin。而不是使用常规的 . 编写引脚时,我想使用 * ,如下图所示。我该如何实现这一目标?

在此输入图像描述

这是表单字段的代码:

class PINNumber extends StatelessWidget {
  final TextEditingController textEditingController;
  final OutlineInputBorder outlineInputBorder;

  const PINNumber(
      {Key key, this.textEditingController, this.outlineInputBorder})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 50.0,
      child: TextFormField(
        controller: textEditingController,
        enabled: false,
        obscureText: true,
        textAlign: TextAlign.center,
        decoration: InputDecoration(
          contentPadding: EdgeInsets.all(16.0),
          border: outlineInputBorder,
          filled: true,
          fillColor: Colors.white30,
        ),
        style: TextStyle(
          fontWeight: FontWeight.bold,
          fontSize: 21.0,
          color: Colors.black,
        ),
      ),
    );
  }
}
Run Code Online (Sandbox Code Playgroud)

flutter textformfield

2
推荐指数
1
解决办法
2069
查看次数

标签 统计

flutter ×2

database ×1

image ×1

pdf ×1

textformfield ×1