v1.0.7easy_signature_pad
提供使用者簽名的區域,並回傳簽名與Base64影像。
34喜歡 2350近 30 天下載150Pub 分數
AndroidiOSWebmacOSWindowsLinux
Flutter Signature Pad 是一個 Flutter 外掛,允許使用者在畫布上繪圖,並以 Base64 圖像形式取得簽名。
以下為英文專案原文快照,最新內容請造訪 GitHub。
Easy Signature Pad is the flutter plugin that allows users to draw on the canvas and get the signature as Base64 image.
import 'package:easy_signature_pad/easy_signature_pad.dart';
// initialise the variable to store signature image
Uint8List signatureBytes;
// Use the SignaturePad Widget
EasySignaturePad(
onChanged: (image) {
setImage(image);
},
height: size.width ~/ 2,
width: size.width ~/ 1.5,
penColor: Colors.black,
strokeWidth: 1.0,
borderRadius: 10.0,
borderColor: Colors.white,
backgroundColor: Colors.white,
transparentImage: false,
transparentSignaturePad: false,
hideClearSignatureIcon: false,
),
// process the base64 image
void setImage(String bytes) async {
if (bytes.isNotEmpty) {
Uint8List convertedBytes = base64Decode(bytes);
setState(() {
signatureBytes = convertedBytes;
});
} else {
setState(() {
signatureBytes = null;
});
}
}
依賴清單 2 項
{"sdk":"flutter"}{"sdk":"flutter"}先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗