Tweak block/report buttons
This commit is contained in:
parent
3d5dbe2c85
commit
037ca5629f
6 changed files with 22 additions and 17 deletions
|
|
@ -53,7 +53,7 @@ class ChatUserModal extends StatelessWidget {
|
|||
userId: userId,
|
||||
),
|
||||
),
|
||||
icon: const Icon(Icons.report),
|
||||
icon: Icon(Icons.adaptive.more),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -99,15 +99,13 @@ class StreamCard extends StatelessWidget {
|
|||
radius: 10.0,
|
||||
),
|
||||
const SizedBox(width: 5.0),
|
||||
Expanded(
|
||||
child: Tooltip(
|
||||
message: streamerName,
|
||||
preferBelow: false,
|
||||
child: Text(
|
||||
streamerName,
|
||||
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Tooltip(
|
||||
message: streamerName,
|
||||
preferBelow: false,
|
||||
child: Text(
|
||||
streamerName,
|
||||
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import 'package:cached_network_image/cached_network_image.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
import 'package:frosty/core/auth/auth_store.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class ProfileCard extends StatelessWidget {
|
||||
final AuthStore authStore;
|
||||
|
|
@ -95,7 +94,6 @@ class ProfileCard extends StatelessWidget {
|
|||
foregroundImage: CachedNetworkImageProvider(authStore.user.details!.profileImageUrl),
|
||||
),
|
||||
title: Text(authStore.user.details!.displayName),
|
||||
subtitle: Text('Joined on ${DateFormat.yMMMd().format(DateTime.parse(authStore.user.details!.createdAt))}'),
|
||||
trailing: OutlinedButton(
|
||||
onPressed: () => _showLogoutDialog(context),
|
||||
child: const Text('Log Out'),
|
||||
|
|
|
|||
|
|
@ -60,8 +60,9 @@ class BlockButton extends StatelessWidget {
|
|||
builder: (context) {
|
||||
final isBlocked = authStore.user.blockedUsers.where((blockedUser) => blockedUser.userId == targetUserId).isNotEmpty;
|
||||
|
||||
return OutlinedButton(
|
||||
child: isBlocked ? Text(simple ? 'Unblock' : 'Unblock $targetUser') : Text(simple ? 'Block' : 'Block $targetUser'),
|
||||
return OutlinedButton.icon(
|
||||
icon: const Icon(Icons.block),
|
||||
label: isBlocked ? Text(simple ? 'Unblock' : 'Unblock $targetUser') : Text(simple ? 'Block' : 'Block $targetUser'),
|
||||
onPressed: () => _showDialog(
|
||||
context,
|
||||
isBlocked: isBlocked,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:frosty/core/auth/auth_store.dart';
|
||||
import 'package:frosty/widgets/block_button.dart';
|
||||
import 'package:frosty/widgets/report_button.dart';
|
||||
|
|
@ -23,6 +23,13 @@ class BlockReportModal extends StatelessWidget {
|
|||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const SizedBox(
|
||||
width: 50.0,
|
||||
child: Divider(
|
||||
height: 25.0,
|
||||
thickness: 3.0,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||
width: double.infinity,
|
||||
|
|
|
|||
|
|
@ -13,9 +13,10 @@ class ReportButton extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return OutlinedButton(
|
||||
return OutlinedButton.icon(
|
||||
icon: const Icon(Icons.report),
|
||||
onPressed: () => launch('https://www.twitch.tv/$userLogin/report'),
|
||||
child: Text(name == null ? 'Report' : 'Report $name'),
|
||||
label: Text(name == null ? 'Report' : 'Report $name'),
|
||||
style: OutlinedButton.styleFrom(primary: Colors.red),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue