Comments (7)
Hi sorry for the late reply, at the time I ran this I was using the latest from Pub.dev
from textfield_tags.
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.
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.
════════ 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.
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.
from textfield_tags.
Fixed
from textfield_tags.
Related Issues (20)
- Breaking changes comming up after V2.0.0+ release (BE AWARE BEFORE UPDATING) HOT 2
- A FocusNode was used after being disposed HOT 25
- How to avoid empty tag? HOT 6
- warning after flutter 3.0 HOT 3
- Error HOT 2
- How to delete the Tag Based on Index value.[How to get the index of the Tag] HOT 1
- textSeparators issue HOT 21
- null safety error HOT 4
- How to use multiple lines in a textfield instead of one scrolling line? HOT 2
- Prevent paste long text (include free spaces) HOT 1
- Add custom data type support HOT 1
- set required validation HOT 1
- Has sign remove to search issue HOT 2
- Tags disappears when push & pop HOT 3
- Overriding setAdd and onSubmitted doesn't work HOT 2
- Add text to tag when the focus is change to next Textfield HOT 3
- Create a new tag if it does not exists already HOT 1
- How to move the focus to the TagTextField when a button is pressed HOT 1
- textfield_tags 3.0.0 has multiple issues HOT 4
- Tags not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textfield_tags.