talkjs / talkjs-flutter

Flutter SDK for the TalkJS Chat API
https://talkjs.com
BSD 3-Clause "New" or "Revised" License
9 stars 14 forks source link

Need customising webview color and keyboard color #24

Closed Veronika-dev closed 1 year ago

Veronika-dev commented 1 year ago

Hello talkjs team!

I am working on an application and I have faced to some problems: 1) On screen loading or when I am scrolling the view up or down, I can see white background. I think it is webview background and I found some possible solutions here and here.
2) My application is in dark mode but I can't open a keyboard in ChatBox using necessary styles. Global setting in themeData brightness: Brightness.dark doesn't help with the situation. I need to be able to change keyboard color to Brightness.dark.

Could you please help me and fix it as soon as possible?

Here is a video of the problem. https://user-images.githubusercontent.com/24383434/214597541-e6ec7b2c-3850-453b-8b9c-33df5c3f1143.mp4

And part of my code (build):

  Widget build(BuildContext context) {
    final themeData = Theme.of(context);
    return Scaffold(
      appBar: AppBar(
        // title: Text(conversation?.subject ?? ''),
      ),
      body: Container(
        padding: const EdgeInsets.only(bottom: 20),
        color: themeData.scaffoldBackgroundColor,
        child: FutureBuilder(
          future: getChatBasicInfo(),
          builder: (_, snapshot) {
            if (!snapshot.hasData || session == null) {
              return Container();
            }
            return LayoutBuilder(
              builder: (BuildContext context, BoxConstraints constraints) => Column(
                children: <Widget>[
                  Visibility(
                    visible: !_chatBoxLoaded,
                    child: SizedBox(
                      width: min(constraints.maxWidth, constraints.maxHeight),
                      height: min(constraints.maxWidth, constraints.maxHeight),
                      child: Center(
                        child: SizedBox(
                          width: 16,
                          height: 16,
                          child: CircularProgressIndicator(
                            color: themeData.primaryColor,
                            strokeWidth: 2,
                          ),
                        ),
                      ),
                    ),
                  ),
                  Visibility(
                    maintainState: true,
                    visible: _chatBoxLoaded,
                    child: ConstrainedBox(
                      constraints: constraints,
                      child: ChatBox(
                        session: session!,
                        conversation: conversation,
                        theme: 'dark_theme',
                        onLoadingStateChanged: (state) {
                          setState(() {
                            _chatBoxLoaded = state == LoadingState.loaded;
                          });
                        },
                        messageField: const MessageFieldOptions(
                          enterSendsMessage: true,
                        ),
                        showChatHeader: false,
                      ),
                    ),
                  ),
                ],
              ),
            );
          },
        ),
      ),
    );
  }
Veronika-dev commented 1 year ago

Hey, any updates?

bugnano commented 1 year ago

Hi, At the moment we're transitioning to a new WebView implementation, which will have a transparent background, and a colleague of mine is testing the dark theme keyboard issue. We'll keep you updated when the new release with all the fixes will be released.

Veronika-dev commented 1 year ago

Hi, Thank you! I'm looking forward to getting news

bugnano commented 1 year ago

Hi, We released version 0.7.0 of our Flutter SDK, please test it and let me know if it fixes these problems.

Veronika-dev commented 1 year ago

@bugnano Hi, There is a transparent background, thank you. However the problem with light keyboard is still here.

Also you can see from the attached video that content doesn't scroll to the last message.

https://user-images.githubusercontent.com/24383434/218121814-ef661879-2736-43f5-ab05-0d0bb62ce335.mp4

Veronika-dev commented 1 year ago

Hi, any updates?

bugnano commented 1 year ago

Hi, sorry for the late reply. The team is currently busy working on urgent uptime and stability improvements, so all other features and fixes are not being worked on at the moment. This issue is still on our backlog, and we will get back to it once the situation stabilizes.

vickz84259 commented 1 year ago

We have upgraded the underlying webview to fix the keyboard color issue. The release will happen shortly.