Added ShadowMap widget #11
@ -7,6 +7,7 @@ import 'user.dart';
|
||||
import 'globals.dart' as globals;
|
||||
import 'ShadowDetector.dart';
|
||||
|
||||
|
||||
class HomePage extends StatefulWidget {
|
||||
const HomePage({Key? key}) : super(key: key);
|
||||
|
||||
|
52
lib/ShadowMap.dart
Normal file
52
lib/ShadowMap.dart
Normal 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,
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
28
pubspec.lock
28
pubspec.lock
@ -693,6 +693,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:
|
||||
|
@ -48,6 +48,7 @@ dependencies:
|
||||
flutter_signin_button: ^2.0.0
|
||||
font_awesome_flutter: ^9.2.0
|
||||
provider: ^5.0.0
|
||||
webview_flutter: ^3.0.0
|
||||
|
||||
#Google Sign-in
|
||||
firebase_auth: ^1.1.4
|
||||
|
Loading…
x
Reference in New Issue
Block a user