Skip to content

Commit

Permalink
chore: rename files and content to match new package name (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
jokerttu authored Jun 6, 2024
1 parent 89796f4 commit dcb34cb
Show file tree
Hide file tree
Showing 72 changed files with 1,017 additions and 1,013 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ in an unbounded widget will cause the application to throw a Flutter exception.
```dart
import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';
class NavigationSample extends StatefulWidget {
const NavigationSample({super.key});
Expand Down
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.

rootProject.name = 'google_maps_navigation'
rootProject.name = 'google_navigation_flutter'
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class GoogleMapsNavigationPlugin : FlutterPlugin, ActivityAware {
override fun onAttachedToActivity(binding: ActivityPluginBinding) {
val factory =
GoogleMapsNavigationViewFactory(viewRegistry, navigationViewEventApi, imageRegistry)
_binding.platformViewRegistry.registerViewFactory("google_maps_navigation", factory)
_binding.platformViewRegistry.registerViewFactory("google_navigation_flutter", factory)
GoogleMapsNavigationSessionManager.createInstance(_binding.binaryMessenger)
val inspectorHandler = GoogleMapsNavigationInspectorHandler(viewRegistry)
NavigationInspector.setUp(_binding.binaryMessenger, inspectorHandler)
Expand Down
304 changes: 152 additions & 152 deletions android/src/main/kotlin/com/google/maps/flutter/navigation/messages.g.kt

Large diffs are not rendered by default.

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

Demonstrates how to use the google_maps_navigation plugin.
Demonstrates how to use the google_navigation_flutter plugin.

## Setting up API Keys

Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
<application
android:label="google_maps_navigation_example"
android:label="google_navigation_flutter_example"
android:icon="@mipmap/ic_launcher">
<meta-data
android:name="com.google.android.geo.API_KEY"
Expand Down
4 changes: 2 additions & 2 deletions example/integration_test/shared.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';
import 'package:patrol/patrol.dart';
import 'package:permission_handler/permission_handler.dart';

export 'package:flutter_test/flutter_test.dart';
export 'package:google_maps_navigation/google_maps_navigation.dart';
export 'package:google_navigation_flutter/google_navigation_flutter.dart';
export 'package:patrol/patrol.dart';

/// Location coordinates for starting position simulation in Finland - Näkkäläntie.
Expand Down
4 changes: 2 additions & 2 deletions example/integration_test/t03_navigation_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import 'dart:async';
import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_navigation/src/google_maps_navigation_platform_interface.dart';
import 'package:google_maps_navigation/src/inspector/inspector_platform.dart';
import 'package:google_navigation_flutter/src/google_navigation_flutter_platform_interface.dart';
import 'package:google_navigation_flutter/src/inspector/inspector_platform.dart';
import 'shared.dart';

void main() {
Expand Down
2 changes: 1 addition & 1 deletion example/integration_test/t06_map_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void main() {
await $.native.tapAt(const Offset(0.5, 0.5));

/// Test the default values match with what has been documented in the
/// API documentation in google_maps_navigation.dart file.
/// API documentation in google_navigation_flutter.dart file.
expect(await controller.isMyLocationEnabled(), false);
expect(await controller.settings.isMyLocationButtonEnabled(), true);
expect(await controller.settings.isZoomGesturesEnabled(), true);
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C8080294A63A400263BE5 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 @@ -19,7 +19,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>google_maps_navigation_example</string>
<string>google_navigation_flutter_example</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
Expand Down
2 changes: 1 addition & 1 deletion example/ios/RunnerTests/ConvertTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import GoogleNavigation
import UIKit
import XCTest

@testable import google_maps_navigation
@testable import google_navigation_flutter

class MockImageRegistry: ImageRegistry {
let image = UIImage()
Expand Down
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import 'dart:async';
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';
import 'package:permission_handler/permission_handler.dart';
import 'pages/circles.dart';
import 'pages/pages.dart';
Expand Down Expand Up @@ -101,7 +101,7 @@ class _NavigationDemoState extends State<NavigationBody> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Google Maps Navigation examples')),
appBar: AppBar(title: const Text('Google Navigation Flutter examples')),
body: SafeArea(
top: false,
minimum: const EdgeInsets.all(8.0),
Expand Down
2 changes: 1 addition & 1 deletion example/lib/pages/camera.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import 'dart:io';
import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';
import '../utils/utils.dart';
import '../widgets/widgets.dart';

Expand Down
2 changes: 1 addition & 1 deletion example/lib/pages/circles.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';

import '../widgets/widgets.dart';

Expand Down
2 changes: 1 addition & 1 deletion example/lib/pages/map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart' show rootBundle;
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';

import '../utils/utils.dart';
import '../widgets/widgets.dart';
Expand Down
2 changes: 1 addition & 1 deletion example/lib/pages/markers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import 'dart:typed_data';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart' show rootBundle;
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';

import '../widgets/widgets.dart';

Expand Down
2 changes: 1 addition & 1 deletion example/lib/pages/multiple_views.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// ignore_for_file: public_member_api_docs, unused_field, use_setters_to_change_properties

import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';
import '../widgets/widgets.dart';

class MultipleMapViewsPage extends ExamplePage {
Expand Down
16 changes: 10 additions & 6 deletions example/lib/pages/navigation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import 'dart:async';
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';

import '../routes_api/routes_api.dart';
import '../utils/utils.dart';
Expand Down Expand Up @@ -205,7 +205,9 @@ class _NavigationPageState extends ExamplePageState<NavigationPage> {
if (mounted && _userLocation == null) {
_userLocation = await _navigationViewController?.getMyLocation() ??
cameraLocationMIT;
setState(() {});
if (mounted) {
setState(() {});
}
}
});
}
Expand Down Expand Up @@ -476,10 +478,12 @@ class _NavigationPageState extends ExamplePageState<NavigationPage> {
}

void _onNavigationUIEnabledChanged(bool enabled) {
setState(() {
_navigationUIEnabled = enabled;
_onNavigationUIEnabledChangedEventCallCount += 1;
});
if (mounted) {
setState(() {
_navigationUIEnabled = enabled;
_onNavigationUIEnabledChangedEventCallCount += 1;
});
}
}

Future<void> _startGuidedNavigation() async {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/pages/navigation_without_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import 'dart:async';
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';
import '../widgets/widgets.dart';

class NavigationWithoutMapPage extends ExamplePage {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/pages/polygons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// ignore_for_file: public_member_api_docs

import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';

import '../widgets/widgets.dart';

Expand Down
2 changes: 1 addition & 1 deletion example/lib/pages/polylines.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';
import '../widgets/widgets.dart';

class PolylinesPage extends ExamplePage {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/pages/turn_by_turn.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import 'dart:async';
import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';
import '../utils/utils.dart';
import '../widgets/widgets.dart';

Expand Down
2 changes: 1 addition & 1 deletion example/lib/pages/widget_initialization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import 'dart:io';
import 'dart:math';

import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';
import '../utils/utils.dart';
import '../widgets/widgets.dart';

Expand Down
2 changes: 1 addition & 1 deletion example/lib/routes_api/routes_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

import 'dart:convert';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';
import 'package:http/http.dart' as http;

// Note: This Routes API implementation is ment to be used only to
Expand Down
2 changes: 1 addition & 1 deletion example/lib/utils/maneuver_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';

/// Maps [Maneuver] values to Material Icons.
IconData getManeuverIcon(Maneuver maneuver) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/utils/terms_of_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

// ignore_for_file: public_member_api_docs

import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';

Future<bool> requestTermsAndConditionsAcceptance() async {
return (await GoogleMapsNavigator.areTermsAccepted()) ||
Expand Down
2 changes: 1 addition & 1 deletion example/lib/utils/waypoint_marker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import 'dart:typed_data';
import 'dart:ui' as ui;

import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';

const Size _markerSize = Size(80, 80); // Example size in logical pixels

Expand Down
2 changes: 1 addition & 1 deletion example/lib/widgets/camera_position_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// File: gms_lat_lng_point_editor.dart

import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';

import '../utils/utils.dart';
import 'widgets.dart';
Expand Down
2 changes: 1 addition & 1 deletion example/lib/widgets/latlng_bound_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// ignore_for_file: public_member_api_docs

import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';

import 'widgets.dart';

Expand Down
2 changes: 1 addition & 1 deletion example/lib/widgets/latlng_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// ignore_for_file: public_member_api_docs

import 'package:flutter/material.dart';
import 'package:google_maps_navigation/google_maps_navigation.dart';
import 'package:google_navigation_flutter/google_navigation_flutter.dart';

import 'widgets.dart';

Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: google_maps_navigation_example
description: Demonstrates how to use the google_maps_navigation plugin.
name: google_navigation_flutter_example
description: Demonstrates how to use the google_navigation_flutter plugin.
publish_to: "none"

environment:
Expand All @@ -24,7 +24,7 @@ dependencies:
device_info_plus: ^9.1.0
flutter:
sdk: flutter
google_maps_navigation:
google_navigation_flutter:
path: ../
http: ^1.1.2
permission_handler: ^11.1.0
Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/GoogleMapsNavigationPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class GoogleMapsNavigationPlugin: NSObject, FlutterPlugin {
navigationViewEventApi: navigationViewEventApi!,
imageRegistry: imageRegistry!
)
registrar.register(factory, withId: "google_maps_navigation")
registrar.register(factory, withId: "google_navigation_flutter")

navigationSessionEventApi = NavigationSessionEventApi(
binaryMessenger: registrar.messenger()
Expand Down
Loading

0 comments on commit dcb34cb

Please sign in to comment.