4Q-s-r-o / signature

Flutter plugin that creates a canvas for writing down a signature
MIT License
252 stars 83 forks source link

key property does not created! #12

Closed bambinoua closed 4 years ago

bambinoua commented 4 years ago

Code for reproducing:

class _SomePageState extends State<SomePage> {
  Signature signaturePad;

  @override
  void didChangeDependencies() {
    super.didChangeDependencies();
    signaturePage = Signature(
      height: 300.0,
      penColor: Theme.of(context).accentColor,
    );
    signaturePad.clear() // Here I have a crash "the method clear was called on null"
  }
}

At break point I see that inner key is null. It looks like createState method is not called.

MartinHlavna commented 4 years ago

Version 3.0.0 will be published today. It should fix this issue. Does your problem still persists?