Last active
February 19, 2021 05:01
-
-
Save doyle-flutter/7e41daa3a967e0855db0f6562e7acb96 to your computer and use it in GitHub Desktop.
#07 포그라운드 - 플러터 : 메인
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ... import, main 생략 | |
| class ForegroundPage extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar(title: Text("Flutter Foreground")), | |
| body: Center( | |
| child: TextButton( | |
| child: Text("PLAY"), | |
| onPressed: () async{ | |
| const String _method = "foregroundflutter"; | |
| const String _channelName = "app.james.cam/foregroundflutter"; | |
| MethodChannel channel = new MethodChannel(_channelName); | |
| await channel.invokeMethod<void>(_method); | |
| return; | |
| }, | |
| ), | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment