Skip to content
pubscout

flutter_qiblah

3.2.0, released 9 months ago by medyas.ml

Widget that displays Qiblah direction using device sensors and location.

$ flutter pub add flutter_qiblah
Source repository

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.

Works with

Packages commonly used together with flutter_qiblah: ones it builds on, ones built on it, and its own family.