feat: implement retreiving widgets
- display a bottom sheet with widgets - open widgets in a browser - fixes in .gitignore - Windows UWP build files Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
This commit is contained in:
parent
17f703345c
commit
31bec1a0d8
74 changed files with 1363 additions and 327 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
|
@ -19,8 +20,10 @@ import 'package:vrouter/vrouter.dart';
|
|||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pages/chat/chat_view.dart';
|
||||
import 'package:fluffychat/pages/chat/cupertino_widgets_bottom_sheet.dart';
|
||||
import 'package:fluffychat/pages/chat/event_info_dialog.dart';
|
||||
import 'package:fluffychat/pages/chat/recording_dialog.dart';
|
||||
import 'package:fluffychat/pages/chat/widgets_bottom_sheet.dart';
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/event_extension.dart';
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/ios_badge_client_extension.dart';
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart';
|
||||
|
|
@ -63,7 +66,9 @@ class ChatController extends State<Chat> {
|
|||
bool dragging = false;
|
||||
|
||||
void onDragEntered(_) => setState(() => dragging = true);
|
||||
|
||||
void onDragExited(_) => setState(() => dragging = false);
|
||||
|
||||
void onDragDone(DropDoneDetails details) async {
|
||||
setState(() => dragging = false);
|
||||
for (final xfile in details.files) {
|
||||
|
|
@ -563,6 +568,17 @@ class ChatController extends State<Chat> {
|
|||
.any((cl) => selectedEvents.first.senderId == cl!.userID);
|
||||
}
|
||||
|
||||
void showWidgetsSheet() => [TargetPlatform.iOS, TargetPlatform.macOS]
|
||||
.contains(Theme.of(context).platform)
|
||||
? showCupertinoModalPopup(
|
||||
context: context,
|
||||
builder: (context) => CupertinoWidgetsBottomSheet(room: room!),
|
||||
)
|
||||
: showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (context) => WidgetsBottomSheet(room: room!),
|
||||
);
|
||||
|
||||
void forwardEventsAction() async {
|
||||
if (selectedEvents.length == 1) {
|
||||
Matrix.of(context).shareContent = selectedEvents.first.content;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue