├── .gitignore ├── styles └── website.css ├── Chapter1 ├── code │ └── hello_world │ │ ├── android │ │ ├── gradle.properties │ │ ├── app │ │ │ ├── src │ │ │ │ ├── main │ │ │ │ │ ├── res │ │ │ │ │ │ ├── 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 │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ └── drawable │ │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── java │ │ │ │ │ │ └── com │ │ │ │ │ │ │ └── example │ │ │ │ │ │ │ └── hello_world │ │ │ │ │ │ │ └── MainActivity.java │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ ├── debug │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── profile │ │ │ │ │ └── AndroidManifest.xml │ │ │ └── build.gradle │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ ├── settings.gradle │ │ └── build.gradle │ │ ├── ios │ │ ├── Flutter │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ └── AppFrameworkInfo.plist │ │ ├── Runner │ │ │ ├── AppDelegate.h │ │ │ ├── Assets.xcassets │ │ │ │ ├── LaunchImage.imageset │ │ │ │ │ ├── LaunchImage.png │ │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ │ ├── README.md │ │ │ │ │ └── Contents.json │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ ├── 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-1024x1024@1x.png │ │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ │ └── Contents.json │ │ │ ├── main.m │ │ │ ├── AppDelegate.m │ │ │ ├── Info.plist │ │ │ └── Base.lproj │ │ │ │ ├── Main.storyboard │ │ │ │ └── LaunchScreen.storyboard │ │ ├── Runner.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── Runner.xcodeproj │ │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ │ ├── xcshareddata │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ │ └── project.pbxproj │ │ ├── .metadata │ │ ├── README.md │ │ ├── test │ │ └── widget_test.dart │ │ ├── .gitignore │ │ ├── pubspec.yaml │ │ ├── pubspec.lock │ │ └── lib │ │ └── main.dart ├── assets │ ├── unzip.png │ ├── open_as.png │ ├── as_open_init.png │ ├── as_set_proxy.png │ ├── avd_manager.png │ ├── avd_manager2.png │ ├── avd_manager3.png │ ├── avd_manager4.png │ ├── avd_manager5.png │ ├── avd_manager6.png │ ├── avd_manager7.png │ ├── avd_manager8.png │ ├── avd_manager9.png │ ├── env_variable.png │ ├── jdk_download.png │ ├── jdk_install.png │ ├── create_new_avd.png │ ├── create_project.png │ ├── create_project2.png │ ├── create_project3.png │ ├── flutter_doctor.png │ ├── flutter_doctor2.png │ ├── flutter_doctor3.png │ ├── starting_debug.png │ ├── jdk_env_variable.png │ ├── android_studio_error.png │ ├── accept_android_license.png │ ├── jdk_install_completed.png │ ├── vscode_install_plugin.png │ ├── accept_android_license2.png │ ├── android_sdk_env_variable.png │ ├── android_studio_download.png │ ├── as_settings_sdkdownload.png │ ├── as_settings_sdklocation.png │ ├── as_settings_sdklocation2.png │ ├── as_open_settings_sdkmanager.png │ ├── as_set_proxy_test_connection.png │ ├── as_settings_sdktoolsdownload.png │ ├── vscode_install_plugin_completed.png │ ├── as_settings_sdkdownload_completed.png │ └── as_set_proxy_test_connection_successful.png ├── README.md ├── HelloFlutter.md ├── SystemRequirements.md ├── InstallFlutter.md ├── index.html ├── HelloFlutter.html └── SystemRequirements.html ├── favicon.ico ├── assets ├── wechat.jpg ├── rn_framework.png └── flutter_framework.png ├── gitbook ├── images │ ├── favicon.ico │ └── apple-touch-icon-precomposed-152.png ├── fonts │ └── fontawesome │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 ├── gitbook-plugin-github │ └── plugin.js ├── gitbook-plugin-back-to-top-button │ ├── plugin.js │ └── plugin.css ├── gitbook-plugin-code │ ├── plugin.css │ └── plugin.js ├── gitbook-plugin-lunr │ ├── search-lunr.js │ └── lunr.min.js ├── gitbook-plugin-highlight │ └── ebook.css └── gitbook-plugin-fontsettings │ ├── fontsettings.js │ └── website.css ├── license_script.txt ├── LICENSE ├── index.html └── Contrast.html /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store 2 | .idea 3 | .vscode 4 | node_modules -------------------------------------------------------------------------------- /styles/website.css: -------------------------------------------------------------------------------- 1 | .gitbook-link { 2 | display: none !important; 3 | } -------------------------------------------------------------------------------- /Chapter1/code/hello_world/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/favicon.ico -------------------------------------------------------------------------------- /assets/wechat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/assets/wechat.jpg -------------------------------------------------------------------------------- /Chapter1/assets/unzip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/unzip.png -------------------------------------------------------------------------------- /assets/rn_framework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/assets/rn_framework.png -------------------------------------------------------------------------------- /Chapter1/assets/open_as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/open_as.png -------------------------------------------------------------------------------- /gitbook/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/gitbook/images/favicon.ico -------------------------------------------------------------------------------- /assets/flutter_framework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/assets/flutter_framework.png -------------------------------------------------------------------------------- /Chapter1/assets/as_open_init.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/as_open_init.png -------------------------------------------------------------------------------- /Chapter1/assets/as_set_proxy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/as_set_proxy.png -------------------------------------------------------------------------------- /Chapter1/assets/avd_manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/avd_manager.png -------------------------------------------------------------------------------- /Chapter1/assets/avd_manager2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/avd_manager2.png -------------------------------------------------------------------------------- /Chapter1/assets/avd_manager3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/avd_manager3.png -------------------------------------------------------------------------------- /Chapter1/assets/avd_manager4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/avd_manager4.png -------------------------------------------------------------------------------- /Chapter1/assets/avd_manager5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/avd_manager5.png -------------------------------------------------------------------------------- /Chapter1/assets/avd_manager6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/avd_manager6.png -------------------------------------------------------------------------------- /Chapter1/assets/avd_manager7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/avd_manager7.png -------------------------------------------------------------------------------- /Chapter1/assets/avd_manager8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/avd_manager8.png -------------------------------------------------------------------------------- /Chapter1/assets/avd_manager9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/avd_manager9.png -------------------------------------------------------------------------------- /Chapter1/assets/env_variable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/env_variable.png -------------------------------------------------------------------------------- /Chapter1/assets/jdk_download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/jdk_download.png -------------------------------------------------------------------------------- /Chapter1/assets/jdk_install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/jdk_install.png -------------------------------------------------------------------------------- /Chapter1/assets/create_new_avd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/create_new_avd.png -------------------------------------------------------------------------------- /Chapter1/assets/create_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/create_project.png -------------------------------------------------------------------------------- /Chapter1/assets/create_project2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/create_project2.png -------------------------------------------------------------------------------- /Chapter1/assets/create_project3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/create_project3.png -------------------------------------------------------------------------------- /Chapter1/assets/flutter_doctor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/flutter_doctor.png -------------------------------------------------------------------------------- /Chapter1/assets/flutter_doctor2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/flutter_doctor2.png -------------------------------------------------------------------------------- /Chapter1/assets/flutter_doctor3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/flutter_doctor3.png -------------------------------------------------------------------------------- /Chapter1/assets/starting_debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/starting_debug.png -------------------------------------------------------------------------------- /Chapter1/assets/jdk_env_variable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/jdk_env_variable.png -------------------------------------------------------------------------------- /Chapter1/assets/android_studio_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/android_studio_error.png -------------------------------------------------------------------------------- /Chapter1/assets/accept_android_license.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/accept_android_license.png -------------------------------------------------------------------------------- /Chapter1/assets/jdk_install_completed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/jdk_install_completed.png -------------------------------------------------------------------------------- /Chapter1/assets/vscode_install_plugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/vscode_install_plugin.png -------------------------------------------------------------------------------- /gitbook/fonts/fontawesome/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/gitbook/fonts/fontawesome/FontAwesome.otf -------------------------------------------------------------------------------- /Chapter1/assets/accept_android_license2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/accept_android_license2.png -------------------------------------------------------------------------------- /Chapter1/assets/android_sdk_env_variable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/android_sdk_env_variable.png -------------------------------------------------------------------------------- /Chapter1/assets/android_studio_download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/android_studio_download.png -------------------------------------------------------------------------------- /Chapter1/assets/as_settings_sdkdownload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/as_settings_sdkdownload.png -------------------------------------------------------------------------------- /Chapter1/assets/as_settings_sdklocation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/as_settings_sdklocation.png -------------------------------------------------------------------------------- /Chapter1/assets/as_settings_sdklocation2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/as_settings_sdklocation2.png -------------------------------------------------------------------------------- /Chapter1/assets/as_open_settings_sdkmanager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/as_open_settings_sdkmanager.png -------------------------------------------------------------------------------- /Chapter1/assets/as_set_proxy_test_connection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/as_set_proxy_test_connection.png -------------------------------------------------------------------------------- /Chapter1/assets/as_settings_sdktoolsdownload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/as_settings_sdktoolsdownload.png -------------------------------------------------------------------------------- /gitbook/fonts/fontawesome/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/gitbook/fonts/fontawesome/fontawesome-webfont.eot -------------------------------------------------------------------------------- /gitbook/fonts/fontawesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/gitbook/fonts/fontawesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /gitbook/fonts/fontawesome/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/gitbook/fonts/fontawesome/fontawesome-webfont.woff -------------------------------------------------------------------------------- /Chapter1/assets/vscode_install_plugin_completed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/vscode_install_plugin_completed.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /gitbook/fonts/fontawesome/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/gitbook/fonts/fontawesome/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /gitbook/images/apple-touch-icon-precomposed-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/gitbook/images/apple-touch-icon-precomposed-152.png -------------------------------------------------------------------------------- /Chapter1/README.md: -------------------------------------------------------------------------------- 1 | # 本章内容 2 | 3 | 1. [推荐配置](Chapter1/SystemRequirements.md) 4 | 2. [安装Flutter环境](Chapter1/InstallFlutter.md) 5 | 3. [Hello Flutter](Chapter1/HelloFlutter.md) 6 | 7 | -------------------------------------------------------------------------------- /Chapter1/assets/as_settings_sdkdownload_completed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/as_settings_sdkdownload_completed.png -------------------------------------------------------------------------------- /Chapter1/assets/as_set_proxy_test_connection_successful.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/assets/as_set_proxy_test_connection_successful.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianchengLee/TianchengLee.github.io/master/Chapter1/code/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/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 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/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-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/.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: 8661d8aecd626f7f57ccbcb735553edc05a2e713 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/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. -------------------------------------------------------------------------------- /Chapter1/code/hello_world/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /gitbook/gitbook-plugin-github/plugin.js: -------------------------------------------------------------------------------- 1 | require([ 'gitbook' ], function (gitbook) { 2 | gitbook.events.bind('start', function (e, config) { 3 | var githubURL = config.github.url; 4 | 5 | gitbook.toolbar.createButton({ 6 | icon: 'fa fa-github', 7 | label: 'GitHub', 8 | position: 'right', 9 | onClick: function() { 10 | window.open(githubURL) 11 | } 12 | }); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/android/app/src/main/java/com/example/hello_world/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.hello_world; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "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 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/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 | -------------------------------------------------------------------------------- /license_script.txt: -------------------------------------------------------------------------------- 1 | 知识共享许可协议
Flutter从入门到精通李天成 采用 知识共享 署名-非商业性使用 4.0 国际 许可协议进行许可。 -------------------------------------------------------------------------------- /Chapter1/code/hello_world/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/README.md: -------------------------------------------------------------------------------- 1 | # hello_world 2 | 3 | A new Flutter project. 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.io/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.io/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.io/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /gitbook/gitbook-plugin-back-to-top-button/plugin.js: -------------------------------------------------------------------------------- 1 | var gitbook = window.gitbook; 2 | 3 | gitbook.events.on('page.change', function() { 4 | 5 | var back_to_top_button = ['
'].join(""); 6 | $(".book").append(back_to_top_button) 7 | 8 | $(".back-to-top").hide(); 9 | 10 | $('.book-body,.body-inner').on('scroll', function () { 11 | if ($(this).scrollTop() > 100) { 12 | $('.back-to-top').fadeIn(); 13 | } else { 14 | $('.back-to-top').fadeOut(); 15 | } 16 | }); 17 | 18 | $('.back-to-top').click(function () { 19 | $('.book-body,.body-inner').animate({ 20 | scrollTop: 0 21 | }, 800); 22 | return false; 23 | }); 24 | 25 | }); 26 | -------------------------------------------------------------------------------- /gitbook/gitbook-plugin-code/plugin.css: -------------------------------------------------------------------------------- 1 | #code-textarea { 2 | height: 0; 3 | position: fixed; 4 | top: -1000px; 5 | width: 0; 6 | } 7 | 8 | .code-wrapper { 9 | position: relative; 10 | } 11 | 12 | .code-wrapper i { 13 | color: #c1c7cd; 14 | cursor: pointer; 15 | font-size: 12px; 16 | font-weight: bold; 17 | position: absolute; 18 | right: 1em; 19 | top: 1em; 20 | } 21 | 22 | .code-wrapper pre { 23 | background: #f7f8f9; 24 | border-radius: 3px; 25 | counter-reset: line; 26 | font-size: 15px; 27 | } 28 | 29 | .code-wrapper pre > code > span.code-line:before { 30 | counter-increment: line; 31 | color: #c1c7cd; 32 | content: counter(line); 33 | display: inline-block; 34 | font-size: 12px; 35 | margin-right: 1.5em; 36 | width: 1em; 37 | } 38 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/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 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/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:hello_world/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | # Creative Commons Attribution-NonCommercial 4.0 International License 2 | 3 | Disclaimer: This is a human-readable summary of (and not a substitute for) the [license](http://creativecommons.org/licenses/by-nc/4.0/legalcode). 4 | 5 | You are free to: 6 | 7 | - Share — copy and redistribute the material in any medium or format 8 | - Adapt — remix, transform, and build upon the material 9 | 10 | The licensor cannot revoke these freedoms as long as you follow the license terms. 11 | 12 | Under the following terms: 13 | 14 | - Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. 15 | - NonCommercial — You may not use the material for commercial purposes. 16 | - No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. 17 | 18 | Notices: 19 | 20 | You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation. 21 | 22 | No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material. -------------------------------------------------------------------------------- /gitbook/gitbook-plugin-back-to-top-button/plugin.css: -------------------------------------------------------------------------------- 1 | .back-to-top { 2 | position: fixed; 3 | bottom: 25px; 4 | right: 25px; 5 | background: rgba(0, 0, 0, 0.5); 6 | width: 50px; 7 | height: 50px; 8 | display: block; 9 | text-decoration: none; 10 | -webkit-border-radius: 35px; 11 | -moz-border-radius: 35px; 12 | border-radius: 35px; 13 | display: none; 14 | } 15 | .back-to-top i { 16 | color: #fff; 17 | margin: 0; 18 | position: relative; 19 | left: 15px; 20 | top: 14px; 21 | font-size: 22px; 22 | } 23 | .back-to-top:hover { 24 | background: rgba(0, 0, 0, 0.9); 25 | cursor: pointer; 26 | } 27 | .book.color-theme-1 .back-to-top { 28 | background: rgba(112, 66, 20, 0.5); 29 | } 30 | .book.color-theme-1 .back-to-top i { 31 | color: #f3eacb; 32 | } 33 | .book.color-theme-1 .back-to-top:hover { 34 | background: rgba(112, 66, 20, 0.9); 35 | } 36 | .book.color-theme-2 .back-to-top { 37 | background: rgba(189, 202, 219, 0.5); 38 | } 39 | .book.color-theme-2 .back-to-top i { 40 | color: #1C1F2B; 41 | } 42 | .book.color-theme-2 .back-to-top:hover { 43 | background: rgba(189, 202, 219, 0.9); 44 | } 45 | 46 | @media only screen 47 | and (min-device-width: 320px) 48 | and (max-device-width: 480px) 49 | and (-webkit-min-device-pixel-ratio: 2) 50 | and (orientation: portrait) { 51 | .back-to-top { 52 | bottom: 10px; 53 | right: 10px; 54 | } 55 | } -------------------------------------------------------------------------------- /Chapter1/code/hello_world/.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 | # Visual Studio Code related 19 | .vscode/ 20 | 21 | # Flutter/Dart/Pub related 22 | **/doc/api/ 23 | .dart_tool/ 24 | .flutter-plugins 25 | .packages 26 | .pub-cache/ 27 | .pub/ 28 | /build/ 29 | 30 | # Android related 31 | **/android/**/gradle-wrapper.jar 32 | **/android/.gradle 33 | **/android/captures/ 34 | **/android/gradlew 35 | **/android/gradlew.bat 36 | **/android/local.properties 37 | **/android/**/GeneratedPluginRegistrant.java 38 | 39 | # iOS/XCode related 40 | **/ios/**/*.mode1v3 41 | **/ios/**/*.mode2v3 42 | **/ios/**/*.moved-aside 43 | **/ios/**/*.pbxuser 44 | **/ios/**/*.perspectivev3 45 | **/ios/**/*sync/ 46 | **/ios/**/.sconsign.dblite 47 | **/ios/**/.tags* 48 | **/ios/**/.vagrant/ 49 | **/ios/**/DerivedData/ 50 | **/ios/**/Icon? 51 | **/ios/**/Pods/ 52 | **/ios/**/.symlinks/ 53 | **/ios/**/profile 54 | **/ios/**/xcuserdata 55 | **/ios/.generated/ 56 | **/ios/Flutter/App.framework 57 | **/ios/Flutter/Flutter.framework 58 | **/ios/Flutter/Generated.xcconfig 59 | **/ios/Flutter/app.flx 60 | **/ios/Flutter/app.zip 61 | **/ios/Flutter/flutter_assets/ 62 | **/ios/ServiceDefinitions.json 63 | **/ios/Runner/GeneratedPluginRegistrant.* 64 | 65 | # Exceptions to above rules. 66 | !**/ios/**/default.mode1v3 67 | !**/ios/**/default.mode2v3 68 | !**/ios/**/default.pbxuser 69 | !**/ios/**/default.perspectivev3 70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 71 | -------------------------------------------------------------------------------- /Chapter1/HelloFlutter.md: -------------------------------------------------------------------------------- 1 | # 创建第一个程序 2 | 3 | 环境安装完毕后,终于要开始做第一个Flutter的项目了! 4 | 5 | 在VSCode中使用快捷键 `ctrl + shift + p` 打开命令菜单,输入Flutter搜索相关命令,选择`Flutter: New Project` 6 | 7 | ![创建项目](./assets/vscode_install_plugin_completed.png) 8 | 9 | 输入项目名,需注意项目名必须全小写,连字符使用下划线`_` 10 | 11 | ![1552636415703](./assets/create_project.png) 12 | 13 | 选择项目的存放目录,将其放入code目录中 14 | 15 | ![1552636544772](./assets/create_project2.png) 16 | 17 | 建立完成后会自动打开该项目,初始化项目结构 18 | 19 | ![1552637131888](./assets/create_project3.png) 20 | 21 | 创建完项目后,如何运行呢? 22 | 23 | 1. 使用数据线连接一个Android手机(开启adb调试模式,真机调试,开发中常用) 24 | 2. 使用Android Virtual Device(Android虚拟设备,又名Android虚拟机、Android模拟器等,简称AVD) 25 | 26 | 为了学习和截图方便,教程中都会使用AVD 27 | 28 | 创建AVD,又需要借助Android Studio的帮助啦 29 | 30 | 打开`Configure` ==> `AVD Manager` 31 | 32 | ![1552637205533](./assets/avd_manager.png) 33 | 34 | 选择创建一个虚拟设备 35 | 36 | ![1552637237326](./assets/avd_manager2.png) 37 | 38 | 选择一个自己喜欢的尺寸(建议别太大了,小心撑破屏幕哦) 39 | 40 | ![1552637292052](./assets/avd_manager3.png) 41 | 42 | 选择系统镜像(使用哪个版本的Android系统) 43 | 44 | 由于开始安装Android SDK时并未下载系统镜像,所以此时需要先下载后创建 45 | 46 | 此处选择最新的正式版系统,Android 9.0 Pie,点击 `Download` 开始下载 47 | 48 | ![1552637329124](./assets/avd_manager4.png) 49 | 50 | 耐心等待下载中... 51 | 52 | ![1552637372065](./assets/avd_manager5.png) 53 | 54 | 下载完毕后点击 `finish` 55 | 56 | ![1552639337644](./assets/avd_manager6.png) 57 | 58 | 下载完毕后就可以点击下一步了 59 | 60 | ![1552639407042](./assets/avd_manager7.png) 61 | 62 | 进行相关配置,点击finish完成(默认配置即可) 63 | 64 | ![1552639455145](./assets/avd_manager8.png) 65 | 66 | 创建完成后点击播放按钮启动AVD 67 | 68 | ![1552639486575](./assets/avd_manager9.png) 69 | 70 | 开启后就会有一个AVD启动啦 71 | 72 | 在代码中使用启动调试,即可进行打包,随后会运行在AVD中 73 | 74 | ![1552639617227](./assets/starting_debug.png) -------------------------------------------------------------------------------- /Chapter1/code/hello_world/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | hello_world 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/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 | -------------------------------------------------------------------------------- /Chapter1/code/hello_world/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /gitbook/gitbook-plugin-lunr/search-lunr.js: -------------------------------------------------------------------------------- 1 | require([ 2 | 'gitbook', 3 | 'jquery' 4 | ], function(gitbook, $) { 5 | // Define global search engine 6 | function LunrSearchEngine() { 7 | this.index = null; 8 | this.store = {}; 9 | this.name = 'LunrSearchEngine'; 10 | } 11 | 12 | // Initialize lunr by fetching the search index 13 | LunrSearchEngine.prototype.init = function() { 14 | var that = this; 15 | var d = $.Deferred(); 16 | 17 | $.getJSON(gitbook.state.basePath+'/search_index.json') 18 | .then(function(data) { 19 | // eslint-disable-next-line no-undef 20 | that.index = lunr.Index.load(data.index); 21 | that.store = data.store; 22 | d.resolve(); 23 | }); 24 | 25 | return d.promise(); 26 | }; 27 | 28 | // Search for a term and return results 29 | LunrSearchEngine.prototype.search = function(q, offset, length) { 30 | var that = this; 31 | var results = []; 32 | 33 | if (this.index) { 34 | results = $.map(this.index.search(q), function(result) { 35 | var doc = that.store[result.ref]; 36 | 37 | return { 38 | title: doc.title, 39 | url: doc.url, 40 | body: doc.summary || doc.body 41 | }; 42 | }); 43 | } 44 | 45 | return $.Deferred().resolve({ 46 | query: q, 47 | results: results.slice(0, length), 48 | count: results.length 49 | }).promise(); 50 | }; 51 | 52 | // Set gitbook research 53 | gitbook.events.bind('start', function(e, config) { 54 | var engine = gitbook.search.getEngine(); 55 | if (!engine) { 56 | gitbook.search.setEngine(LunrSearchEngine, config); 57 | } 58 | }); 59 | }); 60 | -------------------------------------------------------------------------------- /Chapter1/SystemRequirements.md: -------------------------------------------------------------------------------- 1 | # 系统配置需求 2 | 3 | ## Windows平台 4 | 5 | > To install and run Flutter, your development environment must meet these minimum requirements: 6 | > 7 | > - **Operating Systems**: Windows 7 SP1 or later (64-bit) 8 | > 9 | > - **Disk Space**: 400 MB (does not include disk space for IDE/tools). 10 | > 11 | > - Tools 12 | > 13 | > : Flutter depends on these tools being available in your environment. 14 | > 15 | > - [Windows PowerShell 5.0](https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell) or newer (this is pre-installed with Windows 10) 16 | > 17 | > - [Git for Windows](https://git-scm.com/download/win) 2.x, with the **Use Git from the Windows Command Prompt** option. 18 | > 19 | > If Git for Windows is already installed, make sure you can run `git` commands from the command prompt or PowerShell. 20 | 21 | 官方建议: 22 | 23 | * 操作系统: Windows7 SP1及以上 (64位) 24 | * 硬盘空间:400MB (最低要求, 不包括IDE和其他的工具) 如果需要安装好完整的环境, 最好预留10G以上空间,多多益善嘛 25 | * 其他工具:在你的环境中Flutter还需要依赖一些其他的工具 26 | * Windows PowerShell 5.0及以上(在Windows10系统中已预装) 27 | * Git for Windows 2.x 28 | 29 | ## macOS平台 30 | 31 | > To install and run Flutter, your development environment must meet these minimum requirements: 32 | > 33 | > - **Operating Systems**: macOS (64-bit) 34 | > 35 | > - **Disk Space**: 700 MB (does not include disk space for IDE/tools). 36 | > 37 | > - Tools 38 | > 39 | > : Flutter depends on these command-line tools being available in your environment. 40 | > 41 | > - `bash` 42 | > - `curl` 43 | > - `git` 2.x 44 | > - `mkdir` 45 | > - `rm` 46 | > - `unzip` 47 | > - `which` 48 | 49 | 官方建议: 50 | 51 | * 操作系统:macOS 64位 52 | * 硬盘空间:700MB (同Windows, 多多益善) 53 | * 其他工具:在macOS下进行开发还需要具备如下指令,确保能使用以下命令即可(打开一个terminal挨个输入一遍, 没有出现`command not found`字样的错误即可) 54 | * `bash` 55 | * `curl` 56 | * `git` 2.x 57 | * `mkdir` 58 | * `rm` 59 | * `unzip` 60 | * `which` 61 | 62 | 由于Windows的受众面更广泛,后续一切操作都是基于Windows平台进行,macOS用户大同小异 63 | 64 | 如果需要打包iOS平台的App,则需要使用macOS进行开发 -------------------------------------------------------------------------------- /Chapter1/code/hello_world/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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.example.hello_world" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /gitbook/gitbook-plugin-code/plugin.js: -------------------------------------------------------------------------------- 1 | require(['gitbook', 'jQuery'], function(gitbook, $) { 2 | 3 | const TERMINAL_HOOK = '**[terminal]' 4 | 5 | var pluginConfig = {}; 6 | var timeouts = {}; 7 | 8 | function addCopyButton(wrapper) { 9 | wrapper.append( 10 | $('') 11 | .click(function() { 12 | copyCommand($(this)); 13 | }) 14 | ); 15 | } 16 | 17 | function addCopyTextarea() { 18 | 19 | /* Add also the text area that will allow to copy */ 20 | $('body').append('