Giter Site home page Giter Site logo

flutter_app's Introduction

flutter练习项目

A new Flutter application.

image

常见问题

1.flutter pub get慢

一直处在

Running "flutter packages get" in project_name...

具体操作

Linux 或 Mac

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

Windows 新增两个环境变量即可

PUB_HOSTED_URL ===== https://pub.flutter-io.cn
FLUTTER_STORAGE_BASE_URL ===== https://storage.flutter-io.cn

执行一下 flutter doctor命令

http://jimbray.xyz/post/using-flutter-in-china/

2.Json解析错误 Unhandled Exception: FormatException: Unexpected character (at character 2)

主要原因dio网络请求的时候返回的数据格式是非json格式,需要修改

responseType: ResponseType.plain

3.Webview 在ios平台下无法显示(引用原生view无法显示)

报错信息

Trying to embed a platform view but the PrerollContext does not support embedding

解决方法:增加info.plist文件中的健值对

<key>io.flutter.embedded_views_preview</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
   <key>NSAllowsArbitraryLoads</key>
   <true/>
</dict>

4.创建插件制定开发语言

flutter create -i objc -a java flutter_android_new

https://dart.dev/tools/pub/dependencies#sdk

flutter_app's People

Contributors

gf5353 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.