我有一个数据库文档,其中有多个图像的链接。我想以 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)
我想使用链接显示图像,但这是不可能的。
我有一个自定义表单字段来输入应用程序的 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)