Comments (6)
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?
from flutter_slidable.
and this out put
AnimationController.stop (package:flutter/src/animation/animation_controller.dart:499:13
from flutter_slidable.
Hi @recepbuyukfirat, can you paste the minimal code to reproduce this issue?
from flutter_slidable.
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(),
),
],
);
from flutter_slidable.
I think this problem is caused by the change of APIs, so tanks for your interest
from flutter_slidable.
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(),
),
);
}
}
from flutter_slidable.
Related Issues (20)
- How to provide border radius to it ?
- The icon of SlidableAction will not be displayed in the center when padding is not set
- Style problem HOT 2
- How do I add a remove animation?
- How to open panes when creating widgets in Flutter slideable package
- When SlidableAction slides to the left to open, close the current page.
- Slidable open Not effective ?
- Doesn't work inside a PageView HOT 1
- how to dismiss slidableAction when using other widget HOT 1
- Want notification when automatically turning off sideslip
- Selection of text inside `TextField` triggers slidable
- how to open slidable in InitState HOT 1
- How to define custom height? HOT 1
- Edit label style and icons size
- Secondary deletion
- How to set the slider extent? HOT 1
- Subsequent row is open after Slidable row is dismissed.
- Focus on flutter web HOT 1
- Query: Smooth DismissiblePane Implementation within ActionPane?
- Slidable widget not closing properly HOT 1
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 flutter_slidable.