Since my project was not using wakelock directly , I couldn't update the package. My solution was to update the flutter_html package in pubspec.yaml file
use following command
flutter pub add flutter_html