강의

멘토링

커뮤니티

Inflearn Community Q&A

duaghrud11's profile image
duaghrud11

asked

[Code Factory] [Intermediate] Flutter Real Practice! State Management, Cache Management, Code Generation, GoRouter, Authentication Logic, etc. Essential Skills to Become an Intermediate!

Request Restaurant Pagination

스태틱으로 만든 메서드 빨간줄 안사라짐

Written on

·

279

0

클래스 1번
GestureDetector(
  onTap: () {
    Schedule.onTap(context);
  },

----------------------------------------------
클래스 2번 
class Schedule {

  static void onTap(BuildContext context) async {
 (데이터불러오기)
return AlertDialog 입니다.

약간에 변형을 줘서 공부중인데  1번클래스에서 
온탭 누르면 알림창은 문제 없이 뜨고있습니다
그러나 onTab 밑에 빨간줄이 영~신경쓰이는데 
마우스 대보면 The method 'onTap' isn't defined for the type 'Schedule
이렇게 나오는데 관련 자료 부터 구글 다뒤져봐도 
onTab에 빨간줄이 안사라집니다 방법좀 알려주세요 ㅠ


flutter하이브리드-앱

Answer 1

0

codefactory님의 프로필 이미지
codefactory
Instructor

안녕하세요!

제공해주신 정보만으로는 일단 의심 해볼 수 있는게 Schedule import 된 위치가 생각하시는 클래스의 Schedule 클래스가 아니라 다른 클래스가 import 된게 아닐까 의심됩니다.

감사합니다!

duaghrud11's profile image
duaghrud11

asked

Ask a question