├── .gitignore ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── android ├── .gitignore ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── zzaning │ │ └── flutter_file_preview │ │ ├── FileDisplayActivity.java │ │ ├── FlutterFilePreviewPlugin.java │ │ ├── LeftTitleLayout.java │ │ ├── LoadFileApi.java │ │ ├── LoadFileModel.java │ │ ├── Md5Tool.java │ │ ├── StatusNavBar.java │ │ └── TBSWebView.java │ └── res │ ├── anim │ └── activity_exit.xml │ ├── drawable │ └── webview_progress_drawable.xml │ ├── layout │ ├── act_common_webview.xml │ └── left_title_layout.xml │ ├── mipmap-xxhdpi │ └── ic_back4.png │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── dimens.xml │ ├── strings.xml │ ├── styles.xml │ └── values.xml ├── assets └── images │ └── ic_back.png ├── example ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── example │ │ │ │ │ └── MainActivity.java │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Podfile │ ├── Podfile.lock │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── main.m ├── lib │ └── main.dart ├── pubspec.lock ├── pubspec.yaml └── test │ └── widget_test.dart ├── ios ├── .gitignore ├── Assets │ └── .gitkeep ├── Classes │ ├── FilePreviewVC.h │ ├── FilePreviewVC.m │ ├── FlutterFilePreviewPlugin.h │ └── FlutterFilePreviewPlugin.m └── flutter_file_preview.podspec ├── lib └── flutter_file_preview.dart ├── pubspec.lock ├── pubspec.yaml ├── screenshot └── demo.gif └── test ├── docs ├── test_file_for.docx ├── test_file_for.pdf └── test_file_for.xlsx └── flutter_file_preview_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | .fvm 2 | .vscode 3 | 4 | # Miscellaneous 5 | *.class 6 | *.log 7 | *.pyc 8 | *.swp 9 | .DS_Store 10 | .atom/ 11 | .buildlog/ 12 | .history 13 | .svn/ 14 | 15 | # IntelliJ related 16 | *.iml 17 | *.ipr 18 | *.iws 19 | .idea/ 20 | 21 | # The .vscode folder contains launch configuration and tasks you configure in 22 | # VS Code which you may wish to be included in version control, so this line 23 | # is commented out by default. 24 | #.vscode/ 25 | 26 | # Flutter/Dart/Pub related 27 | **/doc/api/ 28 | .dart_tool/ 29 | .flutter-plugins 30 | .flutter-plugins-dependencies 31 | .packages 32 | .pub-cache/ 33 | .pub/ 34 | /build/ 35 | 36 | # Web related 37 | lib/generated_plugin_registrant.dart 38 | 39 | # Exceptions to above rules. 40 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 41 | 42 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: bbfbf1770cca2da7c82e887e4e4af910034800b6 8 | channel: stable 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 aliyoge 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flutter_file_preview 2 | 3 | PDF, Word, Excel, and PowerPoint Viewer For Flutter App 4 | 5 | ## Getting Started 6 | 7 | 这是一个`Flutter`的Office文件预览插件。 8 | 9 | 支持同时支持本地和在线PDF、Word、Excel、PowerPoint等文件预览。 10 | 11 | `Android`使用的是[TBS(腾讯浏览服务)](https://x5.tencent.com/tbs/guide/sdkInit.html) 12 | 13 | `iOS`使用的是原生`WKWebView` 14 | 15 | ![demo](./screenshot/demo.gif) 16 | 17 | ## 使用方法 18 | 19 | pubspec.yaml中添加 20 | 21 | ``` 22 | file_preview: 23 | git: 24 | url: git://github.com/aliyoge/flutter_file_preview.git 25 | ``` 26 | 27 | 在文件中使用 28 | 29 | ``` 30 | import 'package:flutter_file_preview/flutter_file_preview.dart'; 31 | 32 | # 预览在线文件 33 | FlutterFilePreview.openFile("http://www.xxx.com/1245.pdf", title: 'Online PDF'); 34 | 35 | # 预览本地文件 36 | FilePreview.openFile("/storage/emulated/0/Download/20180715.pdf", title: 'Local PDF'); 37 | ``` 38 | 39 | ## 常见问题 40 | 41 | For help getting started with Flutter, view our online 42 | [documentation](https://flutter.io/). 43 | 44 | For help on editing plugin code, view the [documentation](https://flutter.io/platform-plugins/#edit-code). -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | group 'com.zzaning.flutter_file_preview' 2 | version '1.0' 3 | 4 | buildscript { 5 | repositories { 6 | google() 7 | jcenter() 8 | } 9 | 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:3.5.0' 12 | } 13 | } 14 | 15 | rootProject.allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | apply plugin: 'com.android.library' 23 | 24 | android { 25 | compileSdkVersion 28 26 | 27 | defaultConfig { 28 | minSdkVersion 17 29 | } 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | compileOptions { 34 | sourceCompatibility JavaVersion.VERSION_1_8 35 | targetCompatibility JavaVersion.VERSION_1_8 36 | } 37 | dependencies { 38 | api 'com.tencent.tbs.tbssdk:sdk:43903' 39 | implementation 'androidx.appcompat:appcompat:1.2.0' 40 | implementation 'androidx.annotation:annotation:1.1.0' 41 | implementation 'pub.devrel:easypermissions:1.2.0' 42 | implementation 'com.squareup.okio:okio:1.13.0' 43 | implementation 'com.squareup.okhttp3:okhttp:3.10.0' 44 | implementation 'com.squareup.retrofit2:retrofit:2.1.0' 45 | implementation 'com.squareup.retrofit2:converter-gson:2.1.0' 46 | api 'com.wuhenzhizao:titlebar:1.2.0' 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'flutter_file_preview' 2 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 18 | 19 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /android/src/main/java/com/zzaning/flutter_file_preview/FileDisplayActivity.java: -------------------------------------------------------------------------------- 1 | package com.zzaning.flutter_file_preview; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.content.res.Configuration; 6 | import android.os.Bundle; 7 | import android.os.Environment; 8 | import android.os.Handler; 9 | import android.os.Message; 10 | import android.text.TextUtils; 11 | import android.util.Log; 12 | import android.view.View; 13 | import android.webkit.JavascriptInterface; 14 | import android.widget.RelativeLayout; 15 | 16 | import androidx.appcompat.app.AppCompatActivity; 17 | 18 | import com.tencent.smtt.sdk.TbsReaderView; 19 | import com.wuhenzhizao.titlebar.widget.CommonTitleBar; 20 | 21 | import java.io.File; 22 | import java.io.FileOutputStream; 23 | import java.io.IOException; 24 | import java.io.InputStream; 25 | 26 | import okhttp3.ResponseBody; 27 | import retrofit2.Call; 28 | import retrofit2.Callback; 29 | import retrofit2.Response; 30 | 31 | public class FileDisplayActivity extends AppCompatActivity { 32 | private String TAG = "log | flutter_file_preview | "; 33 | protected boolean isStatusBar = true; 34 | // private LeftTitleLayout leftBackLtl; 35 | private CommonTitleBar titleBar; 36 | private TBSWebView x5WebView; 37 | private RelativeLayout rlRoot; 38 | private String url; 39 | private TbsReaderView tbsReaderView; 40 | 41 | public static void show(Context context, String url, boolean isOpenFile, String title) { 42 | Intent intent = new Intent(context, FileDisplayActivity.class); 43 | Bundle bundle = new Bundle(); 44 | bundle.putSerializable("url", url); 45 | bundle.putSerializable("isOpenFile", isOpenFile); 46 | bundle.putSerializable("title", title); 47 | intent.putExtras(bundle); 48 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 49 | context.startActivity(intent); 50 | } 51 | 52 | protected int getContentViewId() { 53 | return R.layout.act_common_webview; 54 | } 55 | 56 | protected void initView() { 57 | String title = getIntent().getStringExtra("title"); 58 | boolean isOpenFile = getIntent().getBooleanExtra("isOpenFile", false); 59 | url = getIntent().getStringExtra("url"); 60 | titleBar.getCenterTextView().setText(title); 61 | // leftBackLtl.setTitle(title).leftFinish(true); 62 | x5WebView.addJavascriptInterface(new JsObject(), "android"); 63 | //是否打开文件 64 | handler.sendEmptyMessageDelayed(1001, 500); 65 | //打开文件 66 | if (!TextUtils.isEmpty(url) && isOpenFile) { 67 | tbsReaderView = new TbsReaderView(this, readerCallback); 68 | handler.removeMessages(1001); 69 | rlRoot.addView(tbsReaderView, new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT)); 70 | getFilePathAndShowFile(); 71 | } 72 | } 73 | 74 | private void getFilePathAndShowFile() { 75 | if (url.startsWith("http")) {// 网络地址要先下载 76 | downLoadFromNet(url); 77 | } else { 78 | openFile(new File(url)); 79 | } 80 | } 81 | 82 | private void downLoadFromNet(final String url) { 83 | //1.网络下载、存储路径、 84 | File cacheFile = getCacheFile(url); 85 | if (cacheFile.exists()) { 86 | if (cacheFile.length() <= 0) { 87 | Log.d(TAG, "删除空文件!!"); 88 | cacheFile.delete(); 89 | return; 90 | } 91 | } 92 | 93 | LoadFileModel.loadPdfFile(url, new Callback() { 94 | @Override 95 | public void onResponse(Call call, Response response) { 96 | Log.d(TAG, "下载文件-->onResponse"); 97 | boolean flag; 98 | InputStream is = null; 99 | byte[] buf = new byte[2048]; 100 | int len = 0; 101 | FileOutputStream fos = null; 102 | try { 103 | ResponseBody responseBody = response.body(); 104 | is = responseBody.byteStream(); 105 | long total = responseBody.contentLength(); 106 | 107 | File file1 = getCacheDir(url); 108 | if (!file1.exists()) { 109 | file1.mkdirs(); 110 | Log.d(TAG, "创建缓存目录: " + file1.toString()); 111 | } 112 | 113 | //fileN : /storage/emulated/0/pdf/kauibao20170821040512.pdf 114 | File fileN = getCacheFile(url); //new File(getCacheDir(url), getFileName(url)) 115 | 116 | Log.d(TAG, "创建缓存文件: " + fileN.toString()); 117 | if (!fileN.exists()) { 118 | boolean mkdir = fileN.createNewFile(); 119 | } 120 | fos = new FileOutputStream(fileN); 121 | long sum = 0; 122 | while ((len = is.read(buf)) != -1) { 123 | fos.write(buf, 0, len); 124 | sum += len; 125 | int progress = (int) (sum * 1.0f / total * 100); 126 | Log.d(TAG, "写入缓存文件" + fileN.getName() + "进度: " + progress); 127 | } 128 | fos.flush(); 129 | Log.d(TAG, "文件下载成功,准备展示文件。"); 130 | //2.ACache记录文件的有效期 131 | openFile(fileN); 132 | } catch (Exception e) { 133 | Log.d(TAG, "文件下载异常 = " + e.toString()); 134 | } finally { 135 | try { 136 | if (is != null) 137 | is.close(); 138 | } catch (IOException e) { 139 | } 140 | try { 141 | if (fos != null) 142 | fos.close(); 143 | } catch (IOException e) { 144 | } 145 | } 146 | } 147 | 148 | @Override 149 | public void onFailure(Call call, Throwable t) { 150 | Log.d(TAG, "文件下载失败"); 151 | File file = getCacheFile(url); 152 | if (!file.exists()) { 153 | Log.d(TAG, "删除下载失败文件"); 154 | file.delete(); 155 | } 156 | } 157 | }); 158 | } 159 | 160 | private void openFile(File file) { 161 | if (file != null && !TextUtils.isEmpty(file.toString())) { 162 | //增加下面一句解决没有TbsReaderTemp文件夹存在导致加载文件失败 163 | String bsReaderTemp = "/storage/emulated/0/TbsReaderTemp"; 164 | File bsReaderTempFile = new File(bsReaderTemp); 165 | if (!bsReaderTempFile.exists()) { 166 | Log.d(TAG, "准备创建/storage/emulated/0/TbsReaderTemp!!"); 167 | boolean mkdir = bsReaderTempFile.mkdir(); 168 | if (!mkdir) { 169 | Log.e(TAG, "创建/storage/emulated/0/TbsReaderTemp失败!!!!!"); 170 | } 171 | } 172 | //加载文件 173 | Bundle localBundle = new Bundle(); 174 | Log.d(TAG, file.toString()); 175 | localBundle.putString("filePath", file.toString()); 176 | localBundle.putString("tempPath", Environment.getExternalStorageDirectory() + "/" + "TbsReaderTemp"); 177 | boolean bool = this.tbsReaderView.preOpen(getFileType(file.toString()), false); 178 | if (bool) { 179 | this.tbsReaderView.openFile(localBundle); 180 | } 181 | } else { 182 | Log.e(TAG, "文件路径无效!"); 183 | } 184 | } 185 | 186 | private File getCacheDir(String url) { 187 | return new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/007/"); 188 | } 189 | 190 | private File getCacheFile(String url) { 191 | File cacheFile = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/007/" 192 | + getFileName(url)); 193 | Log.d(TAG, "缓存文件 = " + cacheFile.toString()); 194 | return cacheFile; 195 | } 196 | 197 | private String getFileName(String url) { 198 | return Md5Tool.hashKey(url) + "." + getFileType(url); 199 | } 200 | 201 | private String getFileType(String paramString) { 202 | String str = ""; 203 | 204 | if (TextUtils.isEmpty(paramString)) { 205 | Log.d(TAG, "paramString---->null"); 206 | return str; 207 | } 208 | Log.d(TAG, "paramString:" + paramString); 209 | int i = paramString.lastIndexOf('.'); 210 | if (i <= -1) { 211 | Log.d(TAG, "i <= -1"); 212 | return str; 213 | } 214 | 215 | str = paramString.substring(i + 1); 216 | Log.d(TAG, "paramString.substring(i + 1)------>" + str); 217 | return str; 218 | } 219 | 220 | private String parseFormat(String fileName) { 221 | return fileName.substring(fileName.lastIndexOf(".") + 1); 222 | } 223 | 224 | private String parseName(String url) { 225 | String fileName = null; 226 | try { 227 | fileName = url.substring(url.lastIndexOf("/") + 1); 228 | } finally { 229 | if (TextUtils.isEmpty(fileName)) { 230 | fileName = String.valueOf(System.currentTimeMillis()); 231 | } 232 | } 233 | return fileName; 234 | } 235 | 236 | TbsReaderView.ReaderCallback readerCallback = new TbsReaderView.ReaderCallback() { 237 | @Override 238 | public void onCallBackAction(Integer integer, Object o, Object o1) { 239 | 240 | } 241 | }; 242 | Handler handler = new Handler(new Handler.Callback() { 243 | @Override 244 | public boolean handleMessage(Message message) { 245 | if (message.what == 1001) { 246 | x5WebView.loadUrl(url); 247 | } 248 | return false; 249 | } 250 | }); 251 | 252 | @Override 253 | public void onConfigurationChanged(Configuration newConfig) { 254 | super.onConfigurationChanged(newConfig); 255 | } 256 | 257 | @Override 258 | public void finish() { 259 | super.finish(); 260 | overridePendingTransition(0, R.anim.activity_exit); 261 | } 262 | 263 | @Override 264 | protected void onResume() { 265 | super.onResume(); 266 | x5WebView.onResume(); 267 | } 268 | 269 | @Override 270 | protected void onPause() { 271 | super.onPause(); 272 | 273 | x5WebView.onPause(); 274 | } 275 | 276 | @Override 277 | protected void onDestroy() { 278 | handler.removeMessages(1001); 279 | handler = null; 280 | x5WebView.reload(); 281 | //销毁 282 | x5WebView.clearCache(true); 283 | x5WebView.clearFormData(); 284 | x5WebView.destroy(); 285 | if (tbsReaderView != null) tbsReaderView.onStop(); 286 | super.onDestroy(); 287 | } 288 | 289 | @Override 290 | protected void onCreate(Bundle savedInstanceState) { 291 | super.onCreate(savedInstanceState); 292 | //设置状态栏透明度 293 | if (isStatusBar) { 294 | StatusNavBar.with(this).statusBarColor(R.color.transparent).statusBarDarkFont(true).navigationBarColor(R.color.black_degree_50).init(); 295 | } 296 | setContentView(getContentViewId()); 297 | // 隐藏action bar 298 | if (getSupportActionBar() != null) { 299 | getSupportActionBar().hide(); 300 | } 301 | // leftBackLtl = findViewById(R.id.left_back_ltl); 302 | titleBar = findViewById(R.id.titlebar); 303 | x5WebView = findViewById(R.id.x5WebView); 304 | rlRoot = findViewById(R.id.rl_root); 305 | titleBar.setListener(new CommonTitleBar.OnTitleBarListener() { 306 | @Override 307 | public void onClicked(View v, int action, String extra) { 308 | if (action == CommonTitleBar.ACTION_LEFT_BUTTON) { 309 | finish(); 310 | } 311 | } 312 | }); 313 | initView(); 314 | } 315 | 316 | static class JsObject { 317 | @JavascriptInterface 318 | public void navigateTo(String jsonData) {//活动专题可能和移动端的交互 319 | } 320 | } 321 | } -------------------------------------------------------------------------------- /android/src/main/java/com/zzaning/flutter_file_preview/FlutterFilePreviewPlugin.java: -------------------------------------------------------------------------------- 1 | package com.zzaning.flutter_file_preview; 2 | 3 | import android.Manifest; 4 | import android.app.Activity; 5 | import android.content.Context; 6 | import android.util.Log; 7 | 8 | import androidx.annotation.NonNull; 9 | 10 | import com.tencent.smtt.export.external.TbsCoreSettings; 11 | import com.tencent.smtt.sdk.QbSdk; 12 | 13 | import java.util.HashMap; 14 | 15 | import io.flutter.embedding.engine.plugins.FlutterPlugin; 16 | import io.flutter.embedding.engine.plugins.activity.ActivityAware; 17 | import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding; 18 | import io.flutter.plugin.common.MethodCall; 19 | import io.flutter.plugin.common.MethodChannel; 20 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler; 21 | import io.flutter.plugin.common.MethodChannel.Result; 22 | import io.flutter.plugin.common.PluginRegistry.Registrar; 23 | import pub.devrel.easypermissions.EasyPermissions; 24 | 25 | public class FlutterFilePreviewPlugin implements FlutterPlugin, MethodCallHandler, ActivityAware { 26 | private MethodChannel channel; 27 | private String TAG = "log | flutter_file_preview | "; 28 | private Context context; 29 | private Activity activity; 30 | 31 | @Override 32 | public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) { 33 | channel = new MethodChannel(flutterPluginBinding.getFlutterEngine().getDartExecutor(), "flutter_file_preview"); 34 | channel.setMethodCallHandler(this); 35 | context = flutterPluginBinding.getApplicationContext(); 36 | initQbSdk(); 37 | } 38 | 39 | public static void registerWith(Registrar registrar) { 40 | final MethodChannel channel = new MethodChannel(registrar.messenger(), "flutter_file_preview"); 41 | FlutterFilePreviewPlugin plugin = new FlutterFilePreviewPlugin(); 42 | channel.setMethodCallHandler(plugin); 43 | plugin.context = registrar.context(); 44 | plugin.activity = registrar.activity(); 45 | plugin.initQbSdk(); 46 | } 47 | 48 | /* 监听Activity*/ 49 | @Override 50 | public void onAttachedToActivity(@NonNull ActivityPluginBinding binding) { 51 | this.activity = binding.getActivity(); 52 | } 53 | 54 | @Override 55 | public void onDetachedFromActivityForConfigChanges() { 56 | // the Activity your plugin was attached to was destroyed to change configuration. 57 | // This call will be followed by onReattachedToActivityForConfigChanges(). 58 | } 59 | 60 | @Override 61 | public void onReattachedToActivityForConfigChanges(ActivityPluginBinding binding) { 62 | // your plugin is now attached to a new Activity after a configuration change. 63 | this.activity = binding.getActivity(); 64 | } 65 | 66 | @Override 67 | public void onDetachedFromActivity() { 68 | // your plugin is no longer associated with an Activity. Clean up references. 69 | } 70 | 71 | private void initQbSdk() { 72 | // 首次初始化冷启动优化 73 | // 在调用TBS初始化、创建WebView之前进行如下配置 74 | HashMap map = new HashMap(); 75 | map.put(TbsCoreSettings.TBS_SETTINGS_USE_SPEEDY_CLASSLOADER, true); 76 | map.put(TbsCoreSettings.TBS_SETTINGS_USE_DEXLOADER_SERVICE, true); 77 | QbSdk.initTbsSettings(map); 78 | 79 | QbSdk.setDownloadWithoutWifi(true); 80 | QbSdk.initX5Environment(context, new QbSdk.PreInitCallback() { 81 | @Override 82 | public void onCoreInitFinished() { 83 | //x5内核初始化完成回调接口,此接口回调并表示已经加载起来了x5,有可能特殊情况下x5内核加载失败,切换到系统内核。 84 | Log.d(TAG, "初始化X5成功"); 85 | } 86 | 87 | @Override 88 | public void onViewInitFinished(boolean b) { 89 | //x5內核初始化完成的回调,为true表示x5内核加载成功,否则表示x5内核加载失败,会自动切换到系统内核。 90 | Log.e(TAG, "加载内核是否成功:" + b); 91 | } 92 | }); 93 | } 94 | 95 | @Override 96 | public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) { 97 | switch (call.method) { 98 | case "openFile": 99 | String[] perms = {Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE}; 100 | String filePath = call.argument("path"); 101 | String title = call.argument("title"); 102 | if (!EasyPermissions.hasPermissions(context, perms)) { 103 | EasyPermissions.requestPermissions(activity, "需要访问手机存储权限", 10086, perms); 104 | } else { 105 | FileDisplayActivity.show(context, filePath, true, title); 106 | } 107 | result.success("done"); 108 | break; 109 | case "openDebug": 110 | FileDisplayActivity.show(context, "http://debugtbs.qq.com", false, "X5 Core Debug"); 111 | result.success("done"); 112 | break; 113 | case "getPlatformVersion": 114 | result.success("Android " + android.os.Build.VERSION.RELEASE); 115 | break; 116 | default: 117 | result.notImplemented(); 118 | break; 119 | } 120 | } 121 | 122 | @Override 123 | public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) { 124 | channel.setMethodCallHandler(null); 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /android/src/main/java/com/zzaning/flutter_file_preview/LeftTitleLayout.java: -------------------------------------------------------------------------------- 1 | package com.zzaning.flutter_file_preview; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.util.AttributeSet; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.widget.FrameLayout; 9 | import android.widget.ImageView; 10 | import android.widget.LinearLayout; 11 | import android.widget.RelativeLayout; 12 | import android.widget.TextView; 13 | 14 | /** 15 | * 左title 16 | */ 17 | public class LeftTitleLayout extends FrameLayout { 18 | 19 | private ImageView leftBack; 20 | private TextView leftTitleTv; 21 | private LinearLayout leftLl; 22 | private TextView middleTitleTv; 23 | private TextView rightTitleTv; 24 | private ImageView rightTitleIv; 25 | private RelativeLayout rightLl; 26 | private Context mContext; 27 | private boolean leftFinish = true; 28 | 29 | public LeftTitleLayout(Context context) { 30 | this(context, null, 0); 31 | } 32 | 33 | public LeftTitleLayout(Context context, AttributeSet attrs) { 34 | this(context, attrs, 0); 35 | } 36 | 37 | public LeftTitleLayout(Context context, AttributeSet attrs, int defStyleAttr) { 38 | super(context, attrs, defStyleAttr); 39 | this.mContext = context; 40 | initView(); 41 | } 42 | 43 | public void initView() { 44 | LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 45 | View view = inflater.inflate(R.layout.left_title_layout, null, false); 46 | addView(view); 47 | leftBack = findViewById(R.id.left_back); 48 | leftTitleTv = findViewById(R.id.left_title_tv); 49 | leftLl = findViewById(R.id.left_ll); 50 | middleTitleTv = findViewById(R.id.middle_title_tv); 51 | rightTitleTv = findViewById(R.id.right_title_tv); 52 | rightTitleIv = findViewById(R.id.right_title_iv); 53 | rightLl = findViewById(R.id.right_ll); 54 | leftLl.setOnClickListener(v -> { 55 | if (leftFinish) { 56 | ((Activity) mContext).finish(); 57 | } else { 58 | if (specialLeftFinish != null) { 59 | specialLeftFinish.specialLeftOption(); 60 | } 61 | } 62 | }); 63 | } 64 | 65 | private SpecialLeftOptionListener specialLeftFinish; 66 | 67 | public void setSpecialLeftFinish(SpecialLeftOptionListener specialLeftFinish) { 68 | this.leftFinish = false; 69 | this.specialLeftFinish = specialLeftFinish; 70 | } 71 | 72 | public interface SpecialLeftOptionListener { 73 | void specialLeftOption(); 74 | } 75 | 76 | /** 77 | * 获取左边返回控件 78 | */ 79 | public LinearLayout getLeftLlLayout() { 80 | return leftLl; 81 | } 82 | 83 | 84 | /** 85 | * 获取有右边textView 86 | */ 87 | public TextView getRightTextView() { 88 | return rightTitleTv; 89 | } 90 | 91 | /** 92 | * 获取右边总布局,设置点击事件 93 | */ 94 | public RelativeLayout getRightRl() { 95 | return rightLl; 96 | } 97 | 98 | /** 99 | * 获取中间textView 100 | */ 101 | public TextView getTitleTextView() { 102 | return middleTitleTv; 103 | } 104 | 105 | 106 | public LeftTitleLayout setTitleTextColor(int color) { 107 | middleTitleTv.setTextColor(color); 108 | return this; 109 | } 110 | 111 | public LeftTitleLayout setRightTextColor(int color) { 112 | rightTitleTv.setTextColor(color); 113 | return this; 114 | } 115 | 116 | public LeftTitleLayout setRightText(String text) { 117 | rightTitleTv.setVisibility(VISIBLE); 118 | rightTitleTv.setText(text); 119 | return this; 120 | } 121 | 122 | public LeftTitleLayout setRightImage(int rightImg) { 123 | rightTitleIv.setVisibility(VISIBLE); 124 | rightTitleIv.setImageResource(rightImg); 125 | return this; 126 | } 127 | 128 | /** 129 | * 设置数据 130 | */ 131 | public LeftTitleLayout item(int res, String title) { 132 | leftBack.setBackgroundResource(res); 133 | leftTitleTv.setText(title); 134 | return this; 135 | } 136 | 137 | /** 138 | * 设置是否按返回键关闭页面 139 | */ 140 | public LeftTitleLayout leftFinish(boolean isFinish) { 141 | this.leftFinish = isFinish; 142 | return this; 143 | } 144 | 145 | /** 146 | * 设置中间标题 147 | */ 148 | public LeftTitleLayout setTitle(String title) { 149 | middleTitleTv.setText(title); 150 | return this; 151 | } 152 | 153 | /** 154 | * 改变返回按钮的颜色 155 | */ 156 | public LeftTitleLayout setLeftColorFilter(int color) { 157 | leftBack.setColorFilter(getResources().getColor(color)); 158 | return this; 159 | } 160 | 161 | } 162 | -------------------------------------------------------------------------------- /android/src/main/java/com/zzaning/flutter_file_preview/LoadFileApi.java: -------------------------------------------------------------------------------- 1 | package com.zzaning.flutter_file_preview; 2 | 3 | import okhttp3.ResponseBody; 4 | import retrofit2.Call; 5 | import retrofit2.http.GET; 6 | import retrofit2.http.Url; 7 | 8 | public interface LoadFileApi { 9 | @GET 10 | Call loadPdfFile(@Url String fileUrl); 11 | } 12 | -------------------------------------------------------------------------------- /android/src/main/java/com/zzaning/flutter_file_preview/LoadFileModel.java: -------------------------------------------------------------------------------- 1 | package com.zzaning.flutter_file_preview; 2 | 3 | import android.text.TextUtils; 4 | 5 | import okhttp3.ResponseBody; 6 | import retrofit2.Call; 7 | import retrofit2.Callback; 8 | import retrofit2.Retrofit; 9 | import retrofit2.converter.gson.GsonConverterFactory; 10 | 11 | public class LoadFileModel { 12 | public static void loadPdfFile(String url, Callback callback) { 13 | Retrofit retrofit = new Retrofit.Builder() 14 | .baseUrl("https://www.baidu.com/") 15 | .addConverterFactory(GsonConverterFactory.create()) 16 | .build(); 17 | LoadFileApi mLoadFileApi = retrofit.create(LoadFileApi.class); 18 | if (!TextUtils.isEmpty(url)) { 19 | Call call = mLoadFileApi.loadPdfFile(url); 20 | call.enqueue(callback); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /android/src/main/java/com/zzaning/flutter_file_preview/Md5Tool.java: -------------------------------------------------------------------------------- 1 | package com.zzaning.flutter_file_preview; 2 | 3 | import java.security.MessageDigest; 4 | import java.security.NoSuchAlgorithmException; 5 | 6 | public class Md5Tool { 7 | 8 | private static String bytesToHexString(byte[] bytes) { 9 | StringBuilder sb = new StringBuilder(); 10 | for (int i = 0; i < bytes.length; i++) { 11 | String hex = Integer.toHexString(0xFF & bytes[i]); 12 | if (hex.length() == 1) { 13 | sb.append('0'); 14 | } 15 | sb.append(hex); 16 | } 17 | return sb.toString(); 18 | } 19 | 20 | public static String hashKey(String key) { 21 | String hashKey; 22 | try { 23 | final MessageDigest mDigest = MessageDigest.getInstance("MD5"); 24 | mDigest.update(key.getBytes()); 25 | hashKey = bytesToHexString(mDigest.digest()); 26 | } catch (NoSuchAlgorithmException e) { 27 | hashKey = String.valueOf(key.hashCode()); 28 | } 29 | return hashKey; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /android/src/main/java/com/zzaning/flutter_file_preview/TBSWebView.java: -------------------------------------------------------------------------------- 1 | package com.zzaning.flutter_file_preview; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.graphics.Bitmap; 6 | import android.graphics.drawable.Drawable; 7 | import android.net.Uri; 8 | import android.os.Build; 9 | import android.text.TextUtils; 10 | import android.util.AttributeSet; 11 | import android.view.KeyEvent; 12 | import android.widget.AbsoluteLayout; 13 | import android.widget.ProgressBar; 14 | 15 | import com.tencent.smtt.export.external.interfaces.SslErrorHandler; 16 | import com.tencent.smtt.export.external.interfaces.WebResourceError; 17 | import com.tencent.smtt.export.external.interfaces.WebResourceRequest; 18 | import com.tencent.smtt.export.external.interfaces.WebResourceResponse; 19 | import com.tencent.smtt.sdk.DownloadListener; 20 | import com.tencent.smtt.sdk.WebChromeClient; 21 | import com.tencent.smtt.sdk.WebSettings; 22 | import com.tencent.smtt.sdk.WebView; 23 | import com.tencent.smtt.sdk.WebViewClient; 24 | 25 | public class TBSWebView extends WebView { 26 | private ProgressBar progressbar; //进度条 27 | private int progressHeight = 5; //进度条的高度,默认10px 28 | private Context mContext; 29 | private boolean isShowProgressbar = true;//是否显示进度条 30 | 31 | public TBSWebView(Context context) { 32 | super(context); 33 | this.mContext = context; 34 | initView(context); 35 | } 36 | 37 | public TBSWebView(Context context, AttributeSet attributeSet) { 38 | super(context, attributeSet); 39 | this.mContext = context; 40 | initView(context); 41 | } 42 | 43 | private void initView(Context context) { 44 | startTime = System.currentTimeMillis(); 45 | 46 | //开启js脚本支持 47 | WebSettings settings = getSettings(); 48 | settings.setJavaScriptEnabled(true); 49 | 50 | //创建进度条 51 | progressbar = new ProgressBar(context, null, 52 | android.R.attr.progressBarStyleHorizontal); 53 | //设置加载进度条的高度 54 | progressbar.setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.MATCH_PARENT, progressHeight, 0, 0)); 55 | 56 | Drawable drawable = context.getResources().getDrawable(R.drawable.webview_progress_drawable); 57 | progressbar.setProgressDrawable(drawable); 58 | 59 | //添加进度到WebView 60 | addView(progressbar); 61 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { 62 | settings.setMixedContentMode(android.webkit.WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); 63 | } 64 | //适配手机大小 65 | settings.setUseWideViewPort(true); 66 | settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS); 67 | settings.setLoadWithOverviewMode(true); 68 | settings.setSupportZoom(true); 69 | settings.setBuiltInZoomControls(true); 70 | settings.setDisplayZoomControls(false); 71 | settings.setGeolocationEnabled(true); 72 | String dir = context.getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath(); 73 | settings.setGeolocationDatabasePath(dir); 74 | // enable Web Storage: localStorage, sessionStorage 75 | settings.setDomStorageEnabled(true); 76 | // 设置 缓存模式 77 | // s.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); 78 | // 设置 缓存模式 79 | settings.setAppCacheMaxSize(1024 * 1024 * 15);// 设置缓冲大小,我设的是15M 80 | String cacheDirPath = context.getFilesDir().getAbsolutePath() + "cache/"; 81 | settings.setAppCachePath(cacheDirPath); 82 | // 开启 Application Caches 功能 83 | settings.setAppCacheEnabled(true); 84 | // 设置 Application Caches 缓存目录 85 | settings.setAppCachePath(cacheDirPath); 86 | settings.setAllowFileAccess(true); 87 | // 触摸焦点起作用 88 | requestFocus(); 89 | setWebChromeClient(new WVChromeClient()); 90 | setWebViewClient(new WVClient()); 91 | 92 | setDownloadListener(new DownloadListener() { 93 | @Override 94 | public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, 95 | long contentLength) { 96 | Uri uri = Uri.parse(url); 97 | Intent intent = new Intent(Intent.ACTION_VIEW, uri); 98 | mContext.startActivity(intent); 99 | } 100 | }); 101 | 102 | } 103 | 104 | @Override 105 | public void loadUrl(String s) { 106 | if (TextUtils.isEmpty(s)) { 107 | return; 108 | } 109 | //设置cookie 110 | // SystemUtils.synCookies(AppApplication.getInstance(), s); 111 | super.loadUrl(s); 112 | } 113 | 114 | /** 115 | * 是否显示进度条===默认显示 116 | * 117 | * @param flagBar 118 | */ 119 | public void isShowProgressBar(boolean flagBar) { 120 | this.isShowProgressbar = flagBar; 121 | } 122 | 123 | @Override 124 | public boolean onKeyDown(int keyCode, KeyEvent event) { 125 | if (keyCode == KeyEvent.KEYCODE_BACK) { 126 | if (canGoBack()) { 127 | goBack(); 128 | return true; 129 | } 130 | } 131 | return super.onKeyDown(keyCode, event); 132 | } 133 | 134 | //进度显示 135 | private class WVChromeClient extends WebChromeClient { 136 | @Override 137 | public void onProgressChanged(WebView view, int newProgress) { 138 | if (isShowProgressbar) { 139 | if (newProgress == 100) { 140 | progressbar.setVisibility(GONE); 141 | } else { 142 | if (progressbar.getVisibility() == GONE) 143 | progressbar.setVisibility(VISIBLE); 144 | progressbar.setProgress(newProgress); 145 | } 146 | } else { 147 | progressbar.setVisibility(GONE); 148 | } 149 | super.onProgressChanged(view, newProgress); 150 | } 151 | 152 | @Override 153 | public void onReceivedTitle(WebView webView, String s) { 154 | super.onReceivedTitle(webView, s); 155 | if (mListener != null) { 156 | mListener.onReceivedTitle(s); 157 | } 158 | 159 | } 160 | } 161 | 162 | private long startTime; 163 | 164 | private class WVClient extends WebViewClient { 165 | 166 | @Override 167 | public void onPageStarted(WebView webView, String s, Bitmap bitmap) { 168 | super.onPageStarted(webView, s, bitmap); 169 | if (mListener != null) { 170 | mListener.onStart(); 171 | } 172 | // ToastUtils.getInstance().showToast("耗时=" + (System.currentTimeMillis() - startTime)); 173 | } 174 | 175 | @Override 176 | public boolean shouldOverrideUrlLoading(WebView view, String url) { 177 | // LogUtil.e("shouldOverrideUrlLoading===" + url); 178 | //这里需要写成false,true会导致h5中的二级界面可能无法跳转 179 | return false; 180 | } 181 | 182 | @Override 183 | public WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) { 184 | // synCookies(webView.getContext(), webResourceRequest.getUrl().toString()); 185 | return super.shouldInterceptRequest(webView, webResourceRequest); 186 | } 187 | 188 | @Override 189 | public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, com.tencent.smtt.export.external.interfaces.SslError sslError) { 190 | super.onReceivedSslError(webView, sslErrorHandler, sslError); 191 | //设置接收所有证书 192 | sslErrorHandler.proceed(); 193 | } 194 | 195 | @Override 196 | public void onReceivedError(WebView webView, WebResourceRequest webResourceRequest, WebResourceError webResourceError) { 197 | super.onReceivedError(webView, webResourceRequest, webResourceError); 198 | if (mListener != null) { 199 | mListener.onLoadError(); 200 | } 201 | } 202 | 203 | @Override 204 | public void onPageFinished(WebView view, String url) { 205 | // LogUtil.e("onPageFinished===" + url); 206 | // ToastUtils.getInstance().showToast("耗时=" + (System.currentTimeMillis() - startTime)); 207 | progressbar.setVisibility(GONE); 208 | if (mListener != null) { 209 | mListener.onPageFinish(view); 210 | } 211 | super.onPageFinished(view, url); 212 | 213 | } 214 | 215 | } 216 | 217 | private OnWebViewListener mListener; 218 | 219 | public void setOnWebViewListener(OnWebViewListener listener) { 220 | this.mListener = listener; 221 | } 222 | 223 | //进度回调接口 224 | public interface OnWebViewListener { 225 | void onStart(); 226 | 227 | void onLoadError(); 228 | 229 | void onPageFinish(WebView view); 230 | 231 | void onReceivedTitle(String title); 232 | } 233 | } 234 | -------------------------------------------------------------------------------- /android/src/main/res/anim/activity_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/webview_progress_drawable.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /android/src/main/res/layout/act_common_webview.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 14 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/src/main/res/layout/left_title_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 12 | 13 | 16 | 17 | 23 | 24 | 32 | 33 | 43 | 44 | 45 | 56 | 57 | 65 | 66 | 76 | 77 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /android/src/main/res/mipmap-xxhdpi/ic_back4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/android/src/main/res/mipmap-xxhdpi/ic_back4.png -------------------------------------------------------------------------------- /android/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /android/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /android/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 需要访问手机存储权限 3 | -------------------------------------------------------------------------------- /android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/src/main/res/values/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #f8f8f8 4 | #eeeeee 5 | #359FFF 6 | #ff000000 7 | #E6333333 8 | #1A000000 9 | #00000000 10 | #1F000000 11 | #08000000 12 | #4D000000 13 | #66000000 14 | #70000000 15 | #0D000000 16 | #80000000 17 | #8F000000 18 | #99000000 19 | #B3000000 20 | #CC000000 21 | #7f000000 22 | #67B1E6 23 | #67B1E6 24 | #65BCFF 25 | #FF4081 26 | #3F51B5 27 | #303F9F 28 | #323232 29 | #ff333333 30 | #65A6FF 31 | #ff666666 32 | #6FBBFF 33 | #8F9297 34 | #9096E2 35 | #999999 36 | #BBBBBB 37 | #dddddd 38 | #ffeeeeee 39 | #f5f5f5 40 | #fff6f6f6 41 | #F7AF39 42 | #f8f8f8 43 | #F9F9F9 44 | #fafafa 45 | #FF739A 46 | #FF7699 47 | #FFD0DC 48 | #F6F6F6 49 | #25a0f5 50 | #70CC14 51 | #A0D768 52 | #c0ffbd21 53 | #CCFD674F 54 | #b0000000 55 | #20000000 56 | #40000000 57 | #80000000 58 | #60000000 59 | #00000000 60 | #121212 61 | #151515 62 | #173864 63 | #24222D 64 | #242424 65 | #24252c 66 | #2A2A2A 67 | #313233 68 | #323027 69 | #33000000 70 | #333128 71 | #333333 72 | #33ffffff 73 | #38312B 74 | #B33A3A3A 75 | #3F3F3F 76 | #424345 77 | #42C1A7 78 | #444444 79 | #47528A 80 | #48A9CE 81 | #4A4A4A 82 | #4F4D50 83 | #559FE0 84 | #57514F 85 | #5A584C 86 | #5A584C 87 | #62514F 88 | #625237 89 | #666666 90 | #685D4E 91 | #68A950 92 | #6F665D 93 | #717376 94 | #7CCC22 95 | #804F2D 96 | #808080 97 | #80ffffff 98 | #81C87F 99 | #838383 100 | #8B8D92 101 | #8EADCD 102 | #8F8F8F 103 | #919498 104 | #996B4B 105 | #999999 106 | #9F9F9F 107 | #A0A0A0 108 | #A39D96 109 | #A7A59B 110 | #AFA087 111 | #B7B7B7 112 | #B9B9B9 113 | #B9BCC0 114 | #BBBBBB 115 | #C0C0C0 116 | #C0C0C5 117 | #C1A888 118 | #C1C1C1 119 | #C4C4C4 120 | #C6C2C0 121 | #C8C8C8 122 | #CC7700 123 | #CCCCCC 124 | #CFE6D6 125 | #D0D0D0 126 | #D1D1D1 127 | #D4D4D4 128 | #D5D5D7 129 | #D8D8D8 130 | #D9C9B7 131 | #DDDDDD 132 | #DFDFDF 133 | #E3E3E3 134 | #E4E4E4 135 | #E5E5E5 136 | #E7E7E7 137 | #E9E9E9 138 | #EADCCB 139 | #EBEBEB 140 | #EC6267 141 | #ECD3B1 142 | #EDEDED 143 | #EEEEEE 144 | #EFD8B8 145 | #F0F0F0 146 | #F1F1F1 147 | #F2F2F2 148 | #F3F3F3 149 | #F3F4F5 150 | #F4E6D3 151 | #F5F3F2 152 | #F5FAFF 153 | #F6F6F6 154 | #F88742 155 | #F8F8F8 156 | #F9F9F9 157 | #FAF1E6 158 | #FAFAFA 159 | #FBFBFB 160 | #FCFAF7 161 | #FD674F 162 | #FF3628 163 | #FF5E45 164 | #FF756B 165 | #FF8647 166 | #FF996A 167 | #FF999999 168 | #FFA1A1 169 | #FFA500 170 | #FFAA9D 171 | #FFAEA1 172 | #FFDD93 173 | #FFE2B8 174 | #FFE3E4E8 175 | #FFE7E3 176 | #FFECD2 177 | #FFF0ED 178 | #FFF5DD 179 | #FFFCF8 180 | #000000 181 | #309CFA 182 | #5B9DE3 183 | #ccffffff 184 | #D4D4D4 185 | #dfdfdf 186 | #EE6B5C 187 | #F2F2F2 188 | #f4f4f4 189 | #f7f7f7 190 | #FC8457 191 | #fdeede 192 | #FF6358 193 | #ffa500 194 | #FFF7E6 195 | #C0C0C0 196 | #E0E0E0 197 | #71D290 198 | #D5EAFC 199 | #EEEEEE 200 | #FFF2F0 201 | #FD674F 202 | #FFFFFF 203 | #FF733E 204 | #60000000 205 | #FFAA33 206 | #CCCCCC 207 | #333333 208 | #ffffffff 209 | #4DFFFFFF 210 | #66FFFFFF 211 | #80FFFFFF 212 | #99FFFFFF 213 | #CCffffff 214 | #FF733E 215 | #4DFFAA33 216 | #99FFAA33 217 | #E5612E 218 | 219 | 0dp 220 | 1dp 221 | 10dp 222 | 11dp 223 | 12dp 224 | 13dp 225 | 14dp 226 | 15dp 227 | 16dp 228 | 17dp 229 | 18dp 230 | 19dp 231 | 2dp 232 | 20dp 233 | 21dp 234 | 22dp 235 | 23dp 236 | 24dp 237 | 25dp 238 | 26dp 239 | 27dp 240 | 28dp 241 | 29dp 242 | 3dp 243 | 30dp 244 | 31dp 245 | 32dp 246 | 33dp 247 | 34dp 248 | 35dp 249 | 36dp 250 | 37dp 251 | 38dp 252 | 39dp 253 | 4dp 254 | 40dp 255 | 41dp 256 | 42dp 257 | 43dp 258 | 44dp 259 | 45dp 260 | 46dp 261 | 47dp 262 | 48dp 263 | 49dp 264 | 5dp 265 | 50dp 266 | 51dp 267 | 52dp 268 | 53dp 269 | 54dp 270 | 55dp 271 | 56dp 272 | 57dp 273 | 58dp 274 | 59dp 275 | 6dp 276 | 60dp 277 | 61dp 278 | 62dp 279 | 63dp 280 | 64dp 281 | 65dp 282 | 66dp 283 | 67dp 284 | 68dp 285 | 69dp 286 | 7dp 287 | 70dp 288 | 71dp 289 | 72dp 290 | 73dp 291 | 74dp 292 | 75dp 293 | 76dp 294 | 77dp 295 | 78dp 296 | 79dp 297 | 8dp 298 | 80dp 299 | 81dp 300 | 82dp 301 | 83dp 302 | 84dp 303 | 85dp 304 | 86dp 305 | 87dp 306 | 88dp 307 | 89dp 308 | 9dp 309 | 90dp 310 | 91dp 311 | 92dp 312 | 93dp 313 | 94dp 314 | 95dp 315 | 96dp 316 | 97dp 317 | 98dp 318 | 99dp 319 | 100dp 320 | 101dp 321 | 102dp 322 | 103dp 323 | 104dp 324 | 105dp 325 | 106dp 326 | 107dp 327 | 108dp 328 | 109dp 329 | 110dp 330 | 111dp 331 | 112dp 332 | 113dp 333 | 114dp 334 | 115dp 335 | 116dp 336 | 117dp 337 | 118dp 338 | 119dp 339 | 120dp 340 | 121dp 341 | 122dp 342 | 123dp 343 | 124dp 344 | 125dp 345 | 126dp 346 | 127dp 347 | 128dp 348 | 129dp 349 | 130dp 350 | 131dp 351 | 132dp 352 | 133dp 353 | 134dp 354 | 135dp 355 | 136dp 356 | 137dp 357 | 138dp 358 | 139dp 359 | 140dp 360 | 141dp 361 | 142dp 362 | 143dp 363 | 144dp 364 | 145dp 365 | 146dp 366 | 147dp 367 | 148dp 368 | 149dp 369 | 150dp 370 | 151dp 371 | 152dp 372 | 153dp 373 | 154dp 374 | 155dp 375 | 156dp 376 | 157dp 377 | 158dp 378 | 159dp 379 | 160dp 380 | 161dp 381 | 162dp 382 | 163dp 383 | 164dp 384 | 165dp 385 | 166dp 386 | 167dp 387 | 168dp 388 | 169dp 389 | 170dp 390 | 171dp 391 | 172dp 392 | 173dp 393 | 174dp 394 | 175dp 395 | 176dp 396 | 177dp 397 | 178dp 398 | 179dp 399 | 180dp 400 | 181dp 401 | 182dp 402 | 183dp 403 | 184dp 404 | 185dp 405 | 186dp 406 | 187dp 407 | 188dp 408 | 189dp 409 | 190dp 410 | 191dp 411 | 192dp 412 | 193dp 413 | 194dp 414 | 195dp 415 | 196dp 416 | 197dp 417 | 198dp 418 | 199dp 419 | 200dp 420 | 201dp 421 | 202dp 422 | 203dp 423 | 204dp 424 | 205dp 425 | 206dp 426 | 207dp 427 | 208dp 428 | 209dp 429 | 210dp 430 | 211dp 431 | 212dp 432 | 213dp 433 | 214dp 434 | 215dp 435 | 216dp 436 | 217dp 437 | 218dp 438 | 219dp 439 | 220dp 440 | 221dp 441 | 222dp 442 | 223dp 443 | 224dp 444 | 225dp 445 | 226dp 446 | 227dp 447 | 228dp 448 | 229dp 449 | 230dp 450 | 231dp 451 | 232dp 452 | 233dp 453 | 234dp 454 | 235dp 455 | 236dp 456 | 237dp 457 | 238dp 458 | 239dp 459 | 240dp 460 | 241dp 461 | 242dp 462 | 243dp 463 | 244dp 464 | 245dp 465 | 246dp 466 | 247dp 467 | 248dp 468 | 249dp 469 | 250dp 470 | 251dp 471 | 252dp 472 | 253dp 473 | 254dp 474 | 255dp 475 | 256dp 476 | 257dp 477 | 258dp 478 | 259dp 479 | 260dp 480 | 261dp 481 | 262dp 482 | 263dp 483 | 264dp 484 | 265dp 485 | 266dp 486 | 267dp 487 | 268dp 488 | 269dp 489 | 270dp 490 | 271dp 491 | 272dp 492 | 273dp 493 | 274dp 494 | 275dp 495 | 276dp 496 | 277dp 497 | 278dp 498 | 279dp 499 | 280dp 500 | 281dp 501 | 282dp 502 | 283dp 503 | 284dp 504 | 285dp 505 | 286dp 506 | 287dp 507 | 288dp 508 | 289dp 509 | 290dp 510 | 291dp 511 | 292dp 512 | 293dp 513 | 294dp 514 | 295dp 515 | 296dp 516 | 297dp 517 | 298dp 518 | 299dp 519 | 300dp 520 | 301dp 521 | 302dp 522 | 303dp 523 | 304dp 524 | 305dp 525 | 306dp 526 | 307dp 527 | 308dp 528 | 309dp 529 | 310dp 530 | 311dp 531 | 312dp 532 | 313dp 533 | 314dp 534 | 315dp 535 | 316dp 536 | 317dp 537 | 318dp 538 | 319dp 539 | 320dp 540 | 321dp 541 | 322dp 542 | 323dp 543 | 324dp 544 | 325dp 545 | 326dp 546 | 327dp 547 | 328dp 548 | 329dp 549 | 330dp 550 | 331dp 551 | 332dp 552 | 333dp 553 | 334dp 554 | 335dp 555 | 336dp 556 | 337dp 557 | 338dp 558 | 339dp 559 | 340dp 560 | 341dp 561 | 342dp 562 | 343dp 563 | 344dp 564 | 345dp 565 | 346dp 566 | 347dp 567 | 348dp 568 | 349dp 569 | 350dp 570 | 351dp 571 | 352dp 572 | 353dp 573 | 354dp 574 | 355dp 575 | 356dp 576 | 357dp 577 | 358dp 578 | 359dp 579 | 360dp 580 | 361dp 581 | 362dp 582 | 363dp 583 | 364dp 584 | 365dp 585 | 366dp 586 | 367dp 587 | 368dp 588 | 369dp 589 | 370dp 590 | 371dp 591 | 372dp 592 | 373dp 593 | 374dp 594 | 375dp 595 | 376dp 596 | 377dp 597 | 378dp 598 | 379dp 599 | 380dp 600 | 381dp 601 | 382dp 602 | 383dp 603 | 384dp 604 | 385dp 605 | 386dp 606 | 387dp 607 | 388dp 608 | 389dp 609 | 390dp 610 | 391dp 611 | 392dp 612 | 393dp 613 | 394dp 614 | 395dp 615 | 396dp 616 | 397dp 617 | 398dp 618 | 399dp 619 | 400dp 620 | 401dp 621 | 402dp 622 | 403dp 623 | 404dp 624 | 405dp 625 | 406dp 626 | 407dp 627 | 408dp 628 | 409dp 629 | 410dp 630 | 411dp 631 | 412dp 632 | 413dp 633 | 414dp 634 | 415dp 635 | 416dp 636 | 417dp 637 | 418dp 638 | 419dp 639 | 420dp 640 | 421dp 641 | 422dp 642 | 423dp 643 | 424dp 644 | 425dp 645 | 426dp 646 | 427dp 647 | 428dp 648 | 429dp 649 | 430dp 650 | 431dp 651 | 432dp 652 | 433dp 653 | 434dp 654 | 435dp 655 | 436dp 656 | 437dp 657 | 438dp 658 | 439dp 659 | 440dp 660 | 441dp 661 | 442dp 662 | 443dp 663 | 444dp 664 | 445dp 665 | 446dp 666 | 447dp 667 | 448dp 668 | 449dp 669 | 450dp 670 | 451dp 671 | 452dp 672 | 453dp 673 | 454dp 674 | 455dp 675 | 456dp 676 | 457dp 677 | 458dp 678 | 459dp 679 | 460dp 680 | 461dp 681 | 462dp 682 | 463dp 683 | 464dp 684 | 465dp 685 | 466dp 686 | 467dp 687 | 468dp 688 | 469dp 689 | 470dp 690 | 471dp 691 | 472dp 692 | 473dp 693 | 474dp 694 | 475dp 695 | 476dp 696 | 477dp 697 | 478dp 698 | 479dp 699 | 480dp 700 | 481dp 701 | 482dp 702 | 483dp 703 | 484dp 704 | 485dp 705 | 486dp 706 | 487dp 707 | 488dp 708 | 489dp 709 | 490dp 710 | 491dp 711 | 492dp 712 | 493dp 713 | 494dp 714 | 495dp 715 | 496dp 716 | 497dp 717 | 498dp 718 | 499dp 719 | 500dp 720 | 501dp 721 | 502dp 722 | 503dp 723 | 504dp 724 | 505dp 725 | 506dp 726 | 507dp 727 | 508dp 728 | 509dp 729 | 510dp 730 | 511dp 731 | 512dp 732 | 513dp 733 | 514dp 734 | 515dp 735 | 516dp 736 | 517dp 737 | 518dp 738 | 519dp 739 | 520dp 740 | 521dp 741 | 522dp 742 | 523dp 743 | 524dp 744 | 525dp 745 | 526dp 746 | 527dp 747 | 528dp 748 | 529dp 749 | 530dp 750 | 531dp 751 | 532dp 752 | 533dp 753 | 534dp 754 | 535dp 755 | 536dp 756 | 537dp 757 | 538dp 758 | 539dp 759 | 540dp 760 | 541dp 761 | 542dp 762 | 543dp 763 | 544dp 764 | 545dp 765 | 546dp 766 | 547dp 767 | 548dp 768 | 549dp 769 | 550dp 770 | 551dp 771 | 552dp 772 | 553dp 773 | 554dp 774 | 555dp 775 | 556dp 776 | 557dp 777 | 558dp 778 | 559dp 779 | 560dp 780 | 561dp 781 | 562dp 782 | 563dp 783 | 564dp 784 | 565dp 785 | 566dp 786 | 567dp 787 | 568dp 788 | 569dp 789 | 570dp 790 | 571dp 791 | 572dp 792 | 573dp 793 | 574dp 794 | 575dp 795 | 576dp 796 | 577dp 797 | 578dp 798 | 579dp 799 | 580dp 800 | 581dp 801 | 582dp 802 | 583dp 803 | 584dp 804 | 585dp 805 | 586dp 806 | 587dp 807 | 588dp 808 | 589dp 809 | 590dp 810 | 591dp 811 | 592dp 812 | 593dp 813 | 594dp 814 | 595dp 815 | 596dp 816 | 597dp 817 | 598dp 818 | 599dp 819 | 600dp 820 | 601dp 821 | 602dp 822 | 603dp 823 | 604dp 824 | 605dp 825 | 606dp 826 | 607dp 827 | 608dp 828 | 609dp 829 | 610dp 830 | 611dp 831 | 612dp 832 | 613dp 833 | 614dp 834 | 615dp 835 | 616dp 836 | 617dp 837 | 618dp 838 | 619dp 839 | 620dp 840 | 621dp 841 | 622dp 842 | 623dp 843 | 624dp 844 | 625dp 845 | 626dp 846 | 627dp 847 | 628dp 848 | 629dp 849 | 630dp 850 | 631dp 851 | 632dp 852 | 633dp 853 | 634dp 854 | 635dp 855 | 636dp 856 | 637dp 857 | 638dp 858 | 639dp 859 | 640dp 860 | 641dp 861 | 642dp 862 | 643dp 863 | 644dp 864 | 645dp 865 | 646dp 866 | 647dp 867 | 648dp 868 | 649dp 869 | 650dp 870 | 651dp 871 | 652dp 872 | 653dp 873 | 654dp 874 | 655dp 875 | 656dp 876 | 657dp 877 | 658dp 878 | 659dp 879 | 660dp 880 | 661dp 881 | 662dp 882 | 663dp 883 | 664dp 884 | 665dp 885 | 666dp 886 | 667dp 887 | 668dp 888 | 669dp 889 | 670dp 890 | 671dp 891 | 672dp 892 | 673dp 893 | 674dp 894 | 675dp 895 | 676dp 896 | 677dp 897 | 678dp 898 | 679dp 899 | 680dp 900 | 681dp 901 | 682dp 902 | 683dp 903 | 684dp 904 | 685dp 905 | 686dp 906 | 687dp 907 | 688dp 908 | 689dp 909 | 690dp 910 | 691dp 911 | 692dp 912 | 693dp 913 | 694dp 914 | 695dp 915 | 696dp 916 | 697dp 917 | 698dp 918 | 699dp 919 | 700dp 920 | 701dp 921 | 702dp 922 | 703dp 923 | 704dp 924 | 705dp 925 | 706dp 926 | 707dp 927 | 708dp 928 | 709dp 929 | 710dp 930 | 711dp 931 | 712dp 932 | 713dp 933 | 714dp 934 | 715dp 935 | 716dp 936 | 717dp 937 | 718dp 938 | 719dp 939 | 720dp 940 | 721dp 941 | 722dp 942 | 723dp 943 | 724dp 944 | 725dp 945 | 726dp 946 | 727dp 947 | 728dp 948 | 729dp 949 | 730dp 950 | 731dp 951 | 732dp 952 | 733dp 953 | 734dp 954 | 735dp 955 | 736dp 956 | 737dp 957 | 738dp 958 | 739dp 959 | 740dp 960 | 741dp 961 | 742dp 962 | 743dp 963 | 744dp 964 | 745dp 965 | 746dp 966 | 747dp 967 | 748dp 968 | 749dp 969 | 750dp 970 | 751dp 971 | 752dp 972 | 753dp 973 | 754dp 974 | 755dp 975 | 756dp 976 | 757dp 977 | 758dp 978 | 759dp 979 | 760dp 980 | 761dp 981 | 762dp 982 | 763dp 983 | 764dp 984 | 765dp 985 | 766dp 986 | 767dp 987 | 768dp 988 | 769dp 989 | 770dp 990 | 771dp 991 | 772dp 992 | 773dp 993 | 774dp 994 | 775dp 995 | 776dp 996 | 777dp 997 | 778dp 998 | 779dp 999 | 780dp 1000 | 781dp 1001 | 782dp 1002 | 783dp 1003 | 784dp 1004 | 785dp 1005 | 786dp 1006 | 787dp 1007 | 788dp 1008 | 789dp 1009 | 790dp 1010 | 791dp 1011 | 792dp 1012 | 793dp 1013 | 794dp 1014 | 795dp 1015 | 796dp 1016 | 797dp 1017 | 798dp 1018 | 799dp 1019 | 800dp 1020 | 801dp 1021 | 802dp 1022 | 803dp 1023 | 804dp 1024 | 805dp 1025 | 806dp 1026 | 807dp 1027 | 808dp 1028 | 809dp 1029 | 810dp 1030 | 811dp 1031 | 812dp 1032 | 813dp 1033 | 814dp 1034 | 815dp 1035 | 816dp 1036 | 817dp 1037 | 818dp 1038 | 819dp 1039 | 820dp 1040 | 821dp 1041 | 822dp 1042 | 823dp 1043 | 824dp 1044 | 825dp 1045 | 826dp 1046 | 827dp 1047 | 828dp 1048 | 829dp 1049 | 830dp 1050 | 831dp 1051 | 832dp 1052 | 833dp 1053 | 834dp 1054 | 835dp 1055 | 836dp 1056 | 837dp 1057 | 838dp 1058 | 839dp 1059 | 840dp 1060 | 841dp 1061 | 842dp 1062 | 843dp 1063 | 844dp 1064 | 845dp 1065 | 846dp 1066 | 847dp 1067 | 848dp 1068 | 849dp 1069 | 850dp 1070 | 851dp 1071 | 852dp 1072 | 853dp 1073 | 854dp 1074 | 855dp 1075 | 856dp 1076 | 857dp 1077 | 858dp 1078 | 859dp 1079 | 860dp 1080 | 861dp 1081 | 862dp 1082 | 863dp 1083 | 864dp 1084 | 865dp 1085 | 866dp 1086 | 867dp 1087 | 868dp 1088 | 869dp 1089 | 870dp 1090 | 871dp 1091 | 872dp 1092 | 873dp 1093 | 874dp 1094 | 875dp 1095 | 876dp 1096 | 877dp 1097 | 878dp 1098 | 879dp 1099 | 880dp 1100 | 881dp 1101 | 882dp 1102 | 883dp 1103 | 884dp 1104 | 885dp 1105 | 886dp 1106 | 887dp 1107 | 888dp 1108 | 889dp 1109 | 890dp 1110 | 891dp 1111 | 892dp 1112 | 893dp 1113 | 894dp 1114 | 895dp 1115 | 896dp 1116 | 897dp 1117 | 898dp 1118 | 899dp 1119 | 900dp 1120 | 901dp 1121 | 902dp 1122 | 903dp 1123 | 904dp 1124 | 905dp 1125 | 906dp 1126 | 907dp 1127 | 908dp 1128 | 909dp 1129 | 910dp 1130 | 911dp 1131 | 912dp 1132 | 913dp 1133 | 914dp 1134 | 915dp 1135 | 916dp 1136 | 917dp 1137 | 918dp 1138 | 919dp 1139 | 920dp 1140 | 921dp 1141 | 922dp 1142 | 923dp 1143 | 924dp 1144 | 925dp 1145 | 926dp 1146 | 927dp 1147 | 928dp 1148 | 929dp 1149 | 930dp 1150 | 931dp 1151 | 932dp 1152 | 933dp 1153 | 934dp 1154 | 935dp 1155 | 936dp 1156 | 937dp 1157 | 938dp 1158 | 939dp 1159 | 940dp 1160 | 941dp 1161 | 942dp 1162 | 943dp 1163 | 944dp 1164 | 945dp 1165 | 946dp 1166 | 947dp 1167 | 948dp 1168 | 949dp 1169 | 950dp 1170 | 951dp 1171 | 952dp 1172 | 953dp 1173 | 954dp 1174 | 955dp 1175 | 956dp 1176 | 957dp 1177 | 958dp 1178 | 959dp 1179 | 960dp 1180 | 961dp 1181 | 962dp 1182 | 963dp 1183 | 964dp 1184 | 965dp 1185 | 966dp 1186 | 967dp 1187 | 968dp 1188 | 969dp 1189 | 970dp 1190 | 971dp 1191 | 972dp 1192 | 973dp 1193 | 974dp 1194 | 975dp 1195 | 976dp 1196 | 977dp 1197 | 978dp 1198 | 979dp 1199 | 980dp 1200 | 981dp 1201 | 982dp 1202 | 983dp 1203 | 984dp 1204 | 985dp 1205 | 986dp 1206 | 987dp 1207 | 988dp 1208 | 989dp 1209 | 990dp 1210 | 991dp 1211 | 992dp 1212 | 993dp 1213 | 994dp 1214 | 995dp 1215 | 996dp 1216 | 997dp 1217 | 998dp 1218 | 999dp 1219 | 0.5dp 1220 | 1dp 1221 | 5sp 1222 | 6sp 1223 | 7sp 1224 | 8sp 1225 | 10sp 1226 | 11sp 1227 | 12sp 1228 | 13sp 1229 | 14sp 1230 | 15sp 1231 | 16sp 1232 | 17sp 1233 | 18sp 1234 | 20sp 1235 | 21sp 1236 | 22sp 1237 | 23sp 1238 | 24sp 1239 | 24sp 1240 | 26sp 1241 | 28sp 1242 | 30sp 1243 | 32sp 1244 | 34sp 1245 | 36sp 1246 | 38sp 1247 | 40sp 1248 | 52sp 1249 | 54sp 1250 | 1251 | 1252 | common 1253 | 授予 1254 | 获取授权失败 1255 | 权限申请失败 1256 | 取消 1257 | 权限来正常使用APP 1258 | 权限被您拒绝或者系统发生错误申请失败,请您到设置页面手动授权,否则功能无法正常使用! 1259 | 我们需要 1260 | 拒绝 1261 | 设置 1262 | 一些 1263 | 提示 1264 | 再按一次退出 1265 | 1276 | 1280 | 1285 | 1294 | 1302 | 1309 | 1313 | 1318 | 1324 | 1329 | 1335 | 1343 | 1348 | 1358 | 1378 | 1383 | 1390 | 1400 | -------------------------------------------------------------------------------- /assets/images/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/assets/images/ic_back.png -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 17 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 18 | - platform: android 19 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 20 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 21 | - platform: ios 22 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 23 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 24 | 25 | # User provided section 26 | 27 | # List of Local paths (relative to this file) that should be 28 | # ignored by the migrate tool. 29 | # 30 | # Files that are not part of the templates will be ignored by default. 31 | unmanaged_files: 32 | - 'lib/main.dart' 33 | - 'ios/Runner.xcodeproj/project.pbxproj' 34 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # flutter_file_preview_example 2 | 3 | Demonstrates how to use the flutter_file_preview plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | defaultConfig { 38 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 39 | applicationId "com.example.example" 40 | // You can update the following values to match your application needs. 41 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 42 | minSdkVersion 17 43 | targetSdkVersion flutter.targetSdkVersion 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | } 47 | 48 | buildTypes { 49 | release { 50 | // TODO: Add your own signing config for the release build. 51 | // Signing with the debug keys for now, so `flutter run --release` works. 52 | signingConfig signingConfigs.debug 53 | } 54 | } 55 | } 56 | 57 | flutter { 58 | source '../..' 59 | } 60 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 9 | 17 | 21 | 25 | 26 | 27 | 28 | 29 | 30 | 32 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.example; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | } 7 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 7 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 32 | end 33 | 34 | post_install do |installer| 35 | installer.pods_project.targets.each do |target| 36 | flutter_additional_ios_build_settings(target) 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - flutter_file_preview (0.0.1): 4 | - Flutter 5 | 6 | DEPENDENCIES: 7 | - Flutter (from `Flutter`) 8 | - flutter_file_preview (from `.symlinks/plugins/flutter_file_preview/ios`) 9 | 10 | EXTERNAL SOURCES: 11 | Flutter: 12 | :path: Flutter 13 | flutter_file_preview: 14 | :path: ".symlinks/plugins/flutter_file_preview/ios" 15 | 16 | SPEC CHECKSUMS: 17 | Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a 18 | flutter_file_preview: 293b4c5fe05816219ada921e266df3b5e8a59c4f 19 | 20 | PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d 21 | 22 | COCOAPODS: 1.11.3 23 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 39F2F09B6D5FF8F3D0DC2A4B /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DC96251AA201E74A0E5AAF3 /* libPods-Runner.a */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 14 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 15 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 16 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 17 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXCopyFilesBuildPhase section */ 21 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 22 | isa = PBXCopyFilesBuildPhase; 23 | buildActionMask = 2147483647; 24 | dstPath = ""; 25 | dstSubfolderSpec = 10; 26 | files = ( 27 | ); 28 | name = "Embed Frameworks"; 29 | runOnlyForDeploymentPostprocessing = 0; 30 | }; 31 | /* End PBXCopyFilesBuildPhase section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 35 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 36 | 2B1DF3F54DC1D9B565AE2FC5 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 37 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 38 | 6DC96251AA201E74A0E5AAF3 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 40 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 41 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 42 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 43 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 44 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 46 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 47 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 48 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 49 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | C27AF0BF039C81146A3FDC3D /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 51 | E0BCF9799D7EE69380549C8D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | 39F2F09B6D5FF8F3D0DC2A4B /* libPods-Runner.a in Frameworks */, 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | /* End PBXFrameworksBuildPhase section */ 64 | 65 | /* Begin PBXGroup section */ 66 | 068B78672480524A1AA9742C /* Pods */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | E0BCF9799D7EE69380549C8D /* Pods-Runner.debug.xcconfig */, 70 | 2B1DF3F54DC1D9B565AE2FC5 /* Pods-Runner.release.xcconfig */, 71 | C27AF0BF039C81146A3FDC3D /* Pods-Runner.profile.xcconfig */, 72 | ); 73 | name = Pods; 74 | path = Pods; 75 | sourceTree = ""; 76 | }; 77 | 8874036765E5918BFF844BDA /* Frameworks */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 6DC96251AA201E74A0E5AAF3 /* libPods-Runner.a */, 81 | ); 82 | name = Frameworks; 83 | sourceTree = ""; 84 | }; 85 | 9740EEB11CF90186004384FC /* Flutter */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 89 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 90 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 91 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 92 | ); 93 | name = Flutter; 94 | sourceTree = ""; 95 | }; 96 | 97C146E51CF9000F007C117D = { 97 | isa = PBXGroup; 98 | children = ( 99 | 9740EEB11CF90186004384FC /* Flutter */, 100 | 97C146F01CF9000F007C117D /* Runner */, 101 | 97C146EF1CF9000F007C117D /* Products */, 102 | 068B78672480524A1AA9742C /* Pods */, 103 | 8874036765E5918BFF844BDA /* Frameworks */, 104 | ); 105 | sourceTree = ""; 106 | }; 107 | 97C146EF1CF9000F007C117D /* Products */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 97C146EE1CF9000F007C117D /* Runner.app */, 111 | ); 112 | name = Products; 113 | sourceTree = ""; 114 | }; 115 | 97C146F01CF9000F007C117D /* Runner */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 119 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 120 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 121 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 122 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 123 | 97C147021CF9000F007C117D /* Info.plist */, 124 | 97C146F11CF9000F007C117D /* Supporting Files */, 125 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 126 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 127 | ); 128 | path = Runner; 129 | sourceTree = ""; 130 | }; 131 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 97C146F21CF9000F007C117D /* main.m */, 135 | ); 136 | name = "Supporting Files"; 137 | sourceTree = ""; 138 | }; 139 | /* End PBXGroup section */ 140 | 141 | /* Begin PBXNativeTarget section */ 142 | 97C146ED1CF9000F007C117D /* Runner */ = { 143 | isa = PBXNativeTarget; 144 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 145 | buildPhases = ( 146 | 115BB189718342E87D5CFB5E /* [CP] Check Pods Manifest.lock */, 147 | 9740EEB61CF901F6004384FC /* Run Script */, 148 | 97C146EA1CF9000F007C117D /* Sources */, 149 | 97C146EB1CF9000F007C117D /* Frameworks */, 150 | 97C146EC1CF9000F007C117D /* Resources */, 151 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 152 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 153 | ); 154 | buildRules = ( 155 | ); 156 | dependencies = ( 157 | ); 158 | name = Runner; 159 | productName = Runner; 160 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 161 | productType = "com.apple.product-type.application"; 162 | }; 163 | /* End PBXNativeTarget section */ 164 | 165 | /* Begin PBXProject section */ 166 | 97C146E61CF9000F007C117D /* Project object */ = { 167 | isa = PBXProject; 168 | attributes = { 169 | LastUpgradeCheck = 1300; 170 | ORGANIZATIONNAME = ""; 171 | TargetAttributes = { 172 | 97C146ED1CF9000F007C117D = { 173 | CreatedOnToolsVersion = 7.3.1; 174 | }; 175 | }; 176 | }; 177 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 178 | compatibilityVersion = "Xcode 9.3"; 179 | developmentRegion = en; 180 | hasScannedForEncodings = 0; 181 | knownRegions = ( 182 | en, 183 | Base, 184 | ); 185 | mainGroup = 97C146E51CF9000F007C117D; 186 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 187 | projectDirPath = ""; 188 | projectRoot = ""; 189 | targets = ( 190 | 97C146ED1CF9000F007C117D /* Runner */, 191 | ); 192 | }; 193 | /* End PBXProject section */ 194 | 195 | /* Begin PBXResourcesBuildPhase section */ 196 | 97C146EC1CF9000F007C117D /* Resources */ = { 197 | isa = PBXResourcesBuildPhase; 198 | buildActionMask = 2147483647; 199 | files = ( 200 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 201 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 202 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 203 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 204 | ); 205 | runOnlyForDeploymentPostprocessing = 0; 206 | }; 207 | /* End PBXResourcesBuildPhase section */ 208 | 209 | /* Begin PBXShellScriptBuildPhase section */ 210 | 115BB189718342E87D5CFB5E /* [CP] Check Pods Manifest.lock */ = { 211 | isa = PBXShellScriptBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | ); 215 | inputFileListPaths = ( 216 | ); 217 | inputPaths = ( 218 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 219 | "${PODS_ROOT}/Manifest.lock", 220 | ); 221 | name = "[CP] Check Pods Manifest.lock"; 222 | outputFileListPaths = ( 223 | ); 224 | outputPaths = ( 225 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | shellPath = /bin/sh; 229 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 230 | showEnvVarsInLog = 0; 231 | }; 232 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 233 | isa = PBXShellScriptBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | ); 237 | inputPaths = ( 238 | ); 239 | name = "Thin Binary"; 240 | outputPaths = ( 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | shellPath = /bin/sh; 244 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 245 | }; 246 | 9740EEB61CF901F6004384FC /* Run Script */ = { 247 | isa = PBXShellScriptBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | ); 251 | inputPaths = ( 252 | ); 253 | name = "Run Script"; 254 | outputPaths = ( 255 | ); 256 | runOnlyForDeploymentPostprocessing = 0; 257 | shellPath = /bin/sh; 258 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 259 | }; 260 | /* End PBXShellScriptBuildPhase section */ 261 | 262 | /* Begin PBXSourcesBuildPhase section */ 263 | 97C146EA1CF9000F007C117D /* Sources */ = { 264 | isa = PBXSourcesBuildPhase; 265 | buildActionMask = 2147483647; 266 | files = ( 267 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 268 | 97C146F31CF9000F007C117D /* main.m in Sources */, 269 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | /* End PBXSourcesBuildPhase section */ 274 | 275 | /* Begin PBXVariantGroup section */ 276 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 277 | isa = PBXVariantGroup; 278 | children = ( 279 | 97C146FB1CF9000F007C117D /* Base */, 280 | ); 281 | name = Main.storyboard; 282 | sourceTree = ""; 283 | }; 284 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 285 | isa = PBXVariantGroup; 286 | children = ( 287 | 97C147001CF9000F007C117D /* Base */, 288 | ); 289 | name = LaunchScreen.storyboard; 290 | sourceTree = ""; 291 | }; 292 | /* End PBXVariantGroup section */ 293 | 294 | /* Begin XCBuildConfiguration section */ 295 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 296 | isa = XCBuildConfiguration; 297 | buildSettings = { 298 | ALWAYS_SEARCH_USER_PATHS = NO; 299 | CLANG_ANALYZER_NONNULL = YES; 300 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 301 | CLANG_CXX_LIBRARY = "libc++"; 302 | CLANG_ENABLE_MODULES = YES; 303 | CLANG_ENABLE_OBJC_ARC = YES; 304 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 305 | CLANG_WARN_BOOL_CONVERSION = YES; 306 | CLANG_WARN_COMMA = YES; 307 | CLANG_WARN_CONSTANT_CONVERSION = YES; 308 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 309 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 310 | CLANG_WARN_EMPTY_BODY = YES; 311 | CLANG_WARN_ENUM_CONVERSION = YES; 312 | CLANG_WARN_INFINITE_RECURSION = YES; 313 | CLANG_WARN_INT_CONVERSION = YES; 314 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 315 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 316 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 317 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 318 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 319 | CLANG_WARN_STRICT_PROTOTYPES = YES; 320 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 321 | CLANG_WARN_UNREACHABLE_CODE = YES; 322 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 323 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 324 | COPY_PHASE_STRIP = NO; 325 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 326 | ENABLE_NS_ASSERTIONS = NO; 327 | ENABLE_STRICT_OBJC_MSGSEND = YES; 328 | GCC_C_LANGUAGE_STANDARD = gnu99; 329 | GCC_NO_COMMON_BLOCKS = YES; 330 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 331 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 332 | GCC_WARN_UNDECLARED_SELECTOR = YES; 333 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 334 | GCC_WARN_UNUSED_FUNCTION = YES; 335 | GCC_WARN_UNUSED_VARIABLE = YES; 336 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 337 | MTL_ENABLE_DEBUG_INFO = NO; 338 | SDKROOT = iphoneos; 339 | SUPPORTED_PLATFORMS = iphoneos; 340 | TARGETED_DEVICE_FAMILY = "1,2"; 341 | VALIDATE_PRODUCT = YES; 342 | }; 343 | name = Profile; 344 | }; 345 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 346 | isa = XCBuildConfiguration; 347 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 348 | buildSettings = { 349 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 350 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 351 | DEVELOPMENT_TEAM = P988ZTAM4B; 352 | ENABLE_BITCODE = NO; 353 | INFOPLIST_FILE = Runner/Info.plist; 354 | LD_RUNPATH_SEARCH_PATHS = ( 355 | "$(inherited)", 356 | "@executable_path/Frameworks", 357 | ); 358 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 359 | PRODUCT_NAME = "$(TARGET_NAME)"; 360 | VERSIONING_SYSTEM = "apple-generic"; 361 | }; 362 | name = Profile; 363 | }; 364 | 97C147031CF9000F007C117D /* Debug */ = { 365 | isa = XCBuildConfiguration; 366 | buildSettings = { 367 | ALWAYS_SEARCH_USER_PATHS = NO; 368 | CLANG_ANALYZER_NONNULL = YES; 369 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 370 | CLANG_CXX_LIBRARY = "libc++"; 371 | CLANG_ENABLE_MODULES = YES; 372 | CLANG_ENABLE_OBJC_ARC = YES; 373 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 374 | CLANG_WARN_BOOL_CONVERSION = YES; 375 | CLANG_WARN_COMMA = YES; 376 | CLANG_WARN_CONSTANT_CONVERSION = YES; 377 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 378 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 379 | CLANG_WARN_EMPTY_BODY = YES; 380 | CLANG_WARN_ENUM_CONVERSION = YES; 381 | CLANG_WARN_INFINITE_RECURSION = YES; 382 | CLANG_WARN_INT_CONVERSION = YES; 383 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 384 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 385 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 386 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 387 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 388 | CLANG_WARN_STRICT_PROTOTYPES = YES; 389 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 390 | CLANG_WARN_UNREACHABLE_CODE = YES; 391 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 392 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 393 | COPY_PHASE_STRIP = NO; 394 | DEBUG_INFORMATION_FORMAT = dwarf; 395 | ENABLE_STRICT_OBJC_MSGSEND = YES; 396 | ENABLE_TESTABILITY = YES; 397 | GCC_C_LANGUAGE_STANDARD = gnu99; 398 | GCC_DYNAMIC_NO_PIC = NO; 399 | GCC_NO_COMMON_BLOCKS = YES; 400 | GCC_OPTIMIZATION_LEVEL = 0; 401 | GCC_PREPROCESSOR_DEFINITIONS = ( 402 | "DEBUG=1", 403 | "$(inherited)", 404 | ); 405 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 406 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 407 | GCC_WARN_UNDECLARED_SELECTOR = YES; 408 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 409 | GCC_WARN_UNUSED_FUNCTION = YES; 410 | GCC_WARN_UNUSED_VARIABLE = YES; 411 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 412 | MTL_ENABLE_DEBUG_INFO = YES; 413 | ONLY_ACTIVE_ARCH = YES; 414 | SDKROOT = iphoneos; 415 | TARGETED_DEVICE_FAMILY = "1,2"; 416 | }; 417 | name = Debug; 418 | }; 419 | 97C147041CF9000F007C117D /* Release */ = { 420 | isa = XCBuildConfiguration; 421 | buildSettings = { 422 | ALWAYS_SEARCH_USER_PATHS = NO; 423 | CLANG_ANALYZER_NONNULL = YES; 424 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 425 | CLANG_CXX_LIBRARY = "libc++"; 426 | CLANG_ENABLE_MODULES = YES; 427 | CLANG_ENABLE_OBJC_ARC = YES; 428 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 429 | CLANG_WARN_BOOL_CONVERSION = YES; 430 | CLANG_WARN_COMMA = YES; 431 | CLANG_WARN_CONSTANT_CONVERSION = YES; 432 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 433 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 434 | CLANG_WARN_EMPTY_BODY = YES; 435 | CLANG_WARN_ENUM_CONVERSION = YES; 436 | CLANG_WARN_INFINITE_RECURSION = YES; 437 | CLANG_WARN_INT_CONVERSION = YES; 438 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 439 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 440 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 441 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 442 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 443 | CLANG_WARN_STRICT_PROTOTYPES = YES; 444 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 445 | CLANG_WARN_UNREACHABLE_CODE = YES; 446 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 447 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 448 | COPY_PHASE_STRIP = NO; 449 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 450 | ENABLE_NS_ASSERTIONS = NO; 451 | ENABLE_STRICT_OBJC_MSGSEND = YES; 452 | GCC_C_LANGUAGE_STANDARD = gnu99; 453 | GCC_NO_COMMON_BLOCKS = YES; 454 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 455 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 456 | GCC_WARN_UNDECLARED_SELECTOR = YES; 457 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 458 | GCC_WARN_UNUSED_FUNCTION = YES; 459 | GCC_WARN_UNUSED_VARIABLE = YES; 460 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 461 | MTL_ENABLE_DEBUG_INFO = NO; 462 | SDKROOT = iphoneos; 463 | SUPPORTED_PLATFORMS = iphoneos; 464 | TARGETED_DEVICE_FAMILY = "1,2"; 465 | VALIDATE_PRODUCT = YES; 466 | }; 467 | name = Release; 468 | }; 469 | 97C147061CF9000F007C117D /* Debug */ = { 470 | isa = XCBuildConfiguration; 471 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 472 | buildSettings = { 473 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 474 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 475 | DEVELOPMENT_TEAM = P988ZTAM4B; 476 | ENABLE_BITCODE = NO; 477 | INFOPLIST_FILE = Runner/Info.plist; 478 | LD_RUNPATH_SEARCH_PATHS = ( 479 | "$(inherited)", 480 | "@executable_path/Frameworks", 481 | ); 482 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 483 | PRODUCT_NAME = "$(TARGET_NAME)"; 484 | VERSIONING_SYSTEM = "apple-generic"; 485 | }; 486 | name = Debug; 487 | }; 488 | 97C147071CF9000F007C117D /* Release */ = { 489 | isa = XCBuildConfiguration; 490 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 491 | buildSettings = { 492 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 493 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 494 | DEVELOPMENT_TEAM = P988ZTAM4B; 495 | ENABLE_BITCODE = NO; 496 | INFOPLIST_FILE = Runner/Info.plist; 497 | LD_RUNPATH_SEARCH_PATHS = ( 498 | "$(inherited)", 499 | "@executable_path/Frameworks", 500 | ); 501 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 502 | PRODUCT_NAME = "$(TARGET_NAME)"; 503 | VERSIONING_SYSTEM = "apple-generic"; 504 | }; 505 | name = Release; 506 | }; 507 | /* End XCBuildConfiguration section */ 508 | 509 | /* Begin XCConfigurationList section */ 510 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 511 | isa = XCConfigurationList; 512 | buildConfigurations = ( 513 | 97C147031CF9000F007C117D /* Debug */, 514 | 97C147041CF9000F007C117D /* Release */, 515 | 249021D3217E4FDB00AE95B9 /* Profile */, 516 | ); 517 | defaultConfigurationIsVisible = 0; 518 | defaultConfigurationName = Release; 519 | }; 520 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 521 | isa = XCConfigurationList; 522 | buildConfigurations = ( 523 | 97C147061CF9000F007C117D /* Debug */, 524 | 97C147071CF9000F007C117D /* Release */, 525 | 249021D4217E4FDB00AE95B9 /* Profile */, 526 | ); 527 | defaultConfigurationIsVisible = 0; 528 | defaultConfigurationName = Release; 529 | }; 530 | /* End XCConfigurationList section */ 531 | }; 532 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 533 | } 534 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | example 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /example/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_file_preview/flutter_file_preview.dart'; 3 | 4 | void main() { 5 | runApp(MyApp()); 6 | } 7 | 8 | class MyApp extends StatefulWidget { 9 | @override 10 | _MyAppState createState() => _MyAppState(); 11 | } 12 | 13 | class _MyAppState extends State { 14 | @override 15 | void initState() { 16 | super.initState(); 17 | } 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return MaterialApp( 22 | home: Scaffold( 23 | appBar: AppBar( 24 | title: const Text('Plugin example app'), 25 | ), 26 | body: new Column( 27 | children: [ 28 | new Container( 29 | height: 20, 30 | ), 31 | new FlatButton( 32 | child: new Text("Open Debug"), 33 | onPressed: () { 34 | FlutterFilePreview.openDebug(); 35 | }), 36 | new Container( 37 | height: 20, 38 | ), 39 | new FlatButton( 40 | child: new Text("Open Online Pdf"), 41 | onPressed: () { 42 | FlutterFilePreview.openFile( 43 | "https://gitee.com/kongkongss/flutter_file_preview/raw/master/test/docs/test_file_for.pdf", 44 | title: 'Online PDF'); 45 | }), 46 | new Container( 47 | height: 20, 48 | ), 49 | new FlatButton( 50 | child: new Text("Open Online Docx"), 51 | onPressed: () { 52 | FlutterFilePreview.openFile( 53 | "https://gitee.com/kongkongss/flutter_file_preview/raw/master/test/docs/test_file_for.docx", 54 | title: 'Online Docx'); 55 | }), 56 | new Container( 57 | height: 20, 58 | ), 59 | new FlatButton( 60 | child: new Text("Open Online Xls"), 61 | onPressed: () { 62 | FlutterFilePreview.openFile( 63 | "https://gitee.com/kongkongss/flutter_file_preview/raw/master/test/docs/test_file_for.xlsx", 64 | title: 'Online Xls'); 65 | }), 66 | ], 67 | ), 68 | ), 69 | ); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /example/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.flutter-io.cn" 9 | source: hosted 10 | version: "2.8.2" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.flutter-io.cn" 16 | source: hosted 17 | version: "2.1.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.flutter-io.cn" 23 | source: hosted 24 | version: "1.2.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.flutter-io.cn" 30 | source: hosted 31 | version: "1.3.1" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.flutter-io.cn" 37 | source: hosted 38 | version: "1.1.0" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.flutter-io.cn" 44 | source: hosted 45 | version: "1.16.0" 46 | cupertino_icons: 47 | dependency: "direct main" 48 | description: 49 | name: cupertino_icons 50 | url: "https://pub.flutter-io.cn" 51 | source: hosted 52 | version: "0.1.3" 53 | fake_async: 54 | dependency: transitive 55 | description: 56 | name: fake_async 57 | url: "https://pub.flutter-io.cn" 58 | source: hosted 59 | version: "1.3.0" 60 | flutter: 61 | dependency: "direct main" 62 | description: flutter 63 | source: sdk 64 | version: "0.0.0" 65 | flutter_file_preview: 66 | dependency: "direct main" 67 | description: 68 | path: ".." 69 | relative: true 70 | source: path 71 | version: "0.0.1" 72 | flutter_test: 73 | dependency: "direct dev" 74 | description: flutter 75 | source: sdk 76 | version: "0.0.0" 77 | matcher: 78 | dependency: transitive 79 | description: 80 | name: matcher 81 | url: "https://pub.flutter-io.cn" 82 | source: hosted 83 | version: "0.12.11" 84 | material_color_utilities: 85 | dependency: transitive 86 | description: 87 | name: material_color_utilities 88 | url: "https://pub.flutter-io.cn" 89 | source: hosted 90 | version: "0.1.4" 91 | meta: 92 | dependency: transitive 93 | description: 94 | name: meta 95 | url: "https://pub.flutter-io.cn" 96 | source: hosted 97 | version: "1.7.0" 98 | path: 99 | dependency: transitive 100 | description: 101 | name: path 102 | url: "https://pub.flutter-io.cn" 103 | source: hosted 104 | version: "1.8.1" 105 | sky_engine: 106 | dependency: transitive 107 | description: flutter 108 | source: sdk 109 | version: "0.0.99" 110 | source_span: 111 | dependency: transitive 112 | description: 113 | name: source_span 114 | url: "https://pub.flutter-io.cn" 115 | source: hosted 116 | version: "1.8.2" 117 | stack_trace: 118 | dependency: transitive 119 | description: 120 | name: stack_trace 121 | url: "https://pub.flutter-io.cn" 122 | source: hosted 123 | version: "1.10.0" 124 | stream_channel: 125 | dependency: transitive 126 | description: 127 | name: stream_channel 128 | url: "https://pub.flutter-io.cn" 129 | source: hosted 130 | version: "2.1.0" 131 | string_scanner: 132 | dependency: transitive 133 | description: 134 | name: string_scanner 135 | url: "https://pub.flutter-io.cn" 136 | source: hosted 137 | version: "1.1.0" 138 | term_glyph: 139 | dependency: transitive 140 | description: 141 | name: term_glyph 142 | url: "https://pub.flutter-io.cn" 143 | source: hosted 144 | version: "1.2.0" 145 | test_api: 146 | dependency: transitive 147 | description: 148 | name: test_api 149 | url: "https://pub.flutter-io.cn" 150 | source: hosted 151 | version: "0.4.9" 152 | vector_math: 153 | dependency: transitive 154 | description: 155 | name: vector_math 156 | url: "https://pub.flutter-io.cn" 157 | source: hosted 158 | version: "2.1.2" 159 | sdks: 160 | dart: ">=2.17.0-0 <3.0.0" 161 | flutter: ">=1.20.0" 162 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_file_preview_example 2 | description: Demonstrates how to use the flutter_file_preview plugin. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | environment: 9 | sdk: ">=2.7.0 <3.0.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | 15 | flutter_file_preview: 16 | # When depending on this package from a real application you should use: 17 | # flutter_file_preview: ^x.y.z 18 | # See https://dart.dev/tools/pub/dependencies#version-constraints 19 | # The example app is bundled with the plugin so we use a path dependency on 20 | # the parent directory to use the current plugin's version. 21 | path: ../ 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | cupertino_icons: ^0.1.3 26 | 27 | dev_dependencies: 28 | flutter_test: 29 | sdk: flutter 30 | 31 | # For information on the generic Dart part of this file, see the 32 | # following page: https://dart.dev/tools/pub/pubspec 33 | 34 | # The following section is specific to Flutter. 35 | flutter: 36 | 37 | # The following line ensures that the Material Icons font is 38 | # included with your application, so that you can use the icons in 39 | # the material Icons class. 40 | uses-material-design: true 41 | 42 | # To add assets to your application, add an assets section, like this: 43 | # assets: 44 | # - images/a_dot_burr.jpeg 45 | # - images/a_dot_ham.jpeg 46 | 47 | # An image asset can refer to one or more resolution-specific "variants", see 48 | # https://flutter.dev/assets-and-images/#resolution-aware. 49 | 50 | # For details regarding adding assets from package dependencies, see 51 | # https://flutter.dev/assets-and-images/#from-packages 52 | 53 | # To add custom fonts to your application, add a fonts section here, 54 | # in this "flutter" section. Each entry in this list should have a 55 | # "family" key with the font family name, and a "fonts" key with a 56 | # list giving the asset and other descriptors for the font. For 57 | # example: 58 | # fonts: 59 | # - family: Schyler 60 | # fonts: 61 | # - asset: fonts/Schyler-Regular.ttf 62 | # - asset: fonts/Schyler-Italic.ttf 63 | # style: italic 64 | # - family: Trajan Pro 65 | # fonts: 66 | # - asset: fonts/TrajanPro.ttf 67 | # - asset: fonts/TrajanPro_Bold.ttf 68 | # weight: 700 69 | # 70 | # For details regarding fonts from package dependencies, 71 | # see https://flutter.dev/custom-fonts/#from-packages 72 | -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_file_preview_example/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Verify Platform version', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that platform version is retrieved. 19 | expect( 20 | find.byWidgetPredicate( 21 | (Widget widget) => widget is Text && 22 | widget.data.startsWith('Running on:'), 23 | ), 24 | findsOneWidget, 25 | ); 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | /Flutter/flutter_export_environment.sh -------------------------------------------------------------------------------- /ios/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/ios/Assets/.gitkeep -------------------------------------------------------------------------------- /ios/Classes/FilePreviewVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // FilePreviewVC.h 3 | // barcode_scan 4 | // 5 | // Created by wenjunhuang on 2018/9/6. 6 | // 7 | 8 | #import 9 | 10 | @interface FilePreviewVC : UIViewController 11 | @property (nonatomic, copy) NSString *url; 12 | @property (nonatomic, copy) NSString *backImgPath; 13 | @end 14 | -------------------------------------------------------------------------------- /ios/Classes/FilePreviewVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // FilePreviewVC.m 3 | // barcode_scan 4 | // 5 | // Created by wenjunhuang on 2018/9/6. 6 | // 7 | 8 | #import "FilePreviewVC.h" 9 | 10 | @interface FilePreviewVC () 11 | @property (nonatomic, strong) UIWebView *myWebView; 12 | @end 13 | 14 | @implementation FilePreviewVC 15 | 16 | - (void)viewDidLoad { 17 | [super viewDidLoad]; 18 | [self setNeedsStatusBarAppearanceUpdate]; 19 | UIImage *backIcon = [UIImage imageWithContentsOfFile:self.backImgPath]; 20 | UIButton *backBtn = [[UIButton alloc] initWithFrame: CGRectMake(0, 0, 10, 20)]; 21 | [backBtn setImage:backIcon forState:UIControlStateNormal]; 22 | [backBtn addTarget:self action:@selector(close) forControlEvents:UIControlEventTouchUpInside]; 23 | self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn]; 24 | self.navigationController.navigationBar.backgroundColor = [UIColor whiteColor]; 25 | self.myWebView = [[UIWebView alloc] initWithFrame: CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; 26 | self.myWebView.scalesPageToFit = YES;//使文档的显示范围适合UIWebView的bounds 27 | [self.view addSubview:self.myWebView]; 28 | } 29 | 30 | - (void)viewWillAppear:(BOOL)animated { 31 | NSURL *filePath = [NSURL URLWithString:self.url]; 32 | NSURLRequest *request = [NSURLRequest requestWithURL: filePath]; 33 | [self.myWebView loadRequest:request]; 34 | } 35 | 36 | - (void)close { 37 | [self dismissViewControllerAnimated:true completion:nil]; 38 | } 39 | 40 | - (UIStatusBarStyle)preferredStatusBarStyle{ 41 | if (@available(iOS 13.0, *)) { 42 | return UIStatusBarStyleDarkContent; 43 | } else { 44 | return UIStatusBarStyleDefault; 45 | } 46 | } 47 | 48 | - (void)setStatusBarBackgroundColor:(UIColor *)color { 49 | UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"] valueForKey:@"statusBar"]; 50 | 51 | if ([statusBar respondsToSelector:@selector(setBackgroundColor:)]) { 52 | statusBar.backgroundColor = color; 53 | } 54 | } 55 | 56 | - (void)didReceiveMemoryWarning { 57 | [super didReceiveMemoryWarning]; 58 | // Dispose of any resources that can be recreated. 59 | } 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /ios/Classes/FlutterFilePreviewPlugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface FlutterFilePreviewPlugin : NSObject 4 | @property (nonatomic, assign) UIViewController *hostViewController; 5 | @property (nonatomic, copy) NSString *backImgPath; 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Classes/FlutterFilePreviewPlugin.m: -------------------------------------------------------------------------------- 1 | #import "FlutterFilePreviewPlugin.h" 2 | #import "FilePreviewVC.h" 3 | 4 | @implementation FlutterFilePreviewPlugin 5 | + (void)registerWithRegistrar:(NSObject*)registrar { 6 | FlutterMethodChannel* channel = [FlutterMethodChannel 7 | methodChannelWithName:@"flutter_file_preview" 8 | binaryMessenger:[registrar messenger]]; 9 | FlutterFilePreviewPlugin* instance = [[FlutterFilePreviewPlugin alloc] init]; 10 | instance.hostViewController = [UIApplication sharedApplication].delegate.window.rootViewController; 11 | NSString *backImgKey = [registrar lookupKeyForAsset:@"assets/images/ic_back.png" fromPackage:@"flutter_file_preview"]; 12 | NSString *backImgPath = [[NSBundle mainBundle] pathForResource:backImgKey ofType:nil]; 13 | instance.backImgPath = backImgPath; 14 | [registrar addMethodCallDelegate:instance channel:channel]; 15 | 16 | } 17 | 18 | - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { 19 | if ([@"openFile" isEqualToString:call.method]) { 20 | NSString *path = call.arguments[@"path"]; 21 | NSString *title = call.arguments[@"title"]; 22 | FilePreviewVC *preview = [[FilePreviewVC alloc] init]; 23 | preview.backImgPath = self.backImgPath; 24 | preview.url = path; 25 | preview.title = title != NULL ? title : @"文件预览"; 26 | UINavigationController *navCtrl = [[UINavigationController alloc] initWithRootViewController:preview]; 27 | [self.hostViewController presentViewController:navCtrl animated:YES completion:nil]; 28 | } else if ([@"getPlatformVersion" isEqualToString:call.method]) { 29 | result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]); 30 | } else { 31 | result(FlutterMethodNotImplemented); 32 | } 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /ios/flutter_file_preview.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. 3 | # Run `pod lib lint flutter_file_preview.podspec' to validate before publishing. 4 | # 5 | Pod::Spec.new do |s| 6 | s.name = 'flutter_file_preview' 7 | s.version = '0.0.1' 8 | s.summary = 'A new flutter plugin project.' 9 | s.description = <<-DESC 10 | A new flutter plugin project. 11 | DESC 12 | s.homepage = 'http://example.com' 13 | s.license = { :file => '../LICENSE' } 14 | s.author = { 'Your Company' => 'email@example.com' } 15 | s.source = { :path => '.' } 16 | s.source_files = 'Classes/**/*' 17 | s.public_header_files = 'Classes/**/*.h' 18 | s.dependency 'Flutter' 19 | s.platform = :ios, '8.0' 20 | 21 | # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. 22 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } 23 | end 24 | -------------------------------------------------------------------------------- /lib/flutter_file_preview.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'dart:async'; 3 | import 'dart:io'; 4 | 5 | import 'package:flutter/services.dart'; 6 | 7 | class FlutterFilePreview { 8 | static const MethodChannel _channel = 9 | const MethodChannel('flutter_file_preview'); 10 | 11 | static Future openFile(String path, { 12 | String title = '' 13 | }) async { 14 | Map map = { 15 | "path": path, 16 | "title": title 17 | }; 18 | final String result = await _channel.invokeMethod('openFile', map); 19 | return result; 20 | } 21 | 22 | static Future openDebug() async { 23 | String result = 'false'; 24 | if (Platform.isAndroid) { 25 | result = await _channel.invokeMethod('openDebug'); 26 | } 27 | return result; 28 | } 29 | 30 | static Future get platformVersion async { 31 | final String version = await _channel.invokeMethod('getPlatformVersion'); 32 | return version; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.flutter-io.cn" 9 | source: hosted 10 | version: "2.8.2" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.flutter-io.cn" 16 | source: hosted 17 | version: "2.1.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.flutter-io.cn" 23 | source: hosted 24 | version: "1.2.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.flutter-io.cn" 30 | source: hosted 31 | version: "1.3.1" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.flutter-io.cn" 37 | source: hosted 38 | version: "1.1.0" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.flutter-io.cn" 44 | source: hosted 45 | version: "1.16.0" 46 | fake_async: 47 | dependency: transitive 48 | description: 49 | name: fake_async 50 | url: "https://pub.flutter-io.cn" 51 | source: hosted 52 | version: "1.3.0" 53 | flutter: 54 | dependency: "direct main" 55 | description: flutter 56 | source: sdk 57 | version: "0.0.0" 58 | flutter_test: 59 | dependency: "direct dev" 60 | description: flutter 61 | source: sdk 62 | version: "0.0.0" 63 | matcher: 64 | dependency: transitive 65 | description: 66 | name: matcher 67 | url: "https://pub.flutter-io.cn" 68 | source: hosted 69 | version: "0.12.11" 70 | material_color_utilities: 71 | dependency: transitive 72 | description: 73 | name: material_color_utilities 74 | url: "https://pub.flutter-io.cn" 75 | source: hosted 76 | version: "0.1.4" 77 | meta: 78 | dependency: transitive 79 | description: 80 | name: meta 81 | url: "https://pub.flutter-io.cn" 82 | source: hosted 83 | version: "1.7.0" 84 | path: 85 | dependency: transitive 86 | description: 87 | name: path 88 | url: "https://pub.flutter-io.cn" 89 | source: hosted 90 | version: "1.8.1" 91 | sky_engine: 92 | dependency: transitive 93 | description: flutter 94 | source: sdk 95 | version: "0.0.99" 96 | source_span: 97 | dependency: transitive 98 | description: 99 | name: source_span 100 | url: "https://pub.flutter-io.cn" 101 | source: hosted 102 | version: "1.8.2" 103 | stack_trace: 104 | dependency: transitive 105 | description: 106 | name: stack_trace 107 | url: "https://pub.flutter-io.cn" 108 | source: hosted 109 | version: "1.10.0" 110 | stream_channel: 111 | dependency: transitive 112 | description: 113 | name: stream_channel 114 | url: "https://pub.flutter-io.cn" 115 | source: hosted 116 | version: "2.1.0" 117 | string_scanner: 118 | dependency: transitive 119 | description: 120 | name: string_scanner 121 | url: "https://pub.flutter-io.cn" 122 | source: hosted 123 | version: "1.1.0" 124 | term_glyph: 125 | dependency: transitive 126 | description: 127 | name: term_glyph 128 | url: "https://pub.flutter-io.cn" 129 | source: hosted 130 | version: "1.2.0" 131 | test_api: 132 | dependency: transitive 133 | description: 134 | name: test_api 135 | url: "https://pub.flutter-io.cn" 136 | source: hosted 137 | version: "0.4.9" 138 | vector_math: 139 | dependency: transitive 140 | description: 141 | name: vector_math 142 | url: "https://pub.flutter-io.cn" 143 | source: hosted 144 | version: "2.1.2" 145 | sdks: 146 | dart: ">=2.17.0-0 <3.0.0" 147 | flutter: ">=1.20.0" 148 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_file_preview 2 | description: A new flutter plugin project. 3 | version: 0.0.1 4 | author: 5 | homepage: 6 | 7 | environment: 8 | sdk: ">=2.7.0 <3.0.0" 9 | flutter: ">=1.20.0 <2.0.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | 15 | dev_dependencies: 16 | flutter_test: 17 | sdk: flutter 18 | 19 | # For information on the generic Dart part of this file, see the 20 | # following page: https://dart.dev/tools/pub/pubspec 21 | 22 | # The following section is specific to Flutter. 23 | flutter: 24 | # This section identifies this Flutter project as a plugin project. 25 | # The 'pluginClass' and Android 'package' identifiers should not ordinarily 26 | # be modified. They are used by the tooling to maintain consistency when 27 | # adding or updating assets for this project. 28 | plugin: 29 | platforms: 30 | android: 31 | package: com.zzaning.flutter_file_preview 32 | pluginClass: FlutterFilePreviewPlugin 33 | ios: 34 | pluginClass: FlutterFilePreviewPlugin 35 | 36 | # To add assets to your plugin package, add an assets section, like this: 37 | assets: 38 | - assets/images/ic_back.png 39 | # 40 | # For details regarding assets in packages, see 41 | # https://flutter.dev/assets-and-images/#from-packages 42 | # 43 | # An image asset can refer to one or more resolution-specific "variants", see 44 | # https://flutter.dev/assets-and-images/#resolution-aware. 45 | 46 | # To add custom fonts to your plugin package, add a fonts section here, 47 | # in this "flutter" section. Each entry in this list should have a 48 | # "family" key with the font family name, and a "fonts" key with a 49 | # list giving the asset and other descriptors for the font. For 50 | # example: 51 | # fonts: 52 | # - family: Schyler 53 | # fonts: 54 | # - asset: fonts/Schyler-Regular.ttf 55 | # - asset: fonts/Schyler-Italic.ttf 56 | # style: italic 57 | # - family: Trajan Pro 58 | # fonts: 59 | # - asset: fonts/TrajanPro.ttf 60 | # - asset: fonts/TrajanPro_Bold.ttf 61 | # weight: 700 62 | # 63 | # For details regarding fonts in packages, see 64 | # https://flutter.dev/custom-fonts/#from-packages 65 | -------------------------------------------------------------------------------- /screenshot/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/screenshot/demo.gif -------------------------------------------------------------------------------- /test/docs/test_file_for.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/test/docs/test_file_for.docx -------------------------------------------------------------------------------- /test/docs/test_file_for.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/test/docs/test_file_for.pdf -------------------------------------------------------------------------------- /test/docs/test_file_for.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyoge/flutter_file_preview/2e8029b6b8f50d8feb3335788f1bf402736480ce/test/docs/test_file_for.xlsx -------------------------------------------------------------------------------- /test/flutter_file_preview_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:flutter_file_preview/flutter_file_preview.dart'; 4 | 5 | void main() { 6 | const MethodChannel channel = MethodChannel('flutter_file_preview'); 7 | 8 | TestWidgetsFlutterBinding.ensureInitialized(); 9 | 10 | setUp(() { 11 | channel.setMockMethodCallHandler((MethodCall methodCall) async { 12 | return '42'; 13 | }); 14 | }); 15 | 16 | tearDown(() { 17 | channel.setMockMethodCallHandler(null); 18 | }); 19 | 20 | test('getPlatformVersion', () async { 21 | expect(await FlutterFilePreview.platformVersion, '42'); 22 | }); 23 | } 24 | --------------------------------------------------------------------------------