Entferne PocketBase-Abhängigkeit und Analytics-Skript hinzugefügt

This commit is contained in:
2025-12-03 03:05:34 +01:00
parent b58571e52b
commit 412556b3f3
4 changed files with 3 additions and 27 deletions

View File

@@ -1,5 +1,4 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:pocketbase/pocketbase.dart'; // Import the PocketBase package
import 'expectation_input_page.dart'; import 'expectation_input_page.dart';
import '../widgets/clearance_field.dart'; import '../widgets/clearance_field.dart';
@@ -33,7 +32,6 @@ class FinalClearanceDisplayState extends State<FinalClearanceDisplay> {
late String altitude; late String altitude;
late String squawk; late String squawk;
late String frequency; late String frequency;
final PocketBase pb = PocketBase('https://backend.degnedict.de'); // Initialize PocketBase
@override @override
void initState() { void initState() {
@@ -43,24 +41,8 @@ class FinalClearanceDisplayState extends State<FinalClearanceDisplay> {
altitude = widget.altitude; altitude = widget.altitude;
squawk = widget.squawk; squawk = widget.squawk;
frequency = widget.frequency; frequency = widget.frequency;
_createPageViewRecord(); // Create a record with the current timestamp
} }
// Function to create a new record with a timestamp in epoch milliseconds in your PocketBase collection
Future<void> _createPageViewRecord() async {
try {
// Get the current time in epoch milliseconds
int currentTimeInMillis = DateTime.now().millisecondsSinceEpoch;
// Create a new record in the collection with the current epoch time
await pb.collection('IFRbuddyUsage').create(body: {
'timestamp': currentTimeInMillis, // Save current timestamp as epoch time (milliseconds)
});
} catch (e) {
}
}
// Navigate back to the first page (ExpectationInputPage) // Navigate back to the first page (ExpectationInputPage)
void _navigateHome(BuildContext context) { void _navigateHome(BuildContext context) {
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(

View File

@@ -288,14 +288,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.8" version: "2.1.8"
pocketbase:
dependency: "direct main"
description:
name: pocketbase
sha256: "1d2958a3a7cb1e0050f425f179bd6557441fafcf740a79d5b8b80d6954149790"
url: "https://pub.dev"
source: hosted
version: "0.18.1"
shared_preferences: shared_preferences:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@@ -37,7 +37,6 @@ dependencies:
http: ^1.2.2 http: ^1.2.2
shared_preferences: ^2.3.2 shared_preferences: ^2.3.2
flutter_launcher_icons: ^0.14.1 flutter_launcher_icons: ^0.14.1
pocketbase: ^0.18.1
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter

View File

@@ -37,6 +37,9 @@
<title>ifrbuddy</title> <title>ifrbuddy</title>
<link rel="manifest" href="manifest.json"> <link rel="manifest" href="manifest.json">
<!-- Umami Analytics -->
<script defer src="https://umami.degnedict.de/script.js" data-website-id="82ee3dc6-dc80-42d3-8583-d6824aebfed5"></script>
</head> </head>
<body> <body>
<script src="flutter_bootstrap.js" async></script> <script src="flutter_bootstrap.js" async></script>