No named parameter with the name 'resizeToAvoidBottomPadding'

Viewed 4265

I try to run my app on VSCode but I get this error: enter image description here

I've tried to update flutter version/pubspec packages version/flutter clean/delete the build folder and run again. But nothing seems to work.

this is my pubspec.yaml add_2_calendar: ^2.0.1

  add_2_calendar: ^2.0.1
  camera: ^0.7.0+2
  charts_flutter: ^0.10.0
  cupertino_icons: ^1.0.2
  device_calendar: ^3.1.0
  dio: ^3.0.10
  dio_http_cache: ^0.2.9
  expandable: ^5.0.1
  firebase_core: ^0.7.0
  firebase_database: ^6.0.0
  firebase_messaging: ^8.0.0-dev.15
  fl_chart: ^0.35.0
  flick_video_player: ^0.1.1
  flutter_email_sender: ^5.0.0
  flutter_form_builder: ^6.0.0-nullsafety.1
  flutter_icons: ^1.1.0
  flutter_linkify: ^5.0.0
  flutter_paginator: ^0.0.6
  flutter_svg: ^0.19.3
  flutter_widget_from_html: ^0.5.0+3
  fluttericon: ^2.0.0
  gallery_saver: ^2.0.1
  geolocator: ^6.2.1
  get_it: ^6.0.0
  http: ^0.12.0+2
  image_picker: ^0.6.2+3
  intl: ^0.17.0
  mailer: ^5.0.0
  overlay_support: ^1.0.5
  path_provider: ^1.6.11
  permission_handler: ^5.0.1+1
  provider: ^4.0.5
  splashscreen: ^1.2.0
  timeline_tile: ^2.0.0
  url_launcher: ^5.5.0
  video_player: ^0.10.12+2
  weather_icons: ^2.0.2
  webview_flutter: ^1.0.7

flutter --version

enter image description here

flutter doctor

enter image description here

1 Answers

The reason you get this is that you use flutter_widget_from_html, that has no null safe version yet, this package depends on old version of chewie (v0.10.4), that uses deprecated property of Scaffold resizeToAvoidBottomPadding.

What you can do is to downgrade your Flutter SDK to pre null-safety version, or rewrite your code without using flutter_widget_from_html package in favor for example chewie, that already has null safety widget.

You can check more info about migrating to null safety here.

If you are willing to downgrade your SDK to pre-null safety you can use this answer.

Related