I want to done todo(as container) (like in link:https://www.uplabs.com/posts/todo-app-mockup) with dragging to right. This is i did but it doesn't work.
Draggable(
//onDragStarted: ()=>Text("batuhan"),
axis: Axis.horizontal,
feedback: Container(
height: height/12,
width: ww,
decoration: new BoxDecoration(
color: Color(0x00000000).withOpacity(0.8999999761581421),
borderRadius: BorderRadius.circular(6),
boxShadow: [BoxShadow(
color: Color(0x0f000000),
offset: Offset(0,1),
blurRadius: 6,
spreadRadius: 0
) ],
),
),
child:
Listener(onPointerMove: (opm) {
setState(() {
ww=opm.position.dx;
});
print("onPointerMove .. ${opm.position.dx}");
},
child:
Container(
width: ww,
child:
Container(
height: height/12,
decoration: new BoxDecoration(
color: Color(0xffffffff).withOpacity(0.8999999761581421),
borderRadius: BorderRadius.circular(6),
boxShadow: [BoxShadow(
color: Color(0x0f000000),
offset: Offset(0,1),
blurRadius: 6,
spreadRadius: 0
) ],
)
,
child:
Column(
crossAxisAlignment: CrossAxisAlignment.start,
//mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
new Container(
width: width/80,
height: height/80,
decoration: new BoxDecoration(
color:
Color(0xff00ffff).withOpacity(0.30000001192092896),
shape: BoxShape.circle
)
),
Row(children: <Widget>[
//SizedBox(width:10),
Container(
width: width/20,
height: height/16,
decoration: new BoxDecoration(
image: DecorationImage(
image: new NetworkImage(
'https://todo.kuarkdijital.com/i/'+todos[index].icon+'.png'),
),
shape: BoxShape.circle,
// borderRadius: new BorderRadius.all(new
Radius.circular(20.0)),
gradient: LinearGradient(colors: [
Color(0xfffe1e9a),
Color(0xfffea64c) ],
stops: [
0,
1
]
)
),
),
SizedBox(width: width/40),
Container(width:width*65/100,child:
Text("$ww",
style: TextStyle(
fontFamily: 'Lato',
color: Color(0xff181743),
fontSize: width/25,
fontWeight: FontWeight.w400,
fontStyle: FontStyle.normal,)
),
), //SizedBox(width: 121),
Column(
children: <Widget>[
new Text(datechange(todos[index].date),
style: TextStyle(
fontFamily: 'Lato',
color: Color(0xff181743),
fontSize: width/40,
fontWeight: FontWeight.w900,
fontStyle: FontStyle.normal,
)
),
SizedBox(height: height/120,),
new Text(changetime((todos[index].time)),
style: TextStyle(
fontFamily: 'Lato',
color: Color(0xff181743),
fontSize: width/40,
fontWeight: FontWeight.w400,
fontStyle: FontStyle.normal,
)
)
],
),
],)
],)
),
),
/* childWhenDragging: Container(
height: height/12,
width: 10,
),*/
)
/*childWhenDragging: Container(
height: height/40,
decoration: new BoxDecoration(
color: Colors.green,
borderRadius: BorderRadius.circular(6),
boxShadow: [BoxShadow(
color: Color(0x0f000000),
offset: Offset(0,1),
blurRadius: 6,
spreadRadius: 0
) ],
)
)*/
)
more precisely, i have column composed of box. When i drag to right any box, i want to change box. Link will help to understand to you.https://www.uplabs.com/posts/todo-app-mockup What widgets i should use? Do you have any suggestions?
User contributions licensed under CC BY-SA 3.0