Skip to main content

匯出課表圖片

實作可參考 ApUtils.saveImage

注意

若未設定此頁面會影響以下功能

限制#

此功能只支援,默認相關功能會不顯示

Web 版本可參考 issues

設定#

Android#

因 Android 10 (Q API 29) 以後使用新的 API 存取檔案系統,至 android/app/src/main/AndroidManifest.xml 增加 android:requestLegacyExternalStorage="true"

AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.examlpe.ap_common">
<application
android:name="io.flutter.app.FlutterApplication"
android:label="ap_common_example"
android:requestLegacyExternalStorage="true"
android:icon="@mipmap/ic_launcher">
</application>
</manifest>
注意

因為後續版本(Android 11) 會使 requestLegacyExternalStorage 無效,但仍建議加入使舊系統版本裝置支援

iOS#

ios/Runner/Info.plist dict 中加入

Info.plist
<key>NSPhotoLibraryUsageDescription</key>
<string>Would be export course table image.</string>

字串中的說明為取得權限時會出現的文字說明,可根據你的 App 語言做修改

macOS#