flutter_qiblah
3.2.0, released 9 months ago by medyas.ml
Widget that displays Qiblah direction using device sensors and location.
What it does
It reads the device’s compass and GPS to calculate the direction to Mecca and shows it as an arrow or text. The widget also reports GPS status and permission state.
AI-written summary of version 3.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to show Qiblah direction in an app
- Your device has a compass sensor and GPS
- You want a single widget that handles permissions and status
Skip it when
- Running on iOS simulator
- Devices without a compass sensor
- You need a custom map-based direction without the widget
Strengths
- Uses native sensors for accurate direction
- Null‑safe and up‑to‑date dependencies
- Handles permission and GPS status internally
Weaknesses
- Does not work on iOS simulator
- Requires runtime permissions for location
- Limited to Android/iOS only
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
Add dependency, request location permission, add <FlutterQiblah> widget in UI. No build_runner needed.
```dart
import 'package:flutter_qiblah/flutter_qiblah.dart';
class QiblahDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Qiblah Demo')),
body: Center(
child: FlutterQiblah(
onQiblahDirection: (direction) {
print('Qiblah direction: $direction');
},
),
),
);
}
}
```Alternatives
Packages that do the same job and could replace flutter_qiblah.
- dismissible_page
Widget that lets you dismiss a page in any direction with custom gestures
89Compare - flutter_card_swiper
A Tinder-like card swiper widget with support for arbitrary directions and custom logic.
76Compare - loop_page_view
A PageView builder wrapper enabling infinite scrolling in both directions.
50Compare - flutter_steps
A customizable step indicator widget for horizontal or vertical layouts.
50Compare
Works with
Packages commonly used together with flutter_qiblah: ones it builds on, ones built on it, and its own family.
- vector_mathflutter_qiblah depends on itVector math library for 2D/3D/4D vectors, matrices, quaternions, and geometry.
- stream_transformflutter_qiblah depends on itExtension methods adding common stream transform operators
- geolocatorflutter_qiblah depends on itCross-platform plugin to access device GPS, location updates, and coordinate calculations.