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
2024-02-10 20:55:46 +08:00

35 lines
942 B
Dart

import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
class ApplicationScreen extends StatelessWidget {
final Uri link;
final String title;
const ApplicationScreen({super.key, required this.link, required this.title});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PreferredSize(
preferredSize: const Size.fromHeight(32.0),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 18),
child: AppBar(),
)),
body: SafeArea(
child: Stack(
children: [
WebViewWidget(
controller: WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..setBackgroundColor(Colors.white)
..loadRequest(link)
..clearCache(),
),
],
),
),
);
}
}