nb_utils
nb_utils copied to clipboard
/C:/Users/Asus/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/nb_utils-4.6.22/lib/src/extensions/string_extensions.dart:112:3: Error: Type 'Color' not found. Color toColor({Color? defaultColor}) { ^^^^^ /C:/Users/Asus/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/nb_utils-4.6.22/lib/src/extensions/string_extensions.dart:112:18: Error: Type 'Color' not found. Color toColor({Color? defaultColor}) { ^^^^^ /C:/Users/Asus/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/nb_utils-4.6.22/lib/src/extensions/string_extensions.dart:112:18: Error: 'Color' isn't a type. Color toColor({Color? defaultColor}) { ^^^^^ FAILURE: Build failed with an exception. * Where: Script 'C:\Users\Asus\fvm\default\packages\flutter_tools\gradle\flutter.gradle' line: 1156 * Get more help at https://help.gradle.org BUILD FAILED in 31s Running Gradle task 'assembleDebug'... 33.0s Exception: Gradle task assembleDebug failed with exit code 1
Hi friends, thanks for your great package, I'm using it and it is showing error , I tried a lot of things nothing seems to work :( .
Hello,
Can you share the code snippet here?
Same for me `/E:/flutterSDK/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.6.22/lib/src/extensions/string_extensions.dart:112:3: Error: Type 'Color' not found. Color toColor({Color? defaultColor}) { ^^^^^ /E:/flutterSDK/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.6.22/lib/src/extensions/string_extensions.dart:112:18: Error: Type 'Color' not found. Color toColor({Color? defaultColor}) { ^^^^^ /E:/flutterSDK/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.6.22/lib/src/extensions/string_extensions.dart:112:18: Error: 'Color' isn't a type. Color toColor({Color? defaultColor}) { ^^^^^
FAILURE: Build failed with an exception.`
Please share the code you are using to call toColor method.
This is SDK level error and not showing any error in project files ,only it shows when you try to build a release apk. when I upgrade my kotlin plugin version to 1.8.0 and gradle version 7.0.2 this error occurred , In my opinion may be your projects gradle and kotlin version need to upgrade
I have used this library in more than 100 projects and i have not seen this error in any project.
I want to see the code where you are using toColor method. Can you please share the code here it would be great.
As I told you earlier It only happen when you try to build the apk! My previous opinion was wrong , I tried it with another project and upgrading kotlin and gradle version wont create any issue . This package almost working fine until I added flutter_local_notification
Is this issue resolved?