본문 바로가기
Development Solutions/Flutter & Dart

[flutter] RangeError (index): Invalid value: Not in inclusive range 0..1: 2

by studio ODOC 2022. 1. 24.
반응형

 

 

문제 상황

배열에 접근하고자 했으나, 아래와 같은 에러메시지가 발생합니다.

 

RangeError (index): Invalid value: Not in inclusive range 0..1: 2

 

 

 

 

 

해결 방법

접근할 때 문제가 되었던 배열의 크기보다 작은 인덱스 값으로만 접근해야 합니다.

 

 

 

https://www.google.com/search?q=RangeError+(index)%3A+Invalid+value%3A+Not+in+inclusive+range+0..1%3A+2&rlz=1C1IBEF_koKR957KR957&oq=RangeError+(index)%3A+Invalid+value%3A+Not+in+inclusive+range+0..1%3A+2&aqs=chrome..69i57.553j0j7&sourceid=chrome&ie=UTF-8 

 

RangeError (index): Invalid value: Not in inclusive range 0..1: 2 - Google 검색

2020. 5. 16. · I have two different states, one is TodayDate used for building the widget on current month when screen loads. The other is NewDate used to ...

www.google.com

 

반응형