ก๊วนซอฟท์แวร์ </softganz> SoftGang (Gang Software)

Web &amp; Software Developer Gang.

My First Flutter App

by Little Bear @2 เม.ย. 64 12:16 ( IP : 171...122 ) | Tags : App , Flutter

เขียน Flutter App

Create new app

flutter create --org com.yourdomain appname

Set App signing team to your email

Open app using VSCode and run

open ios/Runner.xcworkspace
Then build iod
flutter build ios

In Runner / Targets/Runner -> select Team

If have already created a project: Change package name by add dependencies changeapppackagename: and run

flutter pub run changeapppackagename:main com.package.appname

Run in release mode

flutter run --release

Settings

  1. เปลี่ยนชื่อ App Icon
  2. Add permission: กำหนด Permission ด้วยนะ ไม่อย่างนั้นจะเปิด WebView เข้าเน็ตไม่ได้

iOS: แก้ไขไฟล์ ios/Runner/info.plist

    <key>CFBundleName</key>
    <string>APP NAME</string>
    <key>io.flutter.embeddedviewspreview</key>
    <string>YES</string>

Android manifest: แก้ไขไฟล์ android/app/src/main/AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET" />
<application
    android:label="APP NAME"
>

macOS: in macos/Runner/DebugProfile.entitlements and macos/Runner/Release.entitlements

    <key>com.apple.security.network.client</key>
    <true/>

App Icon:

File : pubspec.yaml

dependencies:
...
flutter_launcher_icons: ^0.9.0
flutter_icons:<br />
    image_path: "assets/icon/logo_192.png"<br />
    android: true
    ios: true
    remove_alpha_ios: true
# flutter pub run flutter_launcher_icons:main

เอาคำว่า "DEBUG" ของเธอคืนไป

ใส่ไว้ใน MaterialApp

debugShowCheckedModeBanner: false

Add dependencies แล้ว แต่ import package ไม่ได้

flutter packages get
close project and re-open project

Upgrade version iOS แล้วมองไม่เห็น device

ให้ดาวน์โหลดไฟล์จาก GitHub แล้วนำไฟล์มาวางไว้ที่ (~/Application/) Xcode app ใน path Contents/Developer/Platform/iPhoneOS.platform/DeviceSupport

แล้วก็ Flutter Clean

flutter clean

App Permission

การจัดการ App Permission

หัวข้ออื่น

ที่มา

Comment #1
Posted @4 มี.ค. 65 17:22 ip : 162...38

Also I would like to add working with non-coding Flutter app development prototypes allows you to directly communicate with the end-user, which is the nicest part (at least in our opinion). For example, if a product manager or other marketer wants to see how customers would engage with a prototype, they may watch them play with it. They'll have a better sense of what should and shouldn't be included in the final edition this way.