mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-23 17:50:44 +01:00

- add missing label to progress indicator - add option to enable locale based homeservers (disabled by default) Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
31 lines
947 B
Dart
31 lines
947 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:matrix_homeserver_recommendations/matrix_homeserver_recommendations.dart';
|
|
|
|
import 'package:fluffychat/pages/homeserver_picker/homeserver_picker.dart';
|
|
|
|
class HomeserverTile extends StatelessWidget {
|
|
final HomeserverBenchmarkResult server;
|
|
final HomeserverPickerController controller;
|
|
|
|
const HomeserverTile(
|
|
{Key? key, required this.server, required this.controller})
|
|
: super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ListTile(
|
|
trailing: IconButton(
|
|
icon: const Icon(Icons.info_outlined),
|
|
onPressed: () => controller.showServerInfo(server),
|
|
),
|
|
onTap: () => controller.setServer(server.homeserver.baseUrl.host),
|
|
title: Text(server.homeserver.baseUrl.host),
|
|
subtitle: Text(
|
|
server.homeserver.description ?? '',
|
|
style: TextStyle(color: Colors.grey.shade700),
|
|
),
|
|
);
|
|
}
|
|
}
|