fluffychat/lib/pangea/chat_settings/widgets/download_analytics_button.dart
ggurdin 027158e286
1435 refactor into function specific groupings (#1440)
* fix: deleted unreferenced files

* fix: sort files based on function
2025-01-14 14:00:30 -05:00

44 lines
1.2 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/pangea/spaces/widgets/download_analytics_dialog.dart';
class DownloadAnalyticsButton extends StatelessWidget {
final Room space;
const DownloadAnalyticsButton({
super.key,
required this.space,
});
@override
Widget build(BuildContext context) {
final iconColor = Theme.of(context).textTheme.bodyLarge!.color;
return Column(
children: [
ListTile(
onTap: () {
showDialog(
context: context,
builder: (context) => DownloadAnalyticsDialog(space: space),
);
},
leading: CircleAvatar(
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
foregroundColor: iconColor,
child: const Icon(Icons.download_outlined),
),
title: Text(
L10n.of(context).downloadSpaceAnalytics,
style: TextStyle(
color: Theme.of(context).colorScheme.secondary,
fontWeight: FontWeight.bold,
),
),
),
],
);
}
}