• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

type 'Null' is not a subtype of type 'String'

 
Greenhorn
Posts: 2
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good day! I am a beginner in flutter and I tried creating a mask detector. However, I encountered this error every time I select a picture in the gallery or capturing a pic in my camera.

 
Saloon Keeper
Posts: 15529
364
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to CodeRanch!

It would be helpful if you told us on which line the error occurs.
 
Mary Alexis
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error is in line 128: Text(fine),
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mary Alexis wrote:The error is in line 128: Text(fine),


That information isn't useful either. The intent in asking for the line number was to allow us to see which specific line of code that you posted caused the exception/error. The code your originally posted has fewer than 128 lines so there's no way to correlate "Line 128" to the code that caused the error/exception.

If you want to help other people try to help you, give then some context. Without context, people can only guess as to what the problem is.
 
Ranch Hand
Posts: 606
11
Android Python Open BSD VI Editor Slackware
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mary Alexis wrote:Good day! I am a beginner in flutter and I tried creating a mask detector. However, I encountered this error every time I select a picture in the gallery or capturing a pic in my camera.


Please consider that Flutter is not Android native, but a mobile platform written in a different language called Dart, that usually does not have Android native performance.
By the way i suggesti you to check the fact that s ince Friday is in alpha the library to write in Jetpack Compose the iOS UI, so I am not sure how long Flutter will last if native is taking the same path of Dart

I suggest you to breakpoint the line


you are possibly getting a null value.
try to "hardcode" the text passing a value as "fine" instead of fine  in Text("fine") and see if is working, if is giving you the output fine


reply
    Bookmark Topic Watch Topic
  • New Topic