chore: generate template (#17)
This commit is contained in:
committed by
GitHub
parent
5baf0dfa61
commit
699457e663
@@ -0,0 +1,27 @@
|
||||
// Copyright (c) 2022, Very Good Ventures
|
||||
// https://verygood.ventures
|
||||
//
|
||||
// Use of this source code is governed by an MIT-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://opensource.org/licenses/MIT.
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart';
|
||||
|
||||
/// The Windows implementation of [{{project_name.pascalCase()}}Platform].
|
||||
class {{project_name.pascalCase()}}Windows extends {{project_name.pascalCase()}}Platform {
|
||||
/// The method channel used to interact with the native platform.
|
||||
@visibleForTesting
|
||||
final methodChannel = const MethodChannel('{{project_name.snakeCase()}}_windows');
|
||||
|
||||
/// Registers this class as the default instance of [{{project_name.pascalCase()}}Platform]
|
||||
static void registerWith() {
|
||||
{{project_name.pascalCase()}}Platform.instance = {{project_name.pascalCase()}}Windows();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String?> getPlatformName() {
|
||||
return methodChannel.invokeMethod<String>('getPlatformName');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user