{"id":23773149,"url":"https://github.com/ctkqiang/current_location","last_synced_at":"2026-01-11T13:35:06.134Z","repository":{"id":57697761,"uuid":"497262585","full_name":"ctkqiang/current_location","owner":"ctkqiang","description":"This package get the user current Location details","archived":false,"fork":false,"pushed_at":"2023-05-23T10:16:40.000Z","size":364,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-28T09:43:58.487Z","etag":null,"topics":["current","dart","flutter","johnmelodyme","location","opensource","package"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/current_location","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctkqiang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-05-28T08:45:20.000Z","updated_at":"2023-05-23T10:17:06.000Z","dependencies_parsed_at":"2022-09-26T21:01:53.338Z","dependency_job_id":"37fa041a-803f-4f2b-970e-aeb723797eb9","html_url":"https://github.com/ctkqiang/current_location","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"86fdc604a02d66d80c81d1e8d60131bcf1ad0df6"},"previous_names":["ctkqiang/current_location","johnmelodyme/current_location"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctkqiang%2Fcurrent_location","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctkqiang%2Fcurrent_location/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctkqiang%2Fcurrent_location/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctkqiang%2Fcurrent_location/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctkqiang","download_url":"https://codeload.github.com/ctkqiang/current_location/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232052259,"owners_count":18465722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["current","dart","flutter","johnmelodyme","location","opensource","package"],"created_at":"2025-01-01T05:35:58.023Z","updated_at":"2026-01-11T13:35:06.128Z","avatar_url":"https://github.com/ctkqiang.png","language":"CMake","readme":"## SimpleInAppWebView\n\n|                 | Android | IOS     |\n| --------------- | ------- | ------- |\n| **Requirement** | min 16+ | min 9.0 |\n\n### Getting Started\n\nThis package get the user current `Location` details. The returned data are the following:\n\n```dart\nLocation({\n    this.country,\n    this.countryCode,\n    this.region,\n    this.regionName,\n    this.timezone,\n    this.latitude,\n    this.longitude,\n    this.isp,\n    this.currentIP,\n});\n```\n\n#### Demo:\n\n![demo](https://github.com/johnmelodyme/current_location/blob/main/demo.jpg?raw=true)\n\n### How to use?\n\n1. Installation\n   Add `current_location` to `pubspec.yaml`, and hit command `flutter pub get`.\n   or\n   run `flutter pub add current_location`\n\n   ```yaml\n   dependencies:\n     current_location: any\n   ```\n\n2. Implementation\n   Before implementing, make sure you uderstand the `parameters`.\n\n```dart\nLocation({\n    this.country,\n    this.countryCode,\n    this.region,\n    this.regionName,\n    this.timezone,\n    this.latitude,\n    this.longitude,\n    this.isp,\n    this.currentIP,\n});\n```\n\n```dart\n  import 'package:current_location/current_location.dart';\n```\n\nExample of calling the function into a widget:\n\n```dart\nFutureBuilder(\n    future: UserLocation.getValue(),\n    builder: (BuildContext context, dynamic snapshot) {\n        if (snapshot.hasData) {\n            return Center(\n                child: Column(\n                    mainAxisAlignment: MainAxisAlignment.center,\n                    crossAxisAlignment: CrossAxisAlignment.center,\n                    children: [\n                        Text('Country: ${snapshot.data!.country}'),\n                        Text('Country Code: ${snapshot.data!.countryCode}'),\n                        Text('Region: ${snapshot.data!.region}'),\n                        Text('Region Name: ${snapshot.data!.regionName}'),\n                        Text('Timezone: ${snapshot.data!.timezone}'),\n                        Text('Latitude: ${snapshot.data!.latitude}'),\n                        Text('Longitude: ${snapshot.data!.longitude}'),\n                        Text('ISP: ${snapshot.data!.isp}'),\n                        Text('Current IP: ${snapshot.data!.currentIP}'),\n                    ],\n                ),\n            );\n        }\n        \n        return const CircularProgressIndicator();\n    },\n),\n```\n\nExample of returning it raw:\n\n```dart\nUserLocation.getValue().then((value) =\u003e print(value?.{REPLACE_THIS_OBJECT}));\n```\nor\n```dart\nlate final UserLocation userLocation =  await UserLocation.getValue();\n\nprint(userLocation.country!);\nprint(userLocation.{REPLACE_THIS_OBJECT}!)\n```\n\n### Contribution:\n\nI Would ❤️ to see any contributions. If you do liked my work, show some ❤️ by ⭐ repo.\n我愿意❤️ 查看任何贡献。如果你真的喜欢我的作品，展示一下❤️ 通过⭐ 回购。\n\u003cbr /\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/johnmelodyme/current_location/johnmelodyme-alipayqr/IMG_4026.JPG\"  style=\"height: 500px !important;width: 300px !important;\" \u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctkqiang%2Fcurrent_location","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctkqiang%2Fcurrent_location","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctkqiang%2Fcurrent_location/lists"}