Я искал 2 дня, но не нашел ответа, поэтому, надеюсь, кто-нибудь может помочь, моя проблема: я хочу обновить список элементов шага на степпере, скрипт выглядит так:
List<Step> _listStep = List<Step>();
_reservationFlight(c){
return
Step(
title: new Text("Jakarta - Soul", overflow: TextOverflow.ellipsis, style: new TextStyle(fontSize: 16.0, color: Colors.black87, fontWeight: FontWeight.bold,fontFamily: 'GoogleSans')),
subtitle: new Text("Flight Reservation",style: new TextStyle(fontSize: 14.0, color: Colors.red,fontFamily: 'GoogleSans')),
content: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
new Text("From - to",textAlign: TextAlign.left, style: new TextStyle(fontSize: 14.0, color: Colors.black54,fontFamily: 'GoogleSans', fontWeight: FontWeight.w600)),
],
),
isActive: false
);
}
_setReservationTile(value) async {
value.forEach((c){
_listStep.add(_reservationFlight(c));
}
}
@override
void initState() {
_setReservationTile();
}
...
new Stepper(
currentStep: 0,
steps: _listStep,
)
...
что не так с моим сценарием, пожалуйста, помогите?С наилучшими пожеланиями,