Initial commit
This commit is contained in:
commit
b5f2ecd56f
96 changed files with 4522 additions and 0 deletions
32
lib/components/dialogs/redact_message_dialog.dart
Normal file
32
lib/components/dialogs/redact_message_dialog.dart
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../matrix.dart';
|
||||
|
||||
class RedactMessageDialog extends StatelessWidget {
|
||||
final Event event;
|
||||
const RedactMessageDialog(this.event);
|
||||
|
||||
void removeAction(BuildContext context) {
|
||||
Matrix.of(context).tryRequestWithLoadingDialog(event.redact());
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text("Message will be removed for all participants"),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
child: Text("Close".toUpperCase(),
|
||||
style: TextStyle(color: Colors.blueGrey)),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
FlatButton(
|
||||
child: Text("Remove".toUpperCase()),
|
||||
onPressed: () => removeAction(context),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue