1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] How to check if XFile exists?

Discussão em 'Mobile' iniciado por Stack, Outubro 16, 2024 às 03:22.

  1. Stack

    Stack Membro Participativo

    I want to check if a file exists before downloading it in flutter web and mobile, so using File class is not possible since it uses dart:io and dart:io in not available in web. now I want to use XFile class for handling files in both web and mobile.

    For File we can use bool exists = await file.exists();

    but there is no exists() method for XFile types. How can I check if a file already exits?

    Continue reading...

Compartilhe esta Página