package com.hello.wallpaper

import io.flutter.Log
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity : FlutterActivity() {
    override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
        try {
            flutterEngine.plugins.add(SetWallpaperPlugin())
            GeneratedPluginRegistrant.registerWith(flutterEngine)
        } catch (e: Exception) {
            Log.e(
                "GeneratedPluginRegistrant",
                "Error registering plugin set_wallpaper, com.hello.wallpaper.SetWallpaperPlugin",
            )
        }
    }
}