Is it possible to build a system-wide custom keyboard for IOS and ANDROID in Flutter?

3,802

Solution 1

Sorry, there is no way to do that in Flutter. Flutter is a UI-framework and doesn't extend to OS level changes like the system keyboard. But you can do it natively for Android with Kotlin or Java (iOS not included -- the system does not support OS model's change).

Solution 2

I don't think you can build a system-wide keyboard in Flutter since it is a UI framework. I believe you can build one with the respected operating system's development language (Java for Android, Koltin as well - Swift for iOS devices) as it requires certain permissions to actually function as a system-wide keyboard.

You could use Flutter to build the UI itself, but not the whole keyboard. The rest of the keyboard will need to be either Java or Koltin for Android or Swift for iOS.

Lastly, if you just want a keyboard inside your application, you could build it with Flutter and use your app's language to control the input.

If you want to make a global keyboard, I recommend this guide: https://www.androidauthority.com/lets-build-custom-keyboard-android-832362/

If you want to use Flutter for the UI, I would replace the parts of this guide that utilize it's UI and replace it with Flutter.

I wish you luck in your adventures and if you do make a good keyboard, please give me a download link because GBoard is driving me crazy.

Share:
3,802
user3171488
Author by

user3171488

Updated on December 02, 2022

Comments

  • user3171488
    user3171488 over 1 year

    I'm looking to build a custom keyboard that works with all apps. Custom keyboards are now commonplace. I'm wondering if you are able to build a keyboard in Flutter that would work and be accepted by Apple to work inside other apps.

  • Jon Scalet
    Jon Scalet over 3 years
    OP is asking about how to build a system wide keyboard in Flutter.
  • Estus Flask
    Estus Flask over 3 years
    iOS allows for custom system-wide keyboard, developer.apple.com/documentation/uikit/keyboards_and_input/‌​… . Even if custom keyboard needs to be a native project, this doesn't necessarily mean that it couldn't host Flutter module to handle UI and business logic.
  • WillEridian
    WillEridian over 3 years
    In that case yes, you could build one with iOS. I was getting at where Flutter couldn't singlehandedly use the keyboard - it can handle the UI but not the actual keyboard input and such. I'll update my answer.