Compare commits
12 Commits
32c88fa857
...
master
Author | SHA1 | Date | |
---|---|---|---|
d428be6504 | |||
608ef75f9f | |||
4474eb0aa9 | |||
8be01e92a8 | |||
b64e1525ae | |||
27ffb07256 | |||
9fbc19ff7e | |||
a2326118d2 | |||
169ebeb30a | |||
7eb09390ad | |||
84c838b15e | |||
c00d2fac05 |
@ -41,6 +41,8 @@
|
|||||||
<data android:mimeType="text/plain"/>
|
<data android:mimeType="text/plain"/>
|
||||||
</intent>
|
</intent>
|
||||||
</queries>
|
</queries>
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
</manifest>
|
</manifest>
|
||||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
30
assets/ca/lets-encrypt-r3.pem
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw
|
||||||
|
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
|
||||||
|
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMjAwOTA0MDAwMDAw
|
||||||
|
WhcNM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7kIJ+m74uyA+eitRY8kc607TkC53wl
|
||||||
|
ikfmZW4/RvTZ8M6UK+5UzhK8jCdLuMGYL6KvzXGRSgi3yLgjewQtCPkIVz6D2QQz
|
||||||
|
CkcheAmCJ8MqyJu5zlzyZMjAvnnAT45tRAxekrsu94sQ4egdRCnbWSDtY7kh+BIm
|
||||||
|
lJNXoB1lBMEKIq4QDUOXoRgffuDghje1WrG9ML+Hbisq/yFOGwXD9RiX8F6sw6W4
|
||||||
|
avAuvDszue5L3sz85K+EC4Y/wFVDNvZo4TYXao6Z0f+lQKc0t8DQYzk1OXVu8rp2
|
||||||
|
yJMC6alLbBfODALZvYH7n7do1AZls4I9d1P4jnkDrQoxB3UqQ9hVl3LEKQ73xF1O
|
||||||
|
yK5GhDDX8oVfGKF5u+decIsH4YaTw7mP3GFxJSqv3+0lUFJoi5Lc5da149p90Ids
|
||||||
|
hCExroL1+7mryIkXPeFM5TgO9r0rvZaBFOvV2z0gp35Z0+L4WPlbuEjN/lxPFin+
|
||||||
|
HlUjr8gRsI3qfJOQFy/9rKIJR0Y/8Omwt/8oTWgy1mdeHmmjk7j1nYsvC9JSQ6Zv
|
||||||
|
MldlTTKB3zhThV1+XWYp6rjd5JW1zbVWEkLNxE7GJThEUG3szgBVGP7pSWTUTsqX
|
||||||
|
nLRbwHOoq7hHwg==
|
||||||
|
-----END CERTIFICATE-----
|
Before Width: | Height: | Size: 274 KiB |
@ -1,5 +1,5 @@
|
|||||||
flutter_launcher_icons:
|
flutter_launcher_icons:
|
||||||
android: true
|
android: true
|
||||||
ios: true
|
ios: true
|
||||||
image_path: "assets/splash/splashSquare.png"
|
image_path: "assets/splash/splash.png"
|
||||||
min_sdk_android: 16
|
min_sdk_android: 16
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
@ -1,10 +1,19 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:app/state/timeStatusState.dart';
|
import 'package:app/state/timeStatusState.dart';
|
||||||
import 'package:app/state/mapState.dart';
|
import 'package:app/state/mapState.dart';
|
||||||
import 'package:app/view/home.dart';
|
import 'package:app/view/home.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
void main() {
|
void main() async {
|
||||||
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
|
ByteData data = await PlatformAssetBundle().load('assets/ca/lets-encrypt-r3.pem');
|
||||||
|
SecurityContext.defaultContext.setTrustedCertificatesBytes(data.buffer.asUint8List());
|
||||||
|
|
||||||
runApp(
|
runApp(
|
||||||
MultiProvider(
|
MultiProvider(
|
||||||
providers: [
|
providers: [
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:developer';
|
||||||
|
|
||||||
import 'package:app/extensions/obtainProviderExtension.dart';
|
import 'package:app/extensions/obtainProviderExtension.dart';
|
||||||
import 'package:app/extensions/positionLatLngExtension.dart';
|
import 'package:app/extensions/positionLatLngExtension.dart';
|
||||||
import 'package:app/state/mapState.dart';
|
import 'package:app/state/mapState.dart';
|
||||||
@ -32,14 +34,42 @@ class _HomePageState extends State<HomeView> {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
requestLiveLocation(context.obtainState<MapState>(), false, true, true);
|
requestLiveLocation(false, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> requestLiveLocation(MapState mapState, bool ask, bool orLast, bool loadingIndicator) async {
|
Future<void> requestLiveLocation(bool ask, bool orLast, bool loadingIndicator) async {
|
||||||
Position? position;
|
Position? position;
|
||||||
|
MapState mapState = context.obtainState<MapState>();
|
||||||
LocationPermission permission = await Geolocator.checkPermission();
|
LocationPermission permission = await Geolocator.checkPermission();
|
||||||
|
log(permission.toString());
|
||||||
|
|
||||||
if (loadingIndicator && permission != LocationPermission.deniedForever) {
|
if(
|
||||||
|
permission == LocationPermission.denied
|
||||||
|
|| permission == LocationPermission.deniedForever
|
||||||
|
|| permission == LocationPermission.unableToDetermine
|
||||||
|
) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: const Text("Standort"),
|
||||||
|
content: const Text("Dein Standort konnte nicht bestimmt werden.\nAktiviere für die Standortbestimmung deinen Standort und gib der App die entsprechenden Berechtigungen."),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
|
child: const Text("Okay"),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
loadingIndicator
|
||||||
|
&& permission != LocationPermission.deniedForever
|
||||||
|
&& permission != LocationPermission.denied
|
||||||
|
) {
|
||||||
setState(() {
|
setState(() {
|
||||||
locationLoading = true;
|
locationLoading = true;
|
||||||
});
|
});
|
||||||
@ -125,7 +155,7 @@ class _HomePageState extends State<HomeView> {
|
|||||||
}
|
}
|
||||||
return const Icon(Icons.location_disabled);
|
return const Icon(Icons.location_disabled);
|
||||||
}),
|
}),
|
||||||
onPressed: () => requestLiveLocation(context.obtainState<MapState>(), true, false, true),
|
onPressed: () => requestLiveLocation(true, false, true),
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
|
@ -33,12 +33,12 @@ class TimeWarningView extends StatelessWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"In Fußgängerzone?",
|
"In einer Fußgängerzone?",
|
||||||
style: TextStyle(fontSize: 20),
|
style: TextStyle(fontSize: 20),
|
||||||
),
|
),
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Text(
|
child: Text(
|
||||||
"hier ist der Konsum nur\nzwischen 20 und 7 Uhr gestattet!",
|
"hier ist der Konsum nur\nzwischen 20 und 7 Uhr gestattet",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.0.0+1
|
version: 1.1.1+6
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.3.2 <4.0.0'
|
sdk: '>=3.3.2 <4.0.0'
|
||||||
@ -70,7 +70,8 @@ flutter:
|
|||||||
|
|
||||||
# To add assets to your application, add an assets section, like this:
|
# To add assets to your application, add an assets section, like this:
|
||||||
assets:
|
assets:
|
||||||
- assets/splash/splash.png
|
- assets/ca/
|
||||||
|
- assets/splash/splash.png
|
||||||
|
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
# https://flutter.dev/assets-and-images/#resolution-aware
|
# https://flutter.dev/assets-and-images/#resolution-aware
|
||||||
|
@ -39,6 +39,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
|
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style id="splash-screen-style">
|
<style id="splash-screen-style">
|
||||||
html {
|
html {
|
||||||
height: 100%
|
height: 100%
|
||||||
|