raw_gnss 0.1.2 copy "raw_gnss: ^0.1.2" to clipboard
raw_gnss: ^0.1.2 copied to clipboard

outdated

Get Raw GNSS Data Points (GNSSMeasurement and GNSSNavigationMessages) for Android on Flutter

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:raw_gnss/gnss_measurement_model.dart';
import 'package:raw_gnss/raw_gnss.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: HomeScreen(),
    );
  }
}

class HomeScreen extends StatefulWidget {
  @override
  _HomeScreenState createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  @override
  void initState() {
    super.initState();
    Permission.location.request().then((value) => setState(() {}));
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Demo"),
      ),
      body: Center(
        child: StreamBuilder<GnssMeasurementModel>(builder: (context, snapshot) {
          return Text(snapshot.data.string ?? "");
        }, stream: RawGnss().gnssMeasurementEvents,),
      ),
    );
  }
}
18
likes
0
pub points
67%
popularity

Publisher

verified publisherjoshi.dev

Get Raw GNSS Data Points (GNSSMeasurement and GNSSNavigationMessages) for Android on Flutter

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on raw_gnss