HandSignatureControl constructor

HandSignatureControl({
  1. @Deprecated('Use {setup} or {initialSetup}') double threshold = 3.0,
  2. @Deprecated('Use {setup} or {initialSetup}') double smoothRatio = 0.65,
  3. @Deprecated('Use {setup} or {initialSetup}') double velocityRange = 2.0,
  4. @Deprecated('Use {setup} or {initialSetup}') double pressureRatio = 0.0,
  5. SignaturePathSetup setup()?,
  6. SignaturePathSetup? initialSetup,
})

Controls input from HandSignature and creates smooth signature path.

setup dynamic setup for every new path. Setup can be also set later. initialSetup default setup for each path (ignored if setup is provided).

threshold minimal distance between two points. smoothRatio smoothing ratio of curved parts. velocityRange controls velocity speed and dampening between points (only Shape and Arc drawing types using this property to control line width). aka how fast si signature drawn.. pressureRatio ratio between pressure and velocity. 0.0 = only velocity, 1.0 = only pressure

Implementation

HandSignatureControl({
  @Deprecated('Use {setup} or {initialSetup}') double threshold = 3.0,
  @Deprecated('Use {setup} or {initialSetup}') double smoothRatio = 0.65,
  @Deprecated('Use {setup} or {initialSetup}') double velocityRange = 2.0,
  @Deprecated('Use {setup} or {initialSetup}') double pressureRatio = 0.0,
  SignaturePathSetup Function()? setup,
  SignaturePathSetup? initialSetup,
}) {
  this.setup = setup ??
      () =>
          initialSetup ??
          SignaturePathSetup(
            threshold: threshold,
            smoothRatio: smoothRatio,
            velocityRange: velocityRange,
            pressureRatio: pressureRatio,
          );
}