Skip to content

Commit

Permalink
0.6.7
Browse files Browse the repository at this point in the history
add gif for new example
update pubspec,readme,changelog
  • Loading branch information
liodali committed Feb 28, 2021
1 parent 21bba30 commit 4d5f94a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.6.7 [beta-version]:
* add new method to get current location without close advanced picker
* create new example search picker example
## 0.6.6+1 [beta-version]:
* fix error export
## 0.6.6 [beta-version]:
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# flutter_osm_plugin
![pub](https://img.shields.io/badge/pub-v0.6.6%2B1-orange)
![pub](https://img.shields.io/badge/pub-v0.6.7-orange)

osm plugin for flutter apps (only Android for now, iOS will be supported in future)

Expand All @@ -16,13 +16,15 @@ osm plugin for flutter apps (only Android for now, iOS will be supported in futu

## Getting Started
<img src="https://github.com/liodali/osm_flutter/blob/master/osm.gif?raw=true" alt="openStreetMap flutter examples"><br>
<br>
<img src="https://github.com/liodali/osm_flutter/blob/master/searchExample.gif?raw=true" alt="openStreetMap flutter examples"><br>

## Installing

Add the following to your `pubspec.yaml` file:

dependencies:
flutter_osm_plugin: ^0.6.6+1
flutter_osm_plugin: ^0.6.7
## Simple Usage
#### Creating a basic `OSMFlutter` :

Expand Down Expand Up @@ -128,9 +130,11 @@ controller.changeLocation(GeoPoint(latitude: 47.35387, longitude: 8.43609));
2) assisted selection (for more details see example)

```dart
/// To Start assisted Selection
/// To Start assisted Selection
await controller.advancedPositionPicker();
/// To get location desired
/// To get location desired
GeoPoint p = await controller.getCurrentPositionAdvancedPositionPicker();
/// To get location desired and close picker
GeoPoint p = await controller.selectAdvancedPositionPicker();
/// To cancel assisted Selection
await controller.cancelAdvancedPositionPicker();
Expand Down
5 changes: 2 additions & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ class MyApp extends StatelessWidget {
),
),
),
"/picker-result" :(ctx) => LocationAppExample(),
"/search" :(ctx) => SearchPage(),

"/picker-result": (ctx) => LocationAppExample(),
"/search": (ctx) => SearchPage(),
},
);
}
Expand Down
12 changes: 10 additions & 2 deletions example/lib/search_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,18 @@ class _LocationAppExampleState extends State<LocationAppExample> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(""),
ValueListenableBuilder<GeoPoint>(
valueListenable: notifier,
builder: (ctx, p, child) {
return Text("${p?.toString() ?? ""}");
},
),
RaisedButton(
onPressed: () async {
await Navigator.pushNamed(context, "/search");
var p = await Navigator.pushNamed(context, "/search");
if (p != null) {
notifier.value = p;
}
},
child: Text("pick address"),
),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_osm_plugin
description: openStreetMap plugin for flutter apps (only Android for now, iOS will be supported in future)
version: 0.6.6+1
version: 0.6.7
homepage: https://github.com/liodali/osm_flutter
environment:
sdk: ">=2.3.0 <3.0.0"
Expand Down
Binary file added searchExample.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4d5f94a

Please sign in to comment.