initialize method

  1. @override
Future<void> initialize()
override

Initializes AdMob SDK and runs the UMP consent flow.

Must be called once before showing any ads. Typically called in main() before runApp().

This method:

  1. Calls MobileAds.instance.initialize()
  2. Configures test device IDs
  3. Runs the UMP consent check (shows dialog if needed)

Throws StateError if called after dispose.

Implementation

@override
Future<void> initialize() async {
  initializeCallCount++;
  _isInitialized = true;
}