現實生活中常見的問題
他山之石
pub.dev
網路的互動
http: ^0.13.3
flutter_html: ^2.1.2
http 302 redirect
Future<String> getRealImgUrl(String urlString) async {
var client = baseClient();
http.Request req = http.Request("Get", Uri.parse(urlString))
..followRedirects = false;
try {
http.StreamedResponse response = await client.send(req);
if (response.statusCode == 302) {
return await getRealImgUrl(response.headers['location']);
} else if (response.statusCode == 200) {
return urlString;
}
} finally {
client.close();
}
return "";
}
Debug
break point
Uri parse / Url encode / decode
Object Mapping
Local Storage
Function / CallBack
Fun
exception
try/catch/finally
exception
型別轉換
is Type
Extension methods
常用的WIDGET / 按鈕 / 布局
Icons / Images
Collection
map / filter / where / first / toList()
snackbar
字體
顏色
const Color blue = Color(0xFF008BCD);
extension
加解密
多語系
多環境開發
EasyLoading
不同手機的螢幕尺寸處理
動畫
Push
Deep Link
與原生互動
Method Channel
Flutter
iOS
Android
Flutter SDK/Library of Native APP
Theme / Light Mode / Dark Mode
Last updated
Was this helpful?