feat: allow to create widgets
- supported widget types: therpad, jitsi, video, custom - update Matrix SDK Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
This commit is contained in:
parent
f335cdbaf6
commit
0ddaff75db
9 changed files with 241 additions and 18 deletions
31
lib/pages/chat/edit_widgets_dialog.dart
Normal file
31
lib/pages/chat/edit_widgets_dialog.dart
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'add_widget_tile.dart';
|
||||
|
||||
class EditWidgetsDialog extends StatelessWidget {
|
||||
final Room room;
|
||||
|
||||
const EditWidgetsDialog({Key? key, required this.room}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SimpleDialog(
|
||||
title: Text(L10n.of(context)!.editWidgets),
|
||||
children: [
|
||||
...room.widgets.map((e) => ListTile(
|
||||
title: Text(e.name ?? e.type),
|
||||
leading: IconButton(
|
||||
onPressed: () {
|
||||
room.deleteWidget(e.id!);
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
icon: const Icon(Icons.delete)),
|
||||
)),
|
||||
AddWidgetTile(room: room),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue