https://github.com/workwithafridi/compass_view-package
https://github.com/workwithafridi/compass_view-package
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/workwithafridi/compass_view-package
- Owner: WorkWithAfridi
- License: mit
- Created: 2025-05-03T12:15:54.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-05-03T14:12:55.000Z (about 1 year ago)
- Last Synced: 2025-06-30T13:05:24.545Z (about 1 year ago)
- Language: C++
- Size: 14.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 📍 compass_view
A customizable and lightweight Flutter package built on top of flutter_compass, providing beautiful compass UI components and direction/heading utilities out of the box. Designed for easy integration and scalability, this package makes it simple to build compass-based applications with minimal effort.
## ✨ Features
- 🔄 Real-time compass rotation with smooth animations.
- 🧭 Beautiful customizable compass painter widget.
- 📐 Heading/degree calculation with cardinal directions (N, NE, SW, etc).
- ⚠️ Built-in error handling with customizable `errorBuilder`.
- 🧱 Modular components for easy integration and reuse.
## Images/ Screenshots
## 📦 Installation
Add the following line to your `pubspec.yaml`:
```yaml
dependencies:
compass_view: ^0.0.1 # replace with latest version
```
```bash
flutter pub get
```
## 🧑💻 Usage
🔁 Compass with Live Heading
```dart
import 'package:compass_view/compass_view.dart';
CompassHeading(
textStyle: TextStyle(
fontSize: 32,
fontWeight: FontWeight.bold,
color: Colors.black
),
),
```
🎨 Display the Compass Only (No Heading)
```dart
import 'package:compass_view/compass_view.dart';
CompassWidget(
size: 100,
backgroundColor: Colors.black,
markerColor: Colors.black,
textStyle: TextStyle(fontSize: 22, fontWeight: FontWeight.bold, color: Colors.black),
)
```
## ⚙️ Permissions
Ensure your app requests sensor permissions on Android and iOS.
Android
Add the following to AndroidManifest.xml:
```xml
```
iOS
```xml
NSLocationWhenInUseUsageDescription
This app uses your location to show compass heading.
```
## 🙌 Contributing
Pull requests and suggestions are welcome! Please open issues to report bugs or feature requests.