Created
August 26, 2020 08:05
-
-
Save vreamer/d26afcd4fd69971bb697627537e88f92 to your computer and use it in GitHub Desktop.
Configure method channel
This file contains 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 'package:flutter/services.dart'; | |
class FlutterMethodChannel { | |
static const channelName = 'channel'; // this channel name needs to match the one in Native method channel | |
MethodChannel methodChannel; | |
static final FlutterMethodChannel instance = FlutterMethodChannel._init(); | |
FlutterMethodChannel._init(); | |
void configureChannel() { | |
methodChannel = MethodChannel(channelName); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment