Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length #26

Closed
recepbuyukfirat opened this issue Aug 28, 2018 · 6 comments
Closed

SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length #26

recepbuyukfirat opened this issue Aug 28, 2018 · 6 comments

Comments

@recepbuyukfirat
Copy link

helllo, thank you for shared. see the problem when i integration to preject in my project. how to solve this issues. (my english not good so sory)
this problem output:
SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

help me please

@recepbuyukfirat
Copy link
Author

and this out put
AnimationController.stop (package:flutter/src/animation/animation_controller.dart:499:13

@letsar
Copy link
Owner

letsar commented Aug 28, 2018

Hi @recepbuyukfirat, can you paste the minimal code to reproduce this issue?

@recepbuyukfirat
Copy link
Author

recepbuyukfirat commented Sep 11, 2018

Sory. i could not answer because i had another jops. write my flutter_slidable code the following:

               ` return new Slidable(`
                     ` key: new Key(_messages[index].toString()),`
                     ` controller: slidableController,`
                      `direction:Axis.horizontal,`
                      `delegate: _getDelegate(item.id),`
                      `actionExtentRatio: 0.25,`
                      `child: new Column(`
                        `crossAxisAlignment: isReceived`
                            `? CrossAxisAlignment.start`
                            `: CrossAxisAlignment.end,`
                        `mainAxisAlignment: isReceived`
                            `? MainAxisAlignment.start`
                            `: MainAxisAlignment.end,`
                       ` children: <Widget>[`
                          `new Container(`
                            `margin: isReceived ? new EdgeInsets.only(`
                                `left: 10.0, right: MediaQuery`
                                `.of(context)`
                                `.size`
                                `.width / 4, top: 5.0, bottom: 5.0) :`
                            `new EdgeInsets.only(left: MediaQuery`
                                `.of(context)`
                                `.size`
                                `.width / 4, right: 10.0, top: 5.0, bottom: 5.0),`
                           ` padding: new EdgeInsets.only(`
                                `left: 20.0, right: 20.0, top: 10.0, bottom: 10.0),`
                            `decoration: new BoxDecoration(`
                              `color: Colors.grey.withOpacity(0.1),`
                              `borderRadius: BorderRadius.circular(10.0),`
                            `),`
                            `child: new Column(`
                              `crossAxisAlignment: CrossAxisAlignment.start,`
                              `children: <Widget>[`
                                `new Text(isReceived ? senderName : "Siz", style: TextStyle(`
                                    `color: isReceived ? Colors.red : Colors.green),),`
                                `new Text(content, style: TextStyle(color: Colors.white),),`
                               ` SizedBox(height: 6.0,),`
                                `new Text(`
                                  `date.toString().substring(0, 16),`
                                  `style: TextStyle(color: Colors.grey, fontSize: 12.0),`
                                  `textAlign: TextAlign.end,`
                           ```
 ),
                              ],
                            ),
                          ),
                        ],
                      ),
                          `actions: <Widget>[`
                            `new IconSlideAction(`
                          ```
    caption: 'Delete',
                              color: Colors.red,
                          ```

icon: Icons.delete,
onTap: () => deleteMessage(),
),
],

                         ```
 secondaryActions: <Widget>[
                            new IconSlideAction(
                              caption: 'Delete',
                              color: Colors.red,
                              icon: Icons.delete,
                              onTap: () => deleteMessage(),
                            ),
                          ],
                        );

@letsar
Copy link
Owner

letsar commented Sep 17, 2018

Hi @recepbuyukfirat, sorry but I cannot run the code you provided. It's not independent of the rest of your code.
Can you please, write a sample that I could simply copy and paste in a file and run it?

@recepbuyukfirat
Copy link
Author

I think this problem is caused by the change of APIs, so tanks for your interest

@matiasfdevecchi
Copy link

Hi, I had the same error. In my case, the problem wasn't the TextFormField. It was because of the key inside the Form widget. If you use a key, the general widget must be StatefulWidget, not StatelessWidget.

Wrong code

    class MyWidget extends StatelessWidget{
      final GlobalKey<FormState> _formKey = GlobalKey<FormState>(); 
      @override
      Widget build(BuildContext context) {
        // TODO: implement build
        return Scaffold(
          body: Form(
            key: _formKey,
            child: TextFormField(),
          ),
        );
      }
    }

Right Code

class MyWidget extends StatefulWidget{
      @override
      State<StatefulWidget> createState() {
        // TODO: implement createState
        return _MyWidgetState();
      }
    }
    
    class _MyWidgetState extends State<MyWidget>{
      final GlobalKey<FormState> _formKey = GlobalKey<FormState>(); 
      @override
      Widget build(BuildContext context) {
        // TODO: implement build
        return Scaffold(
          body: Form(
            key: _formKey,
            child: TextFormField(),
          ),
        );
      }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants