content: import 'dart:async';
  
  import 'package:flutter/material.dart';
  import 'package:flutter/services.dart';
  import 'package:sample_plugin/sample_plugin.dart';
  
  void main() {
    runApp(MyApp());
  }
  
  class MyApp extends StatefulWidget {
    @override
    _MyAppState createState() => _MyAppState();
  }
  
  class _MyAppState extends State<MyApp> {
    String _platformVersion = 'Unknown';
  
    @override
    void initState() {
      super.initState();
      initPlatformState();
    }
  
    Future<void> initPlatformState() async {
      String platformVersion;
      try {
        platformVersion = await SamplePlugin.platformVersion;
      } on PlatformException {
        platformVersion = 'Failed to get platform version.';
      }
      if (!mounted) return;
      setState(() {
        _platformVersion = platformVersion;
      });
    }
  
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        home: Scaffold(
          appBar: AppBar(
            title: const Text('Plugin example app'),
          ),
          body: Center(
            child: Text('Running on: $_platformVersion\n'),
          ),
        ),
      );
    }
  }
  