Added ShadowMap widget #11

Merged
shas6395 merged 6 commits from shas6395-ShadowMap into master 2022-05-19 12:03:47 +02:00
4 changed files with 89 additions and 7 deletions
Showing only changes of commit 48a1fbc766 - Show all commits

View File

@ -6,6 +6,7 @@ import 'signInPage.dart';
import 'user.dart';
import 'globals.dart' as globals;
class HomePage extends StatefulWidget {
const HomePage({Key? key}) : super(key: key);

52
lib/ShadowMap.dart Normal file
View File

@ -0,0 +1,52 @@
import 'package:webview_flutter/webview_flutter.dart';
import 'package:flutter/material.dart';
//This widget can be called like: ShadowMap(latitude: 59.27439, longitude: 18.03250);
class ShadowMap extends StatefulWidget {
final double latitude;
final double longitude;
const ShadowMap({
Key? key,
required this.latitude,
required this.longitude,
}) : super(key: key);
@override
State<ShadowMap> createState() => _ShadowMapState();
}
class _ShadowMapState extends State<ShadowMap> {
@override
Widget build(BuildContext context) {
var lat = widget.latitude;
var lng = widget.longitude;
var dateInMilliseconds = DateTime.now().millisecondsSinceEpoch.toString();
return Scaffold(
appBar: AppBar(
centerTitle: true,
backgroundColor: const Color.fromARGB(204, 172, 123, 132),
title: Text(
'Sun Chasers',
style: TextStyle(
fontSize: 42,
color: const Color.fromARGB(255, 79, 98, 114),
fontFamily: 'Sacramento',
shadows: <Shadow>[
Shadow(
offset: Offset(2, 2),
blurRadius: 10.0,
color: Color.fromARGB(255, 0, 0, 0),
),
],
),
),
),
body: WebView(
initialUrl: 'https://app.shadowmap.org/?lat=$lat&lng=$lng&zoom=17&basemap=map&time=$dateInMilliseconds&vq=2',
javascriptMode: JavascriptMode.unrestricted,
)
);
}
}

View File

@ -14,7 +14,7 @@ packages:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0"
version: "2.3.1"
async:
dependency: transitive
description:
@ -91,7 +91,7 @@ packages:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
version: "1.2.1"
file:
dependency: transitive
description:
@ -260,7 +260,7 @@ packages:
name: google_api_headers
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0+1"
version: "1.3.0"
google_fonts:
dependency: "direct main"
description:
@ -316,14 +316,14 @@ packages:
name: google_sign_in_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
version: "2.1.3"
google_sign_in_web:
dependency: transitive
description:
name: google_sign_in_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.1+1"
version: "0.10.1+2"
http:
dependency: "direct main"
description:
@ -512,7 +512,7 @@ packages:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
version: "2.0.4"
path_provider_windows:
dependency: transitive
description:
@ -658,6 +658,34 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
webview_flutter:
dependency: "direct main"
description:
name: webview_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.4"
webview_flutter_android:
dependency: transitive
description:
name: webview_flutter_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.8"
webview_flutter_platform_interface:
dependency: transitive
description:
name: webview_flutter_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
webview_flutter_wkwebview:
dependency: transitive
description:
name: webview_flutter_wkwebview
url: "https://pub.dartlang.org"
source: hosted
version: "2.7.5"
win32:
dependency: transitive
description:
@ -685,7 +713,7 @@ packages:
name: yaml
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
version: "3.1.1"
sdks:
dart: ">=2.16.2 <3.0.0"
flutter: ">=2.10.0-0"

View File

@ -45,6 +45,7 @@ dependencies:
google_fonts: ^2.3.2
flutter_signin_button: ^2.0.0
provider: ^5.0.0
webview_flutter: ^3.0.0
#Google Sign-in
firebase_auth: ^1.1.4