flutter_ok_image
1.0.0
ใช้งานง่ายนี้เพื่อสร้างวิดเจ็ตภาพเครือข่ายคุณสามารถสร้างเลย์เอาต์ที่แตกต่างกันตามข้อผิดพลาด/โหลดรวมถึงการตั้งค่าตัวแทนแคชรูปภาพ
ok_image : ^0.4.0 import "package:ok_image/ok_image.dart" ; import "package:ok_image/ok_image.dart" ;
createWidget (){
return OKImage (
url : "https://ws1.sinaimg.cn/large/844036b9ly1fxfo76hzd4j20zk0nc48i.jpg" ,
width : 200 ,
height : 200 ,
timeout : Duration (seconds : 20 ),
fit : fit,
);
}url: image net url
width: width
height: height
fit: show BoxFit
followRedirects: whether image redirection is allowed.
loadingWidget: display on loading
errorWidget: display when image load error / timeout.
retry: retry to load image count.
timeout: timeout duration.
onErrorTap: when loadErrorWidget show ,onTap it.
cacheDelegate: you can use the param to delegate loadImageการทดลอง: ลายเซ็น, ค่าส่งคืนพารามิเตอร์และข้อมูลอื่น ๆ อาจได้รับการแก้ไขในอนาคต
onLoadStateChanged: will be call on the load state changed. แก้ไข OKImage.buildErrorWidget เพื่อกำหนดค่า global okimage errorwidget
แก้ไข OKImage.buildLoadingWidget เพื่อกำหนดค่าการโหลดโอเค
ภายใต้ BSD 3:
Apache 2.0:
ขอบคุณโอเพ่นซอร์ส
หากคุณใช้ไลบรารีโอเพ่นซอร์สรุ่นเก่าเหล่านี้ซึ่งทำให้เกิดความไม่ลงรอยกันโปรดอัปเดต หากไม่เข้ากันกับฉันโปรดติดต่อฉันและฉันจะอัปเดตหมายเลขเวอร์ชันตามความเหมาะสม