Giter VIP home page Giter VIP logo

Comments (9)

alex-cp360 avatar alex-cp360 commented on July 17, 2024 5

I have solved this issue by using ClipRect as the parent for the Signature widget
Screenshot 2022-06-14 at 12 37 17 PM
.

from signature.

cfsbhawkins avatar cfsbhawkins commented on July 17, 2024 2

I don't think this is fixed. Using 5.0.1, even added a row and flexible around it like in sample.

Screenshot_1652820904

return Column(children: [
Row(
children: [
Flexible(
flex: 2,
child: Signature(
controller: _signatureController,
backgroundColor: CoreTheme.gray,
height: 100,
))
],
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: TextFormField(
minLines: 1,
maxLines: 1,
textCapitalization: TextCapitalization.words,
keyboardType: TextInputType.name,
decoration: InputDecoration(
hintText: 'Type Signatory Name',
hintStyle: CoreTheme.textStyleParagraph(color: FontColor.gray),
border: InputBorder.none,
),
onSaved: (name) => onValueChanged(context, name: name)
),
),
Divider(thickness: 1),
]);

from signature.

cihancil avatar cihancil commented on July 17, 2024

Same here. If I don't set a width and height for Signature widget, I can draw outside of its border. It doesn't need to be inside Row.

from signature.

MartinHlavna avatar MartinHlavna commented on July 17, 2024

Fix released in 5.0.1

from signature.

rivella50 avatar rivella50 commented on July 17, 2024

Same here, still doesn't work.
Signature seems to be open to the right and bottom side, even when i set a width value.
Screenshot 2022-05-23 at 07 23 53

                child: SingleChildScrollView(
                  child: Column(
                    children: [
                      const SizedBox(
                        height: 30,
                      ),
                      Signature(
                        controller: _companySignatureController,
                        height: 150,
                        backgroundColor: Colors.grey,
                      ),

Is there a hack to fix this on our side or a package version to go down in order that this works again meanwhile?

from signature.

maddionatoplus avatar maddionatoplus commented on July 17, 2024

Same as me, I am drawing everywhere. Really a big problem for me. What can I do?

from signature.

cfsbhawkins avatar cfsbhawkins commented on July 17, 2024

The workaround I did was, I made it a full screen landscape view problem solved for my use case.

from signature.

rivella50 avatar rivella50 commented on July 17, 2024

Not possible for me since i have to offer 2 signature areas in my view.
If the developer is not able to react soon i will have to find another package or implement this feature by myself.

from signature.

rivella50 avatar rivella50 commented on July 17, 2024

My hack solution is the following: I adjusted function SignatureState::_addPoint like this:

final myWidth = widget.width ?? screenSize!.width;
final myHeight = widget.height ?? screenSize!.height;

//SAVE POINT ONLY IF IT IS IN THE SPECIFIED BOUNDARIES
if (o.dx > 0 && o.dx < myWidth &&
    o.dy > 0 && o.dy < myHeight) {

And when defining a height and width explicitely or implicitely (e.g. by using a LayoutBuilder around Signature) it seems to work for me.
The problem with the original code seems to be that it doesn't take into account the optionally defined width and height parameters, which both are <= their screenSize pendants, and if they are smaller drawing across the right and bottom borders is possible.

from signature.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.