flet-geolocator 0.1.0__py3-none-any.whl → 0.2.0.dev30__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of flet-geolocator might be problematic. Click here for more details.

@@ -2,16 +2,21 @@ name: flet_geolocator
2
2
  description: Flet Geolocator control
3
3
  homepage: https://flet.dev
4
4
  repository: https://github.com/flet-dev/flet-geolocator/src/flutter/flet_geolocator
5
- version: 0.1.0
5
+ version: 0.2.0
6
+ publish_to: none
6
7
  environment:
7
8
  sdk: '>=3.2.3 <4.0.0'
8
9
  flutter: '>=1.17.0'
9
10
  dependencies:
10
11
  flutter:
11
12
  sdk: flutter
12
- geolocator: ^13.0.1
13
+ geolocator: ^14.0.1
13
14
  collection: ^1.16.0
14
- flet: ^0.25.2
15
+ flet:
16
+ git:
17
+ url: https://github.com/flet-dev/flet.git
18
+ path: packages/flet
19
+ ref: v1
15
20
  dev_dependencies:
16
21
  flutter_test:
17
22
  sdk: flutter
@@ -1,133 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: flet-geolocator
3
- Version: 0.1.0
4
- Summary: Geolocator control for Flet
5
- Author-email: Flet contributors <hello@flet.dev>
6
- Project-URL: Homepage, https://flet.dev
7
- Project-URL: Documentation, https://flet.dev/docs/controls/geolocator
8
- Project-URL: Repository, https://github.com/flet-dev/flet-geolocator
9
- Project-URL: Issues, https://github.com/flet-dev/flet-geolocator/issues
10
- Classifier: License :: OSI Approved :: Apache Software License
11
- Requires-Python: >=3.8
12
- Description-Content-Type: text/markdown
13
- Requires-Dist: flet>=0.25.2
14
-
15
- # Geolocator control for Flet
16
-
17
- `Geolocator` control for Flet.
18
-
19
- ## Usage
20
-
21
- Add `flet-geolocator` as dependency (`pyproject.toml` or `requirements.txt`) to your Flet project.
22
-
23
- ## Example
24
-
25
- ```py
26
-
27
- import flet as ft
28
-
29
- import flet_geolocator as fg
30
-
31
-
32
- async def main(page: ft.Page):
33
- page.scroll = ft.ScrollMode.ADAPTIVE
34
- page.appbar = ft.AppBar(title=ft.Text("Geolocator Tests"))
35
-
36
- def handle_position_change(e):
37
- page.add(ft.Text(f"New position: {e.latitude} {e.longitude}"))
38
-
39
- gl = fg.Geolocator(
40
- location_settings=fg.GeolocatorSettings(
41
- accuracy=fg.GeolocatorPositionAccuracy.LOW
42
- ),
43
- on_position_change=handle_position_change,
44
- on_error=lambda e: page.add(ft.Text(f"Error: {e.data}")),
45
- )
46
- page.overlay.append(gl)
47
-
48
- settings_dlg = lambda handler: ft.AlertDialog(
49
- adaptive=True,
50
- title=ft.Text("Opening Location Settings..."),
51
- content=ft.Text(
52
- "You are about to be redirected to the location/app settings. "
53
- "Please locate this app and grant it location permissions."
54
- ),
55
- actions=[ft.TextButton(text="Take me there", on_click=handler)],
56
- actions_alignment=ft.MainAxisAlignment.CENTER,
57
- )
58
-
59
- async def handle_permission_request(e):
60
- p = await gl.request_permission_async(wait_timeout=60)
61
- page.add(ft.Text(f"request_permission: {p}"))
62
-
63
- async def handle_get_permission_status(e):
64
- p = await gl.get_permission_status_async()
65
- page.add(ft.Text(f"get_permission_status: {p}"))
66
-
67
- async def handle_get_current_position(e):
68
- p = await gl.get_current_position_async()
69
- page.add(ft.Text(f"get_current_position: ({p.latitude}, {p.longitude})"))
70
-
71
- async def handle_get_last_known_position(e):
72
- p = await gl.get_last_known_position_async()
73
- page.add(ft.Text(f"get_last_known_position: ({p.latitude}, {p.longitude})"))
74
-
75
- async def handle_location_service_enabled(e):
76
- p = await gl.is_location_service_enabled_async()
77
- page.add(ft.Text(f"is_location_service_enabled: {p}"))
78
-
79
- async def handle_open_location_settings(e):
80
- p = await gl.open_location_settings_async()
81
- page.close(location_settings_dlg)
82
- page.add(ft.Text(f"open_location_settings: {p}"))
83
-
84
- async def handle_open_app_settings(e):
85
- p = await gl.open_app_settings_async()
86
- page.close(app_settings_dlg)
87
- page.add(ft.Text(f"open_app_settings: {p}"))
88
-
89
- location_settings_dlg = settings_dlg(handle_open_location_settings)
90
- app_settings_dlg = settings_dlg(handle_open_app_settings)
91
-
92
- page.add(
93
- ft.Row(
94
- wrap=True,
95
- controls=[
96
- ft.OutlinedButton(
97
- "Request Permission",
98
- on_click=handle_permission_request,
99
- ),
100
- ft.OutlinedButton(
101
- "Get Permission Status",
102
- on_click=handle_get_permission_status,
103
- ),
104
- ft.OutlinedButton(
105
- "Get Current Position",
106
- on_click=handle_get_current_position,
107
- ),
108
- ft.OutlinedButton(
109
- "Get Last Known Position",
110
- visible=False if page.web else True,
111
- on_click=handle_get_last_known_position,
112
- ),
113
- ft.OutlinedButton(
114
- "Is Location Service Enabled",
115
- on_click=handle_location_service_enabled,
116
- ),
117
- ft.OutlinedButton(
118
- "Open Location Settings",
119
- visible=False if page.web else True,
120
- on_click=lambda e: page.open(location_settings_dlg),
121
- ),
122
- ft.OutlinedButton(
123
- "Open App Settings",
124
- visible=False if page.web else True,
125
- on_click=lambda e: page.open(app_settings_dlg),
126
- ),
127
- ],
128
- )
129
- )
130
-
131
-
132
- ft.app(main)
133
- ```
@@ -1,16 +0,0 @@
1
- flet_geolocator/__init__.py,sha256=TTBRZnvkkRs9ZvYgoHbs5GPDofLSaRRAdXcF89RJf-I,321
2
- flet_geolocator/geolocator.py,sha256=Y8BuqsVproMgWdZXcCNevkR7VbwZogy2iRDWglfadd8,10981
3
- flutter/flet_geolocator/CHANGELOG.md,sha256=66sWepPaeTc9_lzcYIGU55AlxSU5Z1XVtknXpzd_-p8,40
4
- flutter/flet_geolocator/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
5
- flutter/flet_geolocator/README.md,sha256=sYHQP6tUk1CzbWAaqucJStoRvAsgp36IqjaIVoXCiF4,70
6
- flutter/flet_geolocator/analysis_options.yaml,sha256=32kjGAc-zF87inWaH5M46yGZWQDTwrwfvNLHeAocfG4,154
7
- flutter/flet_geolocator/pubspec.lock,sha256=ki5BAoj3ZL1jT_Sa1yreASvyyAYmfV2UyXkOYFPAGbw,23415
8
- flutter/flet_geolocator/pubspec.yaml,sha256=CpUKa_3ufvFWZ8KJCVOP1sZpMqsPOMCxkR0GWXcPfuE,421
9
- flutter/flet_geolocator/lib/flet_geolocator.dart,sha256=fCfw3UazCs3O8SXb8N3AdoeEwfVHDqxXu9alH94dIWY,98
10
- flutter/flet_geolocator/lib/src/create_control.dart,sha256=rFmDJKRlM4WsTFraITXMRXA17eO_cJihccpy3KOPnCY,377
11
- flutter/flet_geolocator/lib/src/geolocator.dart,sha256=zthjmN8x7a-DDBpQOvV1nZar7KAgPGkRAtzd4L0pfrY,4456
12
- flutter/flet_geolocator/lib/src/utils/geolocator.dart,sha256=phHL919CcuKWMqt-_YiiPDCNePV-disUWyVp9TmOBd8,4754
13
- flet_geolocator-0.1.0.dist-info/METADATA,sha256=YxLs862lP0AovRGPF2I6ZapayUVODrQDzjSwgHzoewQ,4576
14
- flet_geolocator-0.1.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
15
- flet_geolocator-0.1.0.dist-info/top_level.txt,sha256=MuAs94VDBb5Btg9cvN83W2sHm_YslMQ2JOKZhqm88cs,24
16
- flet_geolocator-0.1.0.dist-info/RECORD,,
@@ -1,17 +0,0 @@
1
- import 'package:flet/flet.dart';
2
-
3
- import 'geolocator.dart';
4
-
5
- CreateControlFactory createControl = (CreateControlArgs args) {
6
- switch (args.control.type) {
7
- case "geolocator":
8
- return GeolocatorControl(
9
- parent: args.parent, control: args.control, backend: args.backend);
10
- default:
11
- return null;
12
- }
13
- };
14
-
15
- void ensureInitialized() {
16
- // nothing to do
17
- }