frosty/lib/widgets/block_report_modal.dart
Tommy Chow a82a0e1acc Convert modals to use FrostyModal (#90)
Also cleaned up the sleep timer and removed the "more" button from the
user modal in favor of tapping the username.
2022-06-27 06:58:44 -04:00

54 lines
1.5 KiB
Dart

import 'dart:io';
import 'package:flutter/material.dart';
import 'package:frosty/core/auth/auth_store.dart';
import 'package:frosty/widgets/block_button.dart';
import 'package:frosty/widgets/modal.dart';
import 'package:frosty/widgets/report_button.dart';
class BlockReportModal extends StatelessWidget {
final AuthStore authStore;
final String name;
final String userLogin;
final String userId;
const BlockReportModal({
Key? key,
required this.authStore,
required this.name,
required this.userLogin,
required this.userId,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return FrostyModal(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
if (authStore.isLoggedIn)
Container(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
width: double.infinity,
child: BlockButton(
authStore: authStore,
targetUser: name,
targetUserId: userId,
simple: false,
),
),
const SizedBox(height: 10.0),
Container(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
width: double.infinity,
child: ReportButton(
userLogin: userLogin,
displayName: name,
),
),
if (Platform.isAndroid) const SizedBox(height: 20.0),
],
),
);
}
}