I am facing this issue that after cleaning the build (flutter clean) my code stopped working and it is stuck in build failed..
I tried deleting the flutter SDK and doing all that process again but still I am getting these same error messages.
I was trying to fix the Firebase login so after restarting my laptop and then I replaced the 'google-services.json' file and then after these commands flutter [clean build, pub get and pub upgrade] the code is stuck between these error and the build.
(this is the error messages and the screenshot)
Running Gradle task 'assembleDebug'...
../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.5.1+5/lib/src/widget_factory.dart:60:57: Error: Type 'TableMetadata' not found.
Widget buildTable(BuildMetadata m, TextStyleHtml tsh, TableMetadata data) =>
^^^^^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.5.1+5/lib/src/internal/layout_grid.dart:7:24: Error: Type 'TableMetadata' not found.
TextStyleHtml tsh, TableMetadata data) {
^^^^^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.5.1+5/lib/src/widget_factory.dart:60:57: Error: 'TableMetadata' isn't a type.
Widget buildTable(BuildMetadata m, TextStyleHtml tsh, TableMetadata data) =>
^^^^^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.5.1+5/lib/src/internal/layout_grid.dart:7:24: Error: 'TableMetadata' isn't a type.
TextStyleHtml tsh, TableMetadata data) {
^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'D:\Flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 904
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'D:\Flutter\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6m 10s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 376.2s (!)
Exception: Gradle task assembleDebug failed with exit code 1
If anyone facing the same issue then just change the package (flutter_widget_from_html) to ^0.5.1+3 in your app's pubspec.yaml file
Ex: flutter_widget_from_html: ^0.5.1+3
then pub upgrade and run the code.
This happened because of an oversight from my part, the latest release 0.5.2 should be 0.6.0 since it introduces a breaking change. The easiest fix is to run flutter pub upgrade to make sure both flutter_widget_from_html and flutter_widget_from_html_core is updated together.
Sorry for your trouble @yoush97
Sorry for your trouble @yoush97
no worries, I hope the issue is fixed now )
This happened because of an oversight from my part, the latest release
0.5.2should be0.6.0since it introduces a breaking change. The easiest fix is to runflutter upgradeto make sure bothflutter_widget_from_htmlandflutter_widget_from_html_coreis updated together.
Did you really mean flutter upgrade or would you mean flutter pub upgrade ?
@mselmanyildirim sorry, I meant flutter pub upgrade 🤦♂️