Reputation: 67
I have app need to show list of duties each duty have default value of degree show as slider ,I want after i change the all sliders shown and when i click a button send the new values to server How can i do that ? this is the list map show the slider
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
border: Border.all(
width: 2, color: Colors.white),
color:
Color.fromRGBO(230, 200, 200, 0.2)),
width: widthView,
padding: EdgeInsets.all(25),
margin: EdgeInsets.fromLTRB(0, 25, 0, 25),
child: Column(
children: <Widget>[
Text(
lang == 'k'
? item.activity_k
: item.activity_a,
textAlign: TextAlign.justify,
style: TextStyle(
fontSize: 28, color: Colors.white),
),
SizedBox(
height: 15,
),
Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.yellow[200]
.withOpacity(0.2),
spreadRadius: 2,
blurRadius: 20,
)
],
borderRadius:
BorderRadius.circular(15),
color:
Color.fromRGBO(0, 0, 0, 0.4)),
width: widthView,
padding: EdgeInsets.all(10),
child: Slider(
max: 100,
min: 0,
divisions: 20,
value: _value,
label: _value.toString(),
onChanged: (double val) {},
onChangeEnd: (val) {
create_list(u_id, m_id, w_id, did,
item.act_id, val);
},
)),
SizedBox(
height: 10,
),
Text(_value.toString(),
style: TextStyle(
fontSize: 26,
color: Colors.white))
],
),
)
],
),
);
}).toList()),
my app is finished just i need to solve thsis issue
Upvotes: 1
Views: 342
Reputation: 67
I changed my way to solve problem ,I deleted the insert button and made the values inserted automatically after move the slider. and it works correctly 100%
Upvotes: 1