diff --git a/samples/admob/app_open_example/lib/main.dart b/samples/admob/app_open_example/lib/main.dart index ec3fabe5f..8112bcee2 100644 --- a/samples/admob/app_open_example/lib/main.dart +++ b/samples/admob/app_open_example/lib/main.dart @@ -53,7 +53,6 @@ class _HomePageState extends State { final _appOpenAdManager = AppOpenAdManager(); var _isMobileAdsInitializeCalled = false; var _isPrivacyOptionsRequired = false; - int _counter = 0; late AppLifecycleReactor _appLifecycleReactor; @override @@ -82,12 +81,6 @@ class _HomePageState extends State { _initializeMobileAdsSDK(); } - void _incrementCounter() { - setState(() { - _counter++; - }); - } - @override Widget build(BuildContext context) { return Scaffold( @@ -95,25 +88,16 @@ class _HomePageState extends State { title: const Text('App Open Demo Home Page'), actions: _appBarActions(), ), - body: Center( + body: const Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Text( - 'You have pushed the button this many times:', - ), Text( - '$_counter', - style: Theme.of(context).textTheme.headlineMedium, + 'Leave and switch back to the app to see the ad.', ), ], ), ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), // This trailing comma makes auto-formatting nicer for build methods. ); }