Skip to content

Commit

Permalink
plugin name changed
Browse files Browse the repository at this point in the history
  • Loading branch information
munkh-altai committed Jan 27, 2020
1 parent a34d8c2 commit 9943c16
Show file tree
Hide file tree
Showing 27 changed files with 59 additions and 85 deletions.
22 changes: 1 addition & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1 @@
MIT License

Copyright (c) 2020 Khan Khulgun Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
TODO: Add your license here.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Flutter Map plugin for ArcGIS/Esri
# Flutter Map plugin for ArcGIS Esri

# Currently support feature layer and feature cluster
We are working on more features
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
group 'mn.khankhulgun.flutter_plugin_arcgis'
group 'mn.khankhulgun.flutter_map_arcgis'
version '1.0-SNAPSHOT'

buildscript {
Expand Down
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = 'flutter_plugin_arcgis'
rootProject.name = 'flutter_map_arcgis'
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="mn.khankhulgun.flutter_plugin_arcgis">
package="mn.khankhulgun.flutter_map_arcgis">
</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mn.khankhulgun.flutter_plugin_arcgis
package mn.khankhulgun.flutter_map_arcgis

import androidx.annotation.NonNull;
import io.flutter.embedding.engine.plugins.FlutterPlugin
Expand All @@ -8,11 +8,11 @@ import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import io.flutter.plugin.common.MethodChannel.Result
import io.flutter.plugin.common.PluginRegistry.Registrar

/** FlutterPluginArcgisPlugin */
public class FlutterPluginArcgisPlugin: FlutterPlugin, MethodCallHandler {
/** FlutterMapArcgisPlugin */
public class FlutterMapArcgisPlugin: FlutterPlugin, MethodCallHandler {
override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
val channel = MethodChannel(flutterPluginBinding.getFlutterEngine().getDartExecutor(), "flutter_plugin_arcgis")
channel.setMethodCallHandler(FlutterPluginArcgisPlugin());
val channel = MethodChannel(flutterPluginBinding.getFlutterEngine().getDartExecutor(), "flutter_map_arcgis")
channel.setMethodCallHandler(FlutterMapArcgisPlugin());
}

// This static function is optional and equivalent to onAttachedToEngine. It supports the old
Expand All @@ -27,8 +27,8 @@ public class FlutterPluginArcgisPlugin: FlutterPlugin, MethodCallHandler {
companion object {
@JvmStatic
fun registerWith(registrar: Registrar) {
val channel = MethodChannel(registrar.messenger(), "flutter_plugin_arcgis")
channel.setMethodCallHandler(FlutterPluginArcgisPlugin())
val channel = MethodChannel(registrar.messenger(), "flutter_map_arcgis")
channel.setMethodCallHandler(FlutterMapArcgisPlugin())
}
}

Expand Down
4 changes: 2 additions & 2 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flutter_plugin_arcgis_example
# flutter_map_arcgis_example

Demonstrates how to use the flutter_plugin_arcgis plugin.
Demonstrates how to use the flutter_map_arcgis plugin.

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "mn.khankhulgun.flutter_plugin_arcgis_example"
applicationId "mn.khankhulgun.flutter_map_arcgis_example"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="mn.khankhulgun.flutter_plugin_arcgis_example">
package="mn.khankhulgun.flutter_map_arcgis_example">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
4 changes: 2 additions & 2 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="mn.khankhulgun.flutter_plugin_arcgis_example">
package="mn.khankhulgun.flutter_map_arcgis_example">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="flutter_plugin_arcgis_example"
android:label="flutter_map_arcgis_example"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mn.khankhulgun.flutter_plugin_arcgis_example
package mn.khankhulgun.flutter_map_arcgis_example

import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterActivity
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="mn.khankhulgun.flutter_plugin_arcgis_example">
package="mn.khankhulgun.flutter_map_arcgis_example">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
6 changes: 3 additions & 3 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = mn.khankhulgun.flutterPluginArcgisExample;
PRODUCT_BUNDLE_IDENTIFIER = mn.khankhulgun.flutterMapArcgisExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -454,7 +454,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = mn.khankhulgun.flutterPluginArcgisExample;
PRODUCT_BUNDLE_IDENTIFIER = mn.khankhulgun.flutterMapArcgisExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -481,7 +481,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = mn.khankhulgun.flutterPluginArcgisExample;
PRODUCT_BUNDLE_IDENTIFIER = mn.khankhulgun.flutterMapArcgisExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>flutter_plugin_arcgis_example</string>
<string>flutter_map_arcgis_example</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
Expand Down
5 changes: 1 addition & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:flutter_plugin_arcgis/flutter_plugin_arcgis.dart';
import 'package:flutter_map_arcgis/flutter_map_arcgis.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong/latlong.dart';

Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ packages:
source: hosted
version: "0.1.3"
dio:
dependency: "direct dev"
dependency: "direct main"
description:
name: dio
url: "https://pub.dartlang.org"
Expand All @@ -112,13 +112,13 @@ packages:
source: hosted
version: "3.0.0"
flutter_map:
dependency: "direct dev"
dependency: "direct main"
description:
name: flutter_map
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.2"
flutter_plugin_arcgis:
flutter_map_arcgis:
dependency: "direct dev"
description:
path: ".."
Expand Down
10 changes: 5 additions & 5 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: flutter_plugin_arcgis_example
description: Demonstrates how to use the flutter_plugin_arcgis plugin.
name: flutter_map_arcgis_example
description: Demonstrates how to use the flutter_map_arcgis plugin.
publish_to: 'none'

environment:
Expand All @@ -8,6 +8,8 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_map: any # or the latest version on Pub
dio: 3.0.8 #latest version

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
Expand All @@ -17,10 +19,8 @@ dev_dependencies:
flutter_test:
sdk: flutter

flutter_plugin_arcgis:
flutter_map_arcgis:
path: ../
flutter_map: any # or the latest version on Pub
dio: 3.0.8 #latest version

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
2 changes: 1 addition & 1 deletion example/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:flutter_plugin_arcgis_example/main.dart';
import 'package:flutter_map_arcgis_example/main.dart';

void main() {
testWidgets('Verify Platform version', (WidgetTester tester) async {
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions ios/Classes/FlutterMapArcgisPlugin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#import <Flutter/Flutter.h>

@interface FlutterMapArcgisPlugin : NSObject<FlutterPlugin>
@end
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#import "FlutterPluginArcgisPlugin.h"
#if __has_include(<flutter_plugin_arcgis/flutter_plugin_arcgis-Swift.h>)
#import <flutter_plugin_arcgis/flutter_plugin_arcgis-Swift.h>
#import "FlutterMapArcgisPlugin.h"
#if __has_include(<flutter_map_arcgis/flutter_map_arcgis-Swift.h>)
#import <flutter_map_arcgis/flutter_map_arcgis-Swift.h>
#else
// Support project import fallback if the generated compatibility header
// is not copied when this plugin is created as a library.
// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816
#import "flutter_plugin_arcgis-Swift.h"
#import "flutter_map_arcgis-Swift.h"
#endif

@implementation FlutterPluginArcgisPlugin
@implementation FlutterMapArcgisPlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
[SwiftFlutterPluginArcgisPlugin registerWithRegistrar:registrar];
[SwiftFlutterMapArcgisPlugin registerWithRegistrar:registrar];
}
@end
4 changes: 0 additions & 4 deletions ios/Classes/FlutterPluginArcgisPlugin.h

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Flutter
import UIKit

public class SwiftFlutterPluginArcgisPlugin: NSObject, FlutterPlugin {
public class SwiftFlutterMapArcgisPlugin: NSObject, FlutterPlugin {
public static func register(with registrar: FlutterPluginRegistrar) {
let channel = FlutterMethodChannel(name: "flutter_plugin_arcgis", binaryMessenger: registrar.messenger())
let instance = SwiftFlutterPluginArcgisPlugin()
let channel = FlutterMethodChannel(name: "flutter_map_arcgis", binaryMessenger: registrar.messenger())
let instance = SwiftFlutterMapArcgisPlugin()
registrar.addMethodCallDelegate(instance, channel: channel)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint flutter_plugin_arcgis.podspec' to validate before publishing.
# Run `pod lib lint flutter_map_arcgis.podspec' to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'flutter_plugin_arcgis'
s.name = 'flutter_map_arcgis'
s.version = '0.0.1'
s.summary = 'A new Flutter plugin.'
s.summary = 'Arcgis plugin for flutter map'
s.description = <<-DESC
A new Flutter plugin.
Arcgis plugin for flutter map
DESC
s.homepage = 'http://example.com'
s.license = { :file => '../LICENSE' }
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: flutter_plugin_arcgis
description: A new Flutter plugin.
name: flutter_map_arcgis
description: Arcgis plugin for flutter map
version: 0.0.1
author:
homepage:
author: Khan Khulgun Team
homepage: https://github.com/munkh-altai/flutter_map_arcgis

environment:
sdk: ">=2.1.0 <3.0.0"
Expand All @@ -27,8 +27,8 @@ flutter:
# be modified. They are used by the tooling to maintain consistency when
# adding or updating assets for this project.
plugin:
androidPackage: mn.khankhulgun.flutter_plugin_arcgis
pluginClass: FlutterPluginArcgisPlugin
androidPackage: mn.khankhulgun.flutter_map_arcgis
pluginClass: FlutterMapArcgisPlugin

# To add assets to your plugin package, add an assets section, like this:
# assets:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_plugin_arcgis/flutter_plugin_arcgis.dart';
import 'package:flutter_map_arcgis/flutter_map_arcgis.dart';

void main() {
const MethodChannel channel = MethodChannel('flutter_plugin_arcgis');
const MethodChannel channel = MethodChannel('flutter_map_arcgis');

TestWidgetsFlutterBinding.ensureInitialized();

Expand All @@ -17,7 +17,4 @@ void main() {
channel.setMockMethodCallHandler(null);
});

test('getPlatformVersion', () async {
expect(await FlutterPluginArcgis.platformVersion, '42');
});
}

0 comments on commit 9943c16

Please sign in to comment.