added option to choose more emoji reactions #55
@ -45,7 +45,7 @@ android {
|
|||||||
applicationId "eu.mhsl.marianum.mobile.client"
|
applicationId "eu.mhsl.marianum.mobile.client"
|
||||||
// You can update the following values to match your application needs.
|
// You can update the following values to match your application needs.
|
||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion 19
|
minSdkVersion 21
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
|
@ -20,7 +20,7 @@ pluginManagement {
|
|||||||
plugins {
|
plugins {
|
||||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||||
id "com.android.application" version "7.3.0" apply false
|
id "com.android.application" version "7.3.0" apply false
|
||||||
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
|
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
include ":app"
|
include ":app"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import 'package:better_open_file/better_open_file.dart';
|
import 'package:better_open_file/better_open_file.dart';
|
||||||
import 'package:bubble/bubble.dart';
|
import 'package:bubble/bubble.dart';
|
||||||
|
import 'package:emoji_picker_flutter/emoji_picker_flutter.dart' as emojis;
|
||||||
import 'package:flowder/flowder.dart';
|
import 'package:flowder/flowder.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -49,6 +50,7 @@ class ChatBubble extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _ChatBubbleState extends State<ChatBubble> {
|
class _ChatBubbleState extends State<ChatBubble> {
|
||||||
|
|
||||||
BubbleStyle getSystemStyle() {
|
BubbleStyle getSystemStyle() {
|
||||||
return BubbleStyle(
|
return BubbleStyle(
|
||||||
color: AppTheme.isDarkMode(context) ? const Color(0xff182229) : Colors.white,
|
color: AppTheme.isDarkMode(context) ? const Color(0xff182229) : Colors.white,
|
||||||
@ -184,7 +186,7 @@ class _ChatBubbleState extends State<ChatBubble> {
|
|||||||
),
|
),
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
showDialog(context: context, builder: (context) {
|
showDialog(context: context, builder: (context) {
|
||||||
List<String> commonReactions = ['👍', '👎', '😆', '❤️', '👀', '🤔'];
|
List<String> commonReactions = ['👍', '👎', '😆', '❤️', '👀'];
|
||||||
bool canReact = widget.bubbleData.messageType == GetRoomResponseObjectMessageType.comment;
|
bool canReact = widget.bubbleData.messageType == GetRoomResponseObjectMessageType.comment;
|
||||||
return SimpleDialog(
|
return SimpleDialog(
|
||||||
children: [
|
children: [
|
||||||
@ -210,18 +212,92 @@ class _ChatBubbleState extends State<ChatBubble> {
|
|||||||
params: ReactMessageParams(e),
|
params: ReactMessageParams(e),
|
||||||
).run().then((value) => widget.refetch(renew: true));
|
).run().then((value) => widget.refetch(renew: true));
|
||||||
},
|
},
|
||||||
child: Text(e)),
|
child: Text(e),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
showDialog(context: context, builder: (context) {
|
||||||
|
return AlertDialog(
|
||||||
|
contentPadding: const EdgeInsets.all(15),
|
||||||
|
titlePadding: const EdgeInsets.only(left: 6, top: 15),
|
||||||
|
title: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.arrow_back),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
const Text('Reagieren'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
content: SizedBox(
|
||||||
|
width: 256,
|
||||||
|
height: 270,
|
||||||
|
child: Column(
|
||||||
Pupsi marked this conversation as resolved
|
|||||||
|
children: [
|
||||||
|
emojis.EmojiPicker(
|
||||||
|
config: emojis.Config(
|
||||||
|
height: 256,
|
||||||
|
swapCategoryAndBottomBar: true,
|
||||||
|
emojiViewConfig: emojis.EmojiViewConfig(
|
||||||
|
backgroundColor: Theme.of(context).canvasColor,
|
||||||
|
recentsLimit: 67,
|
||||||
|
emojiSizeMax: 25,
|
||||||
|
noRecents: const Text('Keine zuletzt verwendeten Emojis'),
|
||||||
|
columns: 7,
|
||||||
|
),
|
||||||
|
bottomActionBarConfig: const emojis.BottomActionBarConfig(
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
categoryViewConfig: emojis.CategoryViewConfig(
|
||||||
|
backgroundColor: Theme.of(context).hoverColor,
|
||||||
|
iconColorSelected: Theme.of(context).primaryColor,
|
||||||
|
indicatorColor: Theme.of(context).primaryColor,
|
||||||
|
),
|
||||||
|
searchViewConfig: emojis.SearchViewConfig(
|
||||||
|
backgroundColor: Theme.of(context).dividerColor,
|
||||||
|
buttonColor: Theme.of(context).dividerColor,
|
||||||
|
hintText: 'Suchen',
|
||||||
|
buttonIconColor: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onEmojiSelected: (emojis.Category? category, emojis.Emoji emoji) {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
ReactMessage(
|
||||||
|
chatToken: widget.chatData.token,
|
||||||
|
messageId: widget.bubbleData.id,
|
||||||
|
params: ReactMessageParams(emoji.emoji),
|
||||||
|
).run().then((value) => widget.refetch(renew: true));
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
style: IconButton.styleFrom(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
|
minimumSize: const Size(40, 40),
|
||||||
|
),
|
||||||
|
icon: const Icon(Icons.add_circle_outline_outlined),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: canReact,
|
visible: canReact,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: const Icon(Icons.add_reaction_outlined),
|
leading: const Icon(Icons.emoji_emotions_outlined),
|
||||||
title: const Text('Reaktionen'),
|
title: const Text('Reaktionen'),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).push(MaterialPageRoute(builder: (context) => MessageReactions(
|
Navigator.of(context).push(MaterialPageRoute(builder: (context) => MessageReactions(
|
||||||
|
@ -97,6 +97,7 @@ dependencies:
|
|||||||
rrule: ^0.2.16
|
rrule: ^0.2.16
|
||||||
time_range_picker: ^2.2.0
|
time_range_picker: ^2.2.0
|
||||||
in_app_review: ^2.0.8
|
in_app_review: ^2.0.8
|
||||||
|
emoji_picker_flutter: ^2.1.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user
wofür existiert diese column?