Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- baekjoon #boj #c++
- flutter #app #취준
- baekjoon #백준 #boj
- firebase #파이어베이스
- 인턴 #프론트엔드 #개발자 #프론트엔드개발자 #취준
- 비주얼 스튜디오 #vs #visual studio
- VS #비주얼스튜디오
- #유데미 #udemy #웅진씽크빅 #스나이퍼팩토리 #인사이드아웃 #미래내일일경험 #프로젝트캠프 #부트캠프 #react #리액트프로젝트 #프론트엔드개발자양성과정 #개발자교육과정
- flutter #플러터
- 플러터 #flutter #restful #rest api
- unity #2d-game #minigame #vscode
- 백준 #c++
- 백준 #boj
- flutter #깃
- 유데미 #udemy #웅진씽크빅 #스나이퍼팩토리 #인사이드아웃 #미래내일일경험 #프로젝트캠프 #부트캠프 #react #리액트프로젝트 #프론트엔드개발자양성과정 #개발자교육과
- 로컬저장소 #이름변경
- flutter #todolist
- flutter #firebase #플러터 #파이어베이스 #연동
- unity #2d-game
- boj #baekjoon
- flutter #플러터 #분석
- flutter #상태관리
- 백준
- boj #baekjoon #c++
- 백준 #boj #baekjoon
- 비주얼스튜디오 #코드스니펫
- flutter #git
- git #unity #깃허브
- boj #c++
- Flutter
Archives
- Today
- Total
cococo-coding
Too many positional arguments: 0 expected, but 1 found. 본문
[Flutter] Todolist/트러블슈팅
Too many positional arguments: 0 expected, but 1 found.
_dani 2024. 2. 10. 01:18안드로이드 스튜디오로 flutter로 개발을 하는 중에 다음과 같은 오류가 났다.
구글링을 해서 비슷한 질문을 발견해서 공유한다.. 아직 초짜라서 이해가 잘 안 가지만...
nosql - 플러터 : 너무 많은 위치 인수 : 0 개가 필요하지만 1 개 발견 - 스택 오버플로 (stackoverflow.com)
답변을 보면 아래와 같다.
생성자는 하나뿐이며 생성자는 인수 / 매개 변수를 허용하지 않습니다.
따라서 생성자에서 호출 할 수 없습니다.super(props)
그러나 코드에서 하나의 인수, 즉 수퍼 클래스의 생성자 (예 : Equatable )를 전달합니다.props
이것을 바꾸십시오.
FruitEvent([List props = const []]) : super(props);
이것으로:
FruitEvent([List props = const []]);
한국어로 번역해서 봐서 어색하긴한데, 아마 생성자에 관련된 문제인 것 같다...
오류가 난 코드를 살펴보면 다음과 같다.
위 코드에 child: 만 추가해줬더니 바로 해결되었다.
bottomNavigationBar: BottomAppBar(
child: Row(
children: [
Icon(Icons.phone),
Icon(Icons.message),
Icon(Icons.contact_page),
],
),
)
)
);
}
}
'[Flutter] Todolist > 트러블슈팅' 카테고리의 다른 글
[Flutter/Android Studio] None of the files were in this project content 에러 (0) | 2024.02.10 |
---|---|
[Flutter/Android Studio] The selection does not cover a set of statements or an expression. Extend selection to a valid range. (1) | 2024.02.10 |
[Flutter/Android Studio] dart파일 import하기 (1) | 2024.02.10 |
[Flutter] 새로운 플러터 프로젝트 만들고 깃 연동하기 (1) | 2024.02.10 |
안드로이드 스튜디오에서 main.dart 파일 찾기 (0) | 2024.02.09 |