Fintasys / emoji_picker_flutter

A Flutter package that provides an Emoji picker widget with 1500+ emojis in 8 categories.
MIT License
170 stars 127 forks source link

web support and windows #102

Closed hatemragab closed 2 years ago

hatemragab commented 2 years ago

hope this project and support other plaforms web support and windows

Fintasys commented 2 years ago

Web support is troublesome since Flutter is not addressing necessary issue for Emoji's on Web. But with recent changes on Master-Branch it might work by using custom font, I just didn't find time yet to give it another try. Feel free to give it a try and let me know. For Windows (and Linux) I will try to add support soon if Emoji's work fine on those platforms

csandovalgt commented 2 years ago

hi @Fintasys , could you please explain what is the issue with the web version? Im really interested in using emoji picker in web

Fintasys commented 2 years ago

@csandovalgt I mentioned the open issues in my PR. But I think those issues could be solved now with the custom-font support that we recently merged into Master - There is also an example.

Zeroupper commented 2 years ago

I am also very interested in using this package for web, I hope I can use it in near future :)

hatemragab commented 2 years ago

Plugs working on windows 👏

Fintasys commented 2 years ago

For Web support please see my recent comment here https://github.com/Fintasys/emoji_picker_flutter/issues/2 For Windows I tried to compile but I'm facing some issues. Need a bit more time 🙏

hatemragab commented 2 years ago

For Web support please see my recent comment here #2 For Windows I tried to compile but I'm facing some issues. Need a bit more time 🙏

I just use your new branch for web 2 and not working in the web

Fintasys commented 2 years ago

@hatemragab Can you specify what exactly is not working?

hatemragab commented 2 years ago

@Fintasys

The following UnsupportedError was thrown building EmojiKeyboard(dirty):
Unsupported operation: Platform._operatingSystem

The relevant error-causing widget was: 
  EmojiKeyboard EmojiKeyboard:file:///Users/hatemragap/flutter_projects/weellu_org/weellu_chat_mobile/apps/mobile/lib/app/modules/message_modules/message/features/message_input/message_input_widget.dart:123:17
When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49                                  throw_
dart-sdk/lib/_internal/js_dev_runtime/patch/io_patch.dart 244:5                                               _operatingSystem
dart-sdk/lib/io/platform_impl.dart 56:40                                                                      get operatingSystem
dart-sdk/lib/io/platform.dart 64:45                                                                           get _operatingSystem
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 839:8                               get
dart-sdk/lib/io/platform.dart 153:47                                                                          get isIOS
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 839:8                               get
packages/mobile/app/modules/message_modules/message/features/message_input/widgets/emoji_keyborad.dart 32:42  build
packages/flutter/src/widgets/framework.dart 4949:22                                                           build
packages/flutter/src/widgets/framework.dart 4878:15                                                           performRebuild
packages/flutter/src/widgets/framework.dart 4604:5                                                            rebuild
packages/flutter/src/widgets/framework.dart 4956:5                                                            update
packages/flutter/src/widgets/framework.dart 3570:14                                                           updateChild
packages/flutter/src/widgets/framework.dart 5904:32                                                           updateChildren
packages/flutter/src/widgets/framework.dart 6460:17                                                           update
packages/flutter/src/widgets/framework.dart 3570:14                                                           updateChild
packages/flutter/src/widgets/framework.dart 4904:16                                                           performRebuild
packages/flutter/src/widgets/framework.dart 5050:11                                                           performRebuild
packages/flutter/src/widgets/framework.dart 4604:5                                                            rebuild
packages/flutter/src/widgets/framework.dart 2667:18                                                           buildScope
packages/flutter/src/widgets/binding.dart 882:9                                                               drawFrame
packages/flutter/src/rendering/binding.dart 378:5                                                             [_handlePersistentFrameCallback]
packages/flutter/src/scheduler/binding.dart 1175:15                                                           [_invokeFrameCallback]
packages/flutter/src/scheduler/binding.dart 1104:9                                                            handleDrawFrame
packages/flutter/src/scheduler/binding.dart 1015:5                                                            [_handleDrawFrame]
lib/_engine/engine/platform_dispatcher.dart 1168:13                                                           invoke
lib/_engine/engine/platform_dispatcher.dart 219:5                                                             invokeOnDrawFrame
lib/_engine/engine/initialization.dart 195:45                                                                 <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 334:14                              _checkAndCall
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 339:39                              dcall
====================================================================================================
Fintasys commented 2 years ago

@hatemragab I think you need to change this line in your config

emojiSizeMax: 32 * (Platform.isIOS ? 1.30 : 1.0),

to

import 'package:flutter/foundation.dart' as foundation;
emojiSizeMax: 32 * (!foundation.kIsWeb && Platform.isIOS ? 1.30 : 1.0),
hatemragab commented 2 years ago

Yes if fixed thanks