
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
안녕하세요, 4-9 강의에 WebView 클래스를 사용하여 코드를 작성하는 부분이 있는데, quickfix를 눌러도 import 항목이 없어 찾아보니, 다음과 같이 WebView 클래스가 없어지고, WebViewController와 WebViewWidget로 나뉘어 졌다고 나옵니다.
해당 강의 코드를 수정 안내해 주실수 있으실까요?
<출처>
https://pub.dev/packages/webview_flutter
The WebView class has been removed and its functionality has been split into WebViewController and WebViewWidget.
WebViewController handles all functionality that is associated with the underlying web view provided by each platform. (e.g., loading a url, setting the background color of the underlying platform view, or clearing the cache).
WebViewWidget takes a WebViewController and handles all Flutter widget related functionality (e.g., layout direction, gesture recognizers).
See the Dartdocs for WebViewController and WebViewWidget for more details.
작성한 코드 및 에러 메세지
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.grey,
title: Text(url),
),
body: WebView(initialUrl: url),
);
}
오류 발생 시, 작성한 코드 전체와 에러 메시지를 첨부해 주세요.
Tip 1) </> 아이콘을 눌러 코드박스를 만들어 보세요.
Tip 2) Ctrl+A(맥의 경우 Command+A) 단축키로 코드를 한 번에 선택할 수 있어요!
