v1.0.7easy_signature_pad
사용자가 서명할 수 있는 영역을 제공하고, 서명 및 Base64 이미지를 반환합니다.
34좋아요 1.4천30일 다운로드150Pub 점수
AndroidiOSWebmacOSWindowsLinux
Flutter Signature Pad는 사용자가 캔버스 위에 그릴 수 있도록 하고, 서명을 Base64 이미지로 얻을 수 있게 해주는 플러터 플러그인입니다.
{"sdk":"flutter"}{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Easy Signature Pad is the flutter plugin that allows users to draw on the canvas and get the signature as Base64 image.
Preview
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;
});
}
}