WidgetsBinding.instance.addPostFrameCallback((_) {
//setState((){});
});
또는
Future.delayed(Duration.zero, () async {
});
로 해결
if(position == widget.horizontalpageIndex) {
returnPadding(
padding:constEdgeInsets.only(left:10.0),
child: Column(
children: [
Container(
child: feedbackModel.reversedListViewed[feedbackModel.reversedListViewed.keys.elementAt(widget.verticalPageIndex)][position] ?
CircleAvatar(
backgroundColor: Colors.transparent,
backgroundImage: AssetImage("assets/teacher_1.png"),
radius: 28.sp,
child: Stack(
children: [
Visibility(
child: Container(
width: 55.w,
height: 55.h,
child: Center(
child: Icon(
Icons.play_circle_fill,
color: Colors.white,
size: 26.sp,
),
),
)),
],
),
) : CircleAvatar(
radius: 30.sp,
backgroundColor: Colors.greenAccent,
child: CircleAvatar(
backgroundColor: Colors.transparent,
backgroundImage: AssetImage("assets/teacher_1.png"),
radius: 28.sp,
child: Stack(
children: [
Visibility(
child: Container(
width: 55.w,
height: 55.h,
child: Center(
child: Icon(
Icons.play_circle_fill,
color: Colors.white,
size: 26.sp,
),
),
)),
],
),
),
),
),
Expanded(
child: Text('${position + 1}단계',
style: TextStyle(
color: Colors.white,
),
),
),
],
),
);
}else{
returnInkWell(
onTap: (){
widget.onButtonTapped(position);
},
child: Padding(
padding:constEdgeInsets.only(left:10.0),
child: Column(
children: [
Container(
child: feedbackModel.reversedListViewed[feedbackModel.reversedListViewed.keys.elementAt(widget.verticalPageIndex)][position] ?
CircleAvatar(
backgroundColor: Colors.transparent,
backgroundImage: AssetImage("assets/teacher_1.png"),
radius: 28.sp,
) : CircleAvatar(
radius: 30.sp,
backgroundColor: Colors.greenAccent,
child: CircleAvatar(
backgroundColor: Colors.transparent,
backgroundImage: AssetImage("assets/teacher_1.png"),
radius: 28.sp,
),
),
),
Expanded(
child: Text('${position + 1}단계',
style: TextStyle(
color: Colors.white,
),
),
),
],
),
)
);
}