# Banner

### Create placement <a href="#markdown-header-creating-placement" id="markdown-header-creating-placement"></a>

Call `BannerPlacement.create` method to create banner placement. Pass its name and size:

```dart
_bannerPlacement = await BannerPlacement.create(
    name: "BannerPlacement", size: BannerSize.banner320x50);
```

Pass BannerPlacement object to the `AATKitBanner` widget:

```dart
return Scaffold(
    appBar: AppBar(
      title: Text(HomePage.title),
    ),
    body: Center(
      child: AATKitBanner(
        placement: _bannerPlacement,
      ),
    ),
);
```

### Reload placement <a href="#markdown-header-reloading-placement" id="markdown-header-reloading-placement"></a>

When `AATKitBanner` widget is initialized, AATKit will start auto-reloading the ads. To stop banner ads auto-reload, simply remove widget from the UI.

### Listen to events

Set listener to receive placement-specific events:

```dart
_bannerPlacement.listener = BannerPlacementListener(
  onHaveAd: (placement) => print("[${placement.name}] onHaveAd"),
  onNoAd: (placement) => print("[${placement.name}] onNoAd"),
  onPauseForAd: (placement) => print("[${placement.name}] onPauseForAd"),
  onResumeAfterAd: (placement) =>
      print("[${placement.name}] onResumeAfterAd"),
);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://aatkit.gitbook.io/aatkit-flutter-integration/formats/banner.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
