This repository has been archived on 2024-06-08. You can view files and clone it, but cannot push or open issues or pull requests.
SolarAgent/lib/screens/application.dart

33 lines
859 B
Dart
Raw Normal View History

2024-02-08 08:34:33 +00:00
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
2024-02-10 12:08:25 +00:00
class ApplicationScreen extends StatelessWidget {
2024-02-08 08:34:33 +00:00
final Uri link;
2024-02-10 12:08:25 +00:00
final String title;
2024-02-08 08:34:33 +00:00
2024-02-10 12:08:25 +00:00
const ApplicationScreen({super.key, required this.link, required this.title});
2024-02-08 08:34:33 +00:00
@override
Widget build(BuildContext context) {
2024-02-10 13:09:15 +00:00
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text("Swipe from left to back to dashboard."),
));
2024-02-08 08:34:33 +00:00
return Scaffold(
body: SafeArea(
2024-02-10 12:55:46 +00:00
child: Stack(
children: [
WebViewWidget(
controller: WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..setBackgroundColor(Colors.white)
..loadRequest(link)
..clearCache(),
),
],
2024-02-08 08:34:33 +00:00
),
),
);
}
}