Tweak block/report buttons
This commit is contained in:
parent
3d5dbe2c85
commit
037ca5629f
6 changed files with 22 additions and 17 deletions
|
|
@ -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