File txt=File('/data/data/sms.com.smsexample/files/2.txt'); var dir_bool=await txt.exists(); //返回真假 if(dirbool)