系统设计移动端

Flutter练手项目

2019-11-22  本文已影响0人  豆浆u条

项目地址

本项目包括:

运行环境

[✓] Flutter (Channel beta, v1.10.7, on Mac OS X 10.14.5 18F132, locale zh-Hans-CN)
    • Flutter version 1.10.7 at /Users/14cells/Android/flutter
    • Framework revision e70236e36c (3 weeks ago), 2019-10-02 09:32:30 -0700
    • Engine revision 9e6314d348
    • Dart version 2.6.0 (build 2.6.0-dev.0.0 1103600280)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/14cells/Android/SDK
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✗] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install:
        sudo gem install cocoapods

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 40.2.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] Connected device (1 available)
    • MI 5X • 1c7664100104 • android-arm64 • Android 8.1.0 (API 27)

注意事项

Android

在 res 下新增一个 xml 目录,创建network_security_config.xml文件

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config cleartextTrafficPermitted="true" />
</network-security-config>

AndroidManifest.xml文件下的application标签增加以下属性

<application

 android:networkSecurityConfig="@xml/network_security_config"

/>

iOS

Info.plist下编辑

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSAllowsArbitraryLoadsInWebContent</key>
    <true/>
</dict>

API接口

运行截图

基本控件(Widget)及一些自定义控件(Widget)

运行截图

Flutter i18n 实现国际化

使用到的或推荐的一些优秀的第三方插件

项目地址!
项目地址!!
项目地址!!!

上一篇 下一篇

猜你喜欢

热点阅读