開始使用
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
原生廣告是向使用者顯示的廣告素材資源,採用平台原生的 UI 元件。以程式碼來說,這表示原生廣告載入時,應用程式會收到包含素材資源的 NativeAd
物件,並由應用程式 (而非 Google Mobile Ads SDK) 負責顯示這些素材資源。
如果您想進一步控制廣告外觀的樣式,請使用這種廣告格式。
如果不需要這些功能,請改用其他廣告格式。
在 Flutter 應用程式中顯示原生廣告的方式有兩種:
- 原生範本:使用 Dart API 設定樣式的預先定義原生範本。
- 平台設定:使用 Android 和 iOS 版面配置工具定義的自訂平台專屬版面配置。
原生範本
範本類型有兩種:小型或中型。每個範本都提供 UI 樣式選項,但自訂程度不如平台設定實作。
小 |
 Android
|
 iOS
|
中 |
 Android
|
 iOS
|
如需 Dart 中的原生範本實作詳細資料,請參閱「原生範本」。
如果您需要完全掌控 Android 和 iOS 平台廣告的外觀和風格,建議採用平台設定,但您必須為這兩個平台編寫程式碼。
如需平台專屬設定操作說明,請參閱平台設定。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-24 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-24 (世界標準時間)。"],[[["Native ads give you control over the ad's look and feel by providing ad assets that your app displays using native UI components."],["Choose between Native Templates for pre-defined layouts with styling options or Platform Setup for complete customization using Android/iOS tools."],["Native Templates offer small and medium sizes with some UI customization, while Platform Setup provides full control but requires platform-specific code."],["Refer to the provided links for detailed implementation instructions on both Native Templates and Platform Setup for Flutter."]]],["Native ads allow apps to display ad assets using native UI components. Apps receive a `NativeAd` object and handle asset display. There are two implementation methods: native templates and platform setup. Native templates offer pre-defined small or medium designs with some styling options. Platform setup provides full control over ad appearance on Android and iOS but requires platform-specific code. Native templates are detailed in the linked section and so are the platform specific set up.\n"]]