import 'package:flutter/services.dart';
import 'package:flutter_map/src/interface/overlays/map_marker_interface.dart';
import 'package:flutter_map/src/interface/overlays/map_polyline_interface.dart';
import '../interface/handle/map_handle_interface.dart';
import '../interface/overlays/map_face_interface.dart';
import 'map_controller_impl.dart';

abstract class MapController
    implements
        MapMarkerInterface,
        MapHandleInterface,
        MapPolylineInterface,
        MapFaceInterface {
  void setChannel(MethodChannel channel);

  void dispose();

  // 创建默认实现的方法 或 通过MapControllerFactory 来创建
  factory MapController.create() {
    return MapControllerImpl();
  }
}

class MapControllerFactory {
  MapControllerFactory._();

  static MapController createDefault() {
    return MapControllerImpl();
  }
}
