42 lines
1.1 KiB
Dart
42 lines
1.1 KiB
Dart
|
import 'package:flutter/material.dart';
|
||
|
import 'package:gps/provider/gps_model.dart';
|
||
|
import 'package:provider/provider.dart';
|
||
|
|
||
|
class GpsPositionWidget extends StatelessWidget {
|
||
|
const GpsPositionWidget({
|
||
|
Key? key,
|
||
|
}) : super(key: key);
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Consumer<GpsModel>(
|
||
|
builder: (context, model, child) => Column(
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
children: <Widget>[
|
||
|
Text(
|
||
|
'Breite: ${model.currentLocation.latitude}',
|
||
|
),
|
||
|
Text(
|
||
|
'Länge: ${model.currentLocation.longitude}',
|
||
|
),
|
||
|
Text(
|
||
|
'Genauigkeit: ${model.currentLocation.accuracy}',
|
||
|
),
|
||
|
Text(
|
||
|
'Geschwindigkeit: ${model.currentLocation.speed}',
|
||
|
),
|
||
|
Text(
|
||
|
'Richtung: ${model.currentLocation.heading}',
|
||
|
),
|
||
|
Text(
|
||
|
'Satelliten: ${model.currentLocation.satelliteNumber}',
|
||
|
),
|
||
|
Text(
|
||
|
'Provider: ${model.currentLocation.provider}',
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|