Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.10 hotfix #95

Merged
merged 6 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.2
- support flutter 3.10.0 ([#89](https://github.com/note11g/flutter_naver_map/issues/89))
- fix bug ([#93](https://github.com/note11g/flutter_naver_map/issues/93))

## 1.0.1
- fix bug ([#73](https://github.com/note11g/flutter_naver_map/issues/73))
- NOverlayInfo Constructor is now public
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ NaverMap SDK for Flutter

[![pub package](https://img.shields.io/pub/v/flutter_naver_map.svg?color=4285F4)](https://pub.dev/packages/flutter_naver_map)

support flutter >= 3.0, dart >= 2.18.4,
support flutter >= 3.10, dart >= 2.18.4,

android 5.1 or higher, iOS 11.0 or higher.

Expand Down
6 changes: 3 additions & 3 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_naver_map (from `.symlinks/plugins/flutter_naver_map/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)

SPEC REPOS:
Expand All @@ -34,14 +34,14 @@ EXTERNAL SOURCES:
integration_test:
:path: ".symlinks/plugins/integration_test/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/ios"
:path: ".symlinks/plugins/path_provider_foundation/darwin"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_naver_map: d1ee15e7a2fe5360a19640648ceed5abf79d82aa
integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5
integration_test: 13825b8a9334a850581300559b8839134b124670
NMapsGeometry: 53c573ead66466681cf123f99f698dc8071a4b83
NMapsMap: aaa64717249b06ae82c3a3addb3a01f0e33100ab
path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852
Expand Down
1 change: 1 addition & 0 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand Down
62 changes: 27 additions & 35 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
sha256: "80e5141fafcb3361653ce308776cfd7d45e6e9fbb429e14eec571382c0c5fecb"
url: "https://pub.dev"
source: hosted
version: "3.3.2"
async:
dependency: transitive
description:
name: async
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
version: "2.10.0"
version: "2.11.0"
boolean_selector:
dependency: transitive
description:
Expand All @@ -29,10 +21,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.3.0"
clock:
dependency: transitive
description:
Expand All @@ -45,10 +37,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
url: "https://pub.dev"
source: hosted
version: "1.17.0"
version: "1.17.1"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -90,10 +82,10 @@ packages:
dependency: "direct main"
description:
name: flutter_bottom_drawer
sha256: "7e128d80fc5d8e5f5d0a1054bd39fda2f5843e2d6af7c16b90a17ea511bb5092"
sha256: "00e68d9d6c7086b3de741bd76a48df9e570391922b711c505d040a243edb03d1"
url: "https://pub.dev"
source: hosted
version: "0.0.6"
version: "0.0.7"
flutter_driver:
dependency: transitive
description: flutter
Expand All @@ -118,7 +110,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.0.1"
version: "1.0.2"
flutter_styled_toast:
dependency: "direct main"
description:
Expand Down Expand Up @@ -146,18 +138,18 @@ packages:
dependency: transitive
description:
name: intl
sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91"
sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6
url: "https://pub.dev"
source: hosted
version: "0.17.0"
version: "0.18.0"
js:
dependency: transitive
description:
name: js
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.6.5"
version: "0.6.7"
lints:
dependency: transitive
description:
Expand All @@ -170,10 +162,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
url: "https://pub.dev"
source: hosted
version: "0.12.13"
version: "0.12.15"
material_color_utilities:
dependency: transitive
description:
Expand All @@ -186,18 +178,18 @@ packages:
dependency: transitive
description:
name: meta
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.9.1"
path:
dependency: transitive
description:
name: path
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev"
source: hosted
version: "1.8.2"
version: "1.8.3"
path_provider:
dependency: transitive
description:
Expand Down Expand Up @@ -375,10 +367,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
url: "https://pub.dev"
source: hosted
version: "0.4.16"
version: "0.5.1"
typed_data:
dependency: transitive
description:
Expand All @@ -399,18 +391,18 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: e7fb6c2282f7631712b69c19d1bff82f3767eea33a2321c14fa59ad67ea391c7
sha256: f6deed8ed625c52864792459709183da231ebf66ff0cf09e69b573227c377efe
url: "https://pub.dev"
source: hosted
version: "9.4.0"
version: "11.3.0"
webdriver:
dependency: transitive
description:
name: webdriver
sha256: ef67178f0cc7e32c1494645b11639dd1335f1d18814aa8435113a92e9ef9d841
sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "3.0.2"
win32:
dependency: transitive
description:
Expand All @@ -428,5 +420,5 @@ packages:
source: hosted
version: "0.2.0+3"
sdks:
dart: ">=2.19.2 <3.0.0"
flutter: ">=3.0.0"
dart: ">=3.0.0-0 <4.0.0"
flutter: ">=3.10.0"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
flutter_naver_map:
path: ../

flutter_bottom_drawer: 0.0.6
flutter_bottom_drawer: 0.0.7
permission_handler: 10.2.0
flutter_styled_toast: 2.1.3
pull_to_refresh_flutter3: 2.0.1
Expand Down
1 change: 1 addition & 0 deletions ios/Classes/controller/NaverMapController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ internal class NaverMapController: NaverMapControlSender, NaverMapControlHandler

func setLocationTrackingMode(locationTrackingMode: NMFMyPositionMode, onSuccess: @escaping (Any?) -> ()) {
mapView.positionMode = locationTrackingMode
onSuccess(nil)
}

func getLocationTrackingMode(onSuccess: @escaping (String) -> ()) {
Expand Down
3 changes: 1 addition & 2 deletions lib/src/type/map/overlay/overlay_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ class NOverlayImage with NMessageableWithMap {
required Size size,
required BuildContext context,
}) async {
final pixelRatio = MediaQuery.of(context).devicePixelRatio;
final imageBytes = await WidgetToImageUtil.widgetToImageByte(widget,
size: size, pixelRatio: pixelRatio);
size: size, context: context);
final path = await ImageUtil.saveImage(imageBytes);
return NOverlayImage._(path: path, mode: _NOverlayImageMode.widget);
}
Expand Down
16 changes: 10 additions & 6 deletions lib/src/util/widget_to_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ class WidgetToImageUtil {
);
}

static Future<Uint8List> widgetToImageByte(Widget widget,
{required Size size, required double pixelRatio}) async {
static Future<Uint8List> widgetToImageByte(
Widget widget, {
required Size size,
required BuildContext context,
}) async {
final renderBox = RenderRepaintBoundary();
final view = View.of(context);
final renderView = RenderView(
window: WidgetsBinding.instance.window,
configuration:
ViewConfiguration(size: size, devicePixelRatio: pixelRatio),
view: view,
configuration: ViewConfiguration(
size: size, devicePixelRatio: view.devicePixelRatio),
child:
RenderPositionedBox(alignment: Alignment.center, child: renderBox));

Expand All @@ -48,7 +52,7 @@ class WidgetToImageUtil {
..flushCompositingBits()
..flushPaint();

final image = await renderBox.toImage(pixelRatio: pixelRatio);
final image = await renderBox.toImage(pixelRatio: view.devicePixelRatio);
return image
.toByteData(format: ImageByteFormat.png)
.then((b) => b!.buffer.asUint8List());
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: flutter_naver_map
description: Naver Map plugin for Flutter, which provides map service of Korea.
version: 1.0.1
version: 1.0.2
homepage: https://github.com/note11g/flutter_naver_map
documentation: https://note11.dev/flutter_naver_map

environment:
sdk: '>=2.18.4 <3.0.0'
flutter: ">=3.0.0"
sdk: '>=2.18.4 <4.0.0'
flutter: ">=3.10.0"

dependencies:
flutter:
Expand Down