This repository has been archived on 2023-11-18. You can view files and clone it, but cannot push or open issues or pull requests.
ha_client/lib/panels/widgets/link_to_web_config.dart

30 lines
824 B
Dart

part of '../../main.dart';
class LinkToWebConfig extends StatelessWidget {
final String name;
final String url;
const LinkToWebConfig({Key key, @required this.name, @required this.url}) : super(key: key);
@override
Widget build(BuildContext context) {
return Card(
child: Column(
children: <Widget>[
ListTile(
title: Text("${this.name}",
textAlign: TextAlign.left,
overflow: TextOverflow.ellipsis,
style: new TextStyle(fontWeight: FontWeight.bold, fontSize: Sizes.largeFontSize)),
subtitle: Text("Tap to opne web version"),
onTap: () {
Launcher.launchAuthenticatedWebView(context: context, url: this.url, title: this.name);
},
)
],
),
);
}
}