Giter Site home page Giter Site logo

Comments (7)

Gunnar-Stunnar avatar Gunnar-Stunnar commented on May 30, 2024 1

Hi sorry for the late reply, at the time I ran this I was using the latest from Pub.dev

from textfield_tags.

eyoeldefare avatar eyoeldefare commented on May 30, 2024

What version of this package are you running?
The reason I ask you that is so I can reproduce your error in my environment. My understanding is, there is a reason why I have it like that and I have tested everything before. So, for me to debug this, I need your version and the parameters you're using inside the widget.

from textfield_tags.

ShubhamHande99 avatar ShubhamHande99 commented on May 30, 2024

onChanged: (value) {
var splitedTagsList = value.split(" ");

 // check if the spiltedTagsList length is not equal to 1
    if(splitedTagsList.length!=1){

       var lastLastTag =
        splitedTagsList[splitedTagsList.length - 2].trim().toLowerCase();

        print( splitedTagsList[splitedTagsList.length - 2].trim().toLowerCase());

    if (value.contains(" ")) {
      if (lastLastTag.length > 0) {
        _textEditingController.clear();

        if (!_tagsStringContent.contains(lastLastTag)) {
          widget.onTag(lastLastTag);

          if (!_showPrefixIcon) {
            setState(() {
              _tagsStringContent.add(lastLastTag);
              _showPrefixIcon = true;
            });
          } else {
            setState(() {
              _tagsStringContent.add(lastLastTag);
            });
          }
          this._animateTransition();
        }
      }
    }

    }
    
   
  },

from textfield_tags.

ShubhamHande99 avatar ShubhamHande99 commented on May 30, 2024

════════ Exception caught by widgets ═══════════════════════════════════════════�[39;49m
�[38;5;244mThe following assertion was thrown while calling onChanged:�[39;49m
ScrollController not attached to any scroll views.
'package:flutter/src/widgets/scroll_controller.dart':
Failed assertion: line 108 pos 12: '_positions.isNotEmpty'

�[38;5;244mWhen the exception was thrown, this was the stack�[39;49m
�[38;5;244m#2 ScrollController.position�[39;49m
�[38;5;248m#3 _TextFieldTagsState._animateTransition�[39;49m
�[38;5;248m#4 _TextFieldTagsState.build.�[39;49m
�[38;5;244m#5 EditableTextState._formatAndSetValue�[39;49m
�[38;5;244m#6 EditableTextState.updateEditingValue�[39;49m
�[38;5;244m...�[39;49m
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

to fix this issue
Wrap your _scrollController inside WidgetsBinding.instance.addPostFrameCallback

void _animateTransition() {
var _pw = _deviceWidth;

WidgetsBinding.instance.addPostFrameCallback((_){
_scrollController.animateTo(
  _pw + _scrollController.position.maxScrollExtent,
  duration: const Duration(seconds: 3),
  curve: Curves.easeOut,
);

});

}

from textfield_tags.

eyoeldefare avatar eyoeldefare commented on May 30, 2024

I will ask you what I asked the first guy the same question: what version of this package are you running and the parameters you've used to get the errors. If you can't provide that, I can't help you.

from textfield_tags.

kherel avatar kherel commented on May 30, 2024

#23

from textfield_tags.

eyoeldefare avatar eyoeldefare commented on May 30, 2024

Fixed

from textfield_tags.

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.