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

32 lines
860 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) {
return Scaffold(
2024-02-10 12:08:25 +00:00
appBar: PreferredSize(
preferredSize: const Size.fromHeight(32.0),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 18),
child: AppBar(),
)
),
2024-02-08 08:34:33 +00:00
body: SafeArea(
child: WebViewWidget(
controller: WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..setBackgroundColor(Colors.white)
..loadRequest(link)
..clearCache(),
),
),
);
}
}