Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
4,732 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Right now I am trying to create a TabView based photo app in the WinUI3 development environment.
I am trying to create an app where every time I create a new tab, a tab with the same content is created.
The content of the tabs will implement a folder picker function.
However, when I run the folder picker after creating a new tab, the app returns Null and an error occurs.
Why is this?
Hello there,
This error occurs when you use a bang operator (!) on a nullable instance which wasn't initialized.
For example:
String? string; // Nullable String
void main() {
var len = string!.length; // Runtime error: Null check operator used on a null value
}
Solutions:
Open the logs and there must be a line pointing to a file in your project where the error occurred.
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer--