nb_utils icon indicating copy to clipboard operation
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

Open rohitprogrammics opened this issue 2 years ago • 7 comments

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 :( .

rohitprogrammics avatar Jan 21 '23 09:01 rohitprogrammics

Hello,

Can you share the code snippet here?

bhoominn avatar Jan 26 '23 11:01 bhoominn

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.`

meloDramatic007 avatar Feb 01 '23 19:02 meloDramatic007

Please share the code you are using to call toColor method.

bhoominn avatar Feb 02 '23 03:02 bhoominn

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

meloDramatic007 avatar Feb 02 '23 17:02 meloDramatic007

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.

bhoominn avatar Feb 02 '23 17:02 bhoominn

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

meloDramatic007 avatar Feb 02 '23 18:02 meloDramatic007

Is this issue resolved?

bhoominn avatar Aug 27 '23 08:08 bhoominn