[Flutter] Build web app #2018

Closed
opened 2026-02-21 00:10:57 -05:00 by deekerman · 1 comment
Owner

Originally created by @raminfp on GitHub (Jul 29, 2023).

Bug Description

Hi,

I going to build rustdesk web app, but i have error of dash_chat, how to possible resolve it?

How to Reproduce

git clone https://github.com/JelleBuning/rustdesk.git
cd rustdesk
git switch fix_build
cd flutter/web/js

# Install protoc first, see: https://google.github.io/proto-lens/installing-protoc.html
npm install ts-proto
# Only works with vite <= 2.8, see: https://github.com/vitejs/vite/blob/main/docs/guide/build.md#chunking-strategy
npm install vite@2.8

# Required for yarn build
npm install yarn -g
npm install typescript -g
npm install protoc -g

yarn build

cd ..

# About details of YUV converter, check this https://github.com/rustdesk/rustdesk/issues/364#issuecomment-1023562050
wget https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/web_deps.tar.gz
# Decompress to the current directory
tar xzf web_deps.tar.gz

cd ..

# Good Luck!
flutter run -d chrome

Expected Behavior



# flutter run -d chrome

Launching lib/main.dart on Chrome in debug mode...
../../../../../.pub-cache/hosted/pub.dev/dash_chat-1.1.16/lib/src/message_listview.dart:247:72: Error: The
argument type 'String?' can't be assigned to the parameter type 'String' because 'String?' is nullable and
'String' isn't.
                                                                      .text));
                                                                       ^
../../../../../.pub-cache/hosted/pub.dev/dash_chat-1.1.16/lib/src/widgets/message_container.dart:107:43: Error:
The getter 'accentColor' isn't defined for the class 'ThemeData'.
 - 'ThemeData' is from 'package:flutter/src/material/theme_data.dart'
 ('../../../../../snap/flutter/common/flutter/packages/flutter/lib/src/material/theme_data.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'accentColor'.
                      ? Theme.of(context).accentColor
                                          ^^^^^^^^^^^
../../../../../.pub-cache/hosted/pub.dev/dash_chat-1.1.16/lib/src/widgets/quick_reply.dart:43:60: Error: The
getter 'accentColor' isn't defined for the class 'ThemeData'.
 - 'ThemeData' is from 'package:flutter/src/material/theme_data.dart'
 ('../../../../../snap/flutter/common/flutter/packages/flutter/lib/src/material/theme_data.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'accentColor'.
                      width: 1.0, color: Theme.of(context).accentColor),
                                                           ^^^^^^^^^^^
../../../../../.pub-cache/hosted/pub.dev/dash_chat-1.1.16/lib/src/widgets/quick_reply.dart:51:46: Error: The
getter 'accentColor' isn't defined for the class 'ThemeData'.
 - 'ThemeData' is from 'package:flutter/src/material/theme_data.dart'
 ('../../../../../snap/flutter/common/flutter/packages/flutter/lib/src/material/theme_data.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'accentColor'.
                    color: Theme.of(context).accentColor,
                                             ^^^^^^^^^^^
Waiting for connection from debug service on Chrome...             27.8s
Failed to compile application.

Operating system(s) on local side and remote side

Ubuntu 22.04

RustDesk Version(s) on local side and remote side

1.2.1

Screenshots

Screenshot from 2023-07-29 10-50-12

Additional Context

No response

Originally created by @raminfp on GitHub (Jul 29, 2023). ### Bug Description Hi, I going to build rustdesk web app, but i have error of `dash_chat`, how to possible resolve it? ### How to Reproduce ```bash git clone https://github.com/JelleBuning/rustdesk.git cd rustdesk git switch fix_build cd flutter/web/js # Install protoc first, see: https://google.github.io/proto-lens/installing-protoc.html npm install ts-proto # Only works with vite <= 2.8, see: https://github.com/vitejs/vite/blob/main/docs/guide/build.md#chunking-strategy npm install vite@2.8 # Required for yarn build npm install yarn -g npm install typescript -g npm install protoc -g yarn build cd .. # About details of YUV converter, check this https://github.com/rustdesk/rustdesk/issues/364#issuecomment-1023562050 wget https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/web_deps.tar.gz # Decompress to the current directory tar xzf web_deps.tar.gz cd .. # Good Luck! flutter run -d chrome ``` ### Expected Behavior ```bash # flutter run -d chrome Launching lib/main.dart on Chrome in debug mode... ../../../../../.pub-cache/hosted/pub.dev/dash_chat-1.1.16/lib/src/message_listview.dart:247:72: Error: The argument type 'String?' can't be assigned to the parameter type 'String' because 'String?' is nullable and 'String' isn't. .text)); ^ ../../../../../.pub-cache/hosted/pub.dev/dash_chat-1.1.16/lib/src/widgets/message_container.dart:107:43: Error: The getter 'accentColor' isn't defined for the class 'ThemeData'. - 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../../../../snap/flutter/common/flutter/packages/flutter/lib/src/material/theme_data.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'accentColor'. ? Theme.of(context).accentColor ^^^^^^^^^^^ ../../../../../.pub-cache/hosted/pub.dev/dash_chat-1.1.16/lib/src/widgets/quick_reply.dart:43:60: Error: The getter 'accentColor' isn't defined for the class 'ThemeData'. - 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../../../../snap/flutter/common/flutter/packages/flutter/lib/src/material/theme_data.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'accentColor'. width: 1.0, color: Theme.of(context).accentColor), ^^^^^^^^^^^ ../../../../../.pub-cache/hosted/pub.dev/dash_chat-1.1.16/lib/src/widgets/quick_reply.dart:51:46: Error: The getter 'accentColor' isn't defined for the class 'ThemeData'. - 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../../../../snap/flutter/common/flutter/packages/flutter/lib/src/material/theme_data.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'accentColor'. color: Theme.of(context).accentColor, ^^^^^^^^^^^ Waiting for connection from debug service on Chrome... 27.8s Failed to compile application. ``` ### Operating system(s) on local side and remote side Ubuntu 22.04 ### RustDesk Version(s) on local side and remote side 1.2.1 ### Screenshots ![Screenshot from 2023-07-29 10-50-12](https://github.com/rustdesk/rustdesk/assets/10054759/47441645-5682-42eb-a370-37713f1e3bfc) ### Additional Context _No response_
deekerman 2026-02-21 00:10:57 -05:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@rustdesk commented on GitHub (Jul 29, 2023):

#763

@rustdesk commented on GitHub (Jul 29, 2023): #763
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rustdesk-rustdesk#2018
No description provided.