我用comment_box包制作了帶有顫振的評論框,但我嘗試將'userImage'更改為本地img,但它似乎不起作用。任何人有任何解決方案來改變它?這是我的代碼:
Expanded(
child: CommentBox(
userImage: 'assets/profile_icon.png',
child: commentChild(filedata),
labelText: 'Write a comment...',
withBorder: false,
errorText: 'Comment cannot be blank',
sendButtonMethod: () {
if (formKey.currentState!.validate()) {
print(commentController.text);
setState(() {
addComment();
});
FocusScope.of(context).unfocus();
} else {
print("Not validated");
}
},
formKey: formKey,
commentController: commentController,
backgroundColor: Color.fromARGB(255, 255, 255, 255),
textColor: Color.fromARGB(255, 0, 0, 0),
sendWidget: Icon(Icons.send_sharp, size: 30, color: Colors.grey),
),
),
uj5u.com熱心網友回復:
不幸的是,無法使用本地影像作為userImage引數。在comment_box 0.0.17包配置中,它用于在UINetwork Image中顯示,并且只接受. 在這種情況下,您必須為您的 UI 配置自定義注釋框,或者您可以繼續為您的 UI 實作搜索另一個包。userImageURL text (String userImage)
dependencies:
comment_box: ^0.0.17
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/520970.html
標籤:扑镖
