shutdown_platform 0.0.1 copy "shutdown_platform: ^0.0.1" to clipboard
shutdown_platform: ^0.0.1 copied to clipboard

outdated

A new flutter plugin project.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:shutdown_platform/shutdown_platform.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        home: Scaffold(
            appBar: AppBar(
              title: const Text('Shutdown Platform Plugin example app'),
            ),
            body: Center(
              child: IconButton(
                icon: Icon(Icons.power_settings_new),
                onPressed: () async {
                  String str = await ShutdownPlatform.shutdown;
                  print(str);
                },
              ),
            )));
  }
}