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

the plugin for go-flutter to shutdown platform windows、linux、mac

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.shutdownNow;
                  print(str);
                },
              ),
            )));
  }
}
2
likes
35
pub points
0%
popularity

Publisher

verified publisherdi1shuai.com

the plugin for go-flutter to shutdown platform windows、linux、mac

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on shutdown_platform