How to display a fileName as string in Text flutter

I have this upLoadFile() void here and when I pick the file I want to display the fileName that I just picked FOR EX. "img89004.png" in the Text(fileName!) code: String? fileName; void upLoadFile() async { final results = await FilePicker.platform.pickFiles( allowMultiple: false, type: FileType.custom, allowedExtensions: [‘jpg’, ‘png’], ); final path = results!.files.single.path!; final fileName =… Read More How to display a fileName as string in Text flutter