import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'cw_mweb_method_channel.dart';

abstract class CwMwebPlatform extends PlatformInterface {
  /// Constructs a CwMwebPlatform.
  CwMwebPlatform() : super(token: _token);

  static final Object _token = Object();

  static CwMwebPlatform _instance = MethodChannelCwMweb();

  /// The default instance of [CwMwebPlatform] to use.
  ///
  /// Defaults to [MethodChannelCwMweb].
  static CwMwebPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [CwMwebPlatform] when
  /// they register themselves.
  static set instance(CwMwebPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<int?> start(String dataDir) {
    throw UnimplementedError('start() has not been implemented.');
  }
}