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

[Flutter][Solution] No Material widget found. _InkResponseStateWidget widgets require a Material widget ancestor within the closest LookupBoundary.

by studio ODOC 2023. 9. 19.
반응형

[Flutter][Solution]

No Material widget found. _InkResponseStateWidget widgets require a Material widget ancestor within the closest LookupBoundary.

 

문제 상황 (Problem)

플러터 프로젝트에서 아래와 같은 에러 로그가 발생하며 빌드에 실패한다.

[Eng] (The following error log occurs in the Flutter project and the build fails.)

 

No Material widget found. _InkResponseStateWidget widgets require a Material widget ancestor within the closest LookupBoundary.
반응형

해결 방법 (Solution)

문제가 되는 위젯(예시코드 : InkWell)을 Material 위젯으로 감싸면 해결할 수 있다. 굿!

[Eng] (This problem can be solved by wrapping the widget in question (example code: InkWell) with a material widget. exorcism!)

Material(
  child: InkWell(
    onTap: onPressed,));
반응형