Revert "Refact/flutter 3.24.4 (#9870)" (#9871)

This reverts commit 5eb2c31207.
This commit is contained in:
RustDesk 2024-11-09 23:32:18 +08:00 committed by GitHub
parent 5eb2c31207
commit 912f5265f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 122 additions and 153 deletions

View File

@ -6,7 +6,7 @@ on:
workflow_call: workflow_call:
env: env:
FLUTTER_VERSION: "3.22.3" FLUTTER_VERSION: "3.19.6"
FLUTTER_RUST_BRIDGE_VERSION: "1.80.1" FLUTTER_RUST_BRIDGE_VERSION: "1.80.1"
RUST_VERSION: "1.75" # https://github.com/rustdesk/rustdesk/discussions/7503 RUST_VERSION: "1.75" # https://github.com/rustdesk/rustdesk/discussions/7503
@ -22,18 +22,11 @@ jobs:
os: ubuntu-20.04, os: ubuntu-20.04,
extra-build-args: "", extra-build-args: "",
} }
- {
target: aarch64-apple-darwin,
os: macos-latest,
arch: aarch64,
extra-build-args: "",
}
steps: steps:
- name: Checkout source code - name: Checkout source code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install prerequisites - name: Install prerequisites
if: matrix.job.os == 'ubuntu-20.04'
run: | run: |
sudo apt-get install ca-certificates -y sudo apt-get install ca-certificates -y
sudo apt-get update -y sudo apt-get update -y
@ -81,22 +74,13 @@ jobs:
shell: bash shell: bash
run: | run: |
cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid" cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid"
pushd flutter && sed -i -e 's/extended_text: 14.0.0/extended_text: 13.0.0/g' pubspec.yaml && flutter pub get && popd pushd flutter && flutter pub get && popd
- name: Run flutter rust bridge - name: Run flutter rust bridge
run: | run: |
case ${{ matrix.job.os }} in ~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart
ubuntu-20.04)
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart
;;
macos-latest)
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/macos/Runner/bridge_generated.h
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/ios/Runner/bridge_generated.h
;;
esac
- name: Upload Artifact(ubuntu) - name: Upload Artifact
if: matrix.job.os == 'ubuntu-20.04'
uses: actions/upload-artifact@master uses: actions/upload-artifact@master
with: with:
name: bridge-artifact name: bridge-artifact
@ -105,16 +89,3 @@ jobs:
./src/bridge_generated.io.rs ./src/bridge_generated.io.rs
./flutter/lib/generated_bridge.dart ./flutter/lib/generated_bridge.dart
./flutter/lib/generated_bridge.freezed.dart ./flutter/lib/generated_bridge.freezed.dart
- name: Upload Artifact(macos)
if: matrix.job.os == 'macos-latest'
uses: actions/upload-artifact@master
with:
name: bridge-artifact-macos
path: |
./src/bridge_generated.rs
./src/bridge_generated.io.rs
./flutter/lib/generated_bridge.dart
./flutter/lib/generated_bridge.freezed.dart
./flutter/macos/Runner/bridge_generated.h
./flutter/ios/Runner/bridge_generated.h

View File

@ -24,8 +24,9 @@ env:
SCITER_ARMV7_CMAKE_VERSION: "3.29.7" SCITER_ARMV7_CMAKE_VERSION: "3.29.7"
SCITER_NASM_DEBVERSION: "2.14-1" SCITER_NASM_DEBVERSION: "2.14-1"
LLVM_VERSION: "15.0.6" LLVM_VERSION: "15.0.6"
FLUTTER_VERSION: "3.24.4" FLUTTER_VERSION: "3.19.6"
ANDROID_FLUTTER_VERSION: "3.24.4" ANDROID_FLUTTER_VERSION: "3.13.9" # >= 3.16 is very slow on my android phone, but work well on most of others. We may switch to new flutter after changing to texture rendering (I believe it can solve my problem).
FLUTTER_RUST_BRIDGE_VERSION: "1.80.1"
# for arm64 linux because official Dart SDK does not work # for arm64 linux because official Dart SDK does not work
FLUTTER_ELINUX_VERSION: "3.16.9" FLUTTER_ELINUX_VERSION: "3.16.9"
TAG_NAME: "${{ inputs.upload-tag }}" TAG_NAME: "${{ inputs.upload-tag }}"
@ -45,9 +46,6 @@ env:
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}" SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
jobs: jobs:
generate-bridge:
uses: ./.github/workflows/bridge.yml
build-RustDeskTempTopMostWindow: build-RustDeskTempTopMostWindow:
uses: ./.github/workflows/third-party-RustDeskTempTopMostWindow.yml uses: ./.github/workflows/third-party-RustDeskTempTopMostWindow.yml
with: with:
@ -61,7 +59,7 @@ jobs:
build-for-windows-flutter: build-for-windows-flutter:
name: ${{ matrix.job.target }} name: ${{ matrix.job.target }}
needs: [build-RustDeskTempTopMostWindow, generate-bridge] needs: [build-RustDeskTempTopMostWindow]
runs-on: ${{ matrix.job.os }} runs-on: ${{ matrix.job.os }}
strategy: strategy:
fail-fast: false fail-fast: false
@ -87,12 +85,6 @@ jobs:
- name: Checkout source code - name: Checkout source code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Restore bridge files
uses: actions/download-artifact@master
with:
name: bridge-artifact
path: ./
- name: Install LLVM and Clang - name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1 uses: KyleMayes/install-llvm-action@v1
with: with:
@ -105,15 +97,6 @@ jobs:
flutter-version: ${{ env.FLUTTER_VERSION }} flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true cache: true
# https://github.com/flutter/flutter/issues/155685
- name: Replace engine with rustdesk custom flutter engine
run: |
flutter doctor -v
flutter precache --windows
Invoke-WebRequest -Uri https://github.com/rustdesk/engine/releases/download/main/windows-x64-release.zip -OutFile windows-x64-release.zip
Expand-Archive -Path windows-x64-release.zip -DestinationPath windows-x64-release
mv -Force windows-x64-release/*  C:/hostedtoolcache/windows/flutter/stable-${{ env.FLUTTER_VERSION }}-x64/bin/cache/artifacts/engine/windows-x64-release/
- name: Install Rust toolchain - name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1 uses: dtolnay/rust-toolchain@v1
with: with:
@ -125,6 +108,13 @@ jobs:
with: with:
prefix-key: ${{ matrix.job.os }} prefix-key: ${{ matrix.job.os }}
- name: Install flutter rust bridge deps
run: |
git config --global core.longpaths true
cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid"
Push-Location flutter ; flutter pub get ; Pop-Location
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart
- name: Setup vcpkg with Github Actions binary cache - name: Setup vcpkg with Github Actions binary cache
uses: lukka/run-vcpkg@v11 uses: lukka/run-vcpkg@v11
with: with:
@ -384,7 +374,6 @@ jobs:
# use build-for-macOS instead # use build-for-macOS instead
if: false if: false
runs-on: [self-hosted, macOS, ARM64] runs-on: [self-hosted, macOS, ARM64]
needs: [generate-bridge]
steps: steps:
- name: Export GitHub Actions cache environment variables - name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6 uses: actions/github-script@v6
@ -396,11 +385,12 @@ jobs:
- name: Checkout source code - name: Checkout source code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Restore bridge files - name: Install flutter rust bridge deps
uses: actions/download-artifact@master shell: bash
with: run: |
name: bridge-artifact-macos cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid"
path: ./ pushd flutter && flutter pub get && popd
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/macos/Runner/bridge_generated.h
- name: Build rustdesk - name: Build rustdesk
run: | run: |
@ -456,7 +446,6 @@ jobs:
if: ${{ inputs.upload-artifact }} if: ${{ inputs.upload-artifact }}
name: build rustdesk ios ipa name: build rustdesk ios ipa
runs-on: ${{ matrix.job.os }} runs-on: ${{ matrix.job.os }}
needs: [generate-bridge]
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -521,11 +510,12 @@ jobs:
prefix-key: rustdesk-lib-cache-ios prefix-key: rustdesk-lib-cache-ios
key: ${{ matrix.job.target }} key: ${{ matrix.job.target }}
- name: Restore bridge files - name: Install flutter rust bridge deps
uses: actions/download-artifact@master shell: bash
with: run: |
name: bridge-artifact-macos cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid"
path: ./ pushd flutter && flutter pub get && popd
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/ios/Runner/bridge_generated.h
- name: Build rustdesk lib - name: Build rustdesk lib
run: | run: |
@ -560,7 +550,6 @@ jobs:
#if: ${{ inputs.upload-artifact }} #if: ${{ inputs.upload-artifact }}
if: false if: false
runs-on: [self-hosted, macOS, ARM64] runs-on: [self-hosted, macOS, ARM64]
needs: [generate-bridge]
strategy: strategy:
fail-fast: false fail-fast: false
steps: steps:
@ -576,11 +565,12 @@ jobs:
# $VCPKG_ROOT/vcpkg install --triplet arm64-ios --x-install-root="$VCPKG_ROOT/installed" # $VCPKG_ROOT/vcpkg install --triplet arm64-ios --x-install-root="$VCPKG_ROOT/installed"
- name: Restore bridge files - name: Install flutter rust bridge deps
uses: actions/download-artifact@master shell: bash
with: run: |
name: bridge-artifact-macos cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid"
path: ./ pushd flutter && flutter pub get && popd
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/ios/Runner/bridge_generated.h
- name: Build rustdesk lib - name: Build rustdesk lib
run: | run: |
@ -615,7 +605,6 @@ jobs:
build-for-macOS: build-for-macOS:
name: ${{ matrix.job.target }} name: ${{ matrix.job.target }}
runs-on: ${{ matrix.job.os }} runs-on: ${{ matrix.job.os }}
needs: [generate-bridge]
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -706,11 +695,12 @@ jobs:
with: with:
prefix-key: ${{ matrix.job.os }} prefix-key: ${{ matrix.job.os }}
- name: Restore bridge files - name: Install flutter rust bridge deps
uses: actions/download-artifact@master shell: bash
with: run: |
name: bridge-artifact-macos cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid"
path: ./ pushd flutter && flutter pub get && popd
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/macos/Runner/bridge_generated.h
- name: Setup vcpkg with Github Actions binary cache - name: Setup vcpkg with Github Actions binary cache
uses: lukka/run-vcpkg@v11 uses: lukka/run-vcpkg@v11
@ -832,8 +822,11 @@ jobs:
tag_name: ${{ env.TAG_NAME }} tag_name: ${{ env.TAG_NAME }}
files: rustdesk-${{ env.VERSION }}-unsigned.tar.gz files: rustdesk-${{ env.VERSION }}-unsigned.tar.gz
generate-bridge-linux:
uses: ./.github/workflows/bridge.yml
build-rustdesk-android: build-rustdesk-android:
needs: [generate-bridge] needs: [generate-bridge-linux]
name: build rustdesk android apk ${{ matrix.job.target }} name: build rustdesk android apk ${{ matrix.job.target }}
runs-on: ${{ matrix.job.os }} runs-on: ${{ matrix.job.os }}
strategy: strategy:
@ -910,7 +903,7 @@ jobs:
llvm-10-dev \ llvm-10-dev \
nasm \ nasm \
ninja-build \ ninja-build \
openjdk-17-jdk-headless \ openjdk-11-jdk-headless \
pkg-config \ pkg-config \
tree \ tree \
wget wget
@ -981,7 +974,7 @@ jobs:
key: ${{ matrix.job.target }} key: ${{ matrix.job.target }}
- name: fix android for flutter 3.13 - name: fix android for flutter 3.13
if: ${{ env.ANDROID_FLUTTER_VERSION == '3.13.9' }} if: $${{ env.ANDROID_FLUTTER_VERSION == '3.13.9' }}
run: | run: |
cd flutter cd flutter
sed -i 's/uni_links_desktop/#uni_links_desktop/g' pubspec.yaml sed -i 's/uni_links_desktop/#uni_links_desktop/g' pubspec.yaml
@ -1029,9 +1022,9 @@ jobs:
- name: Build rustdesk - name: Build rustdesk
shell: bash shell: bash
env: env:
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64
run: | run: |
export PATH=/usr/lib/jvm/java-17-openjdk-amd64/bin:$PATH export PATH=/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH
# temporary use debug sign config # temporary use debug sign config
sed -i "s/signingConfigs.release/signingConfigs.debug/g" ./flutter/android/app/build.gradle sed -i "s/signingConfigs.release/signingConfigs.debug/g" ./flutter/android/app/build.gradle
case ${{ matrix.job.target }} in case ${{ matrix.job.target }} in
@ -1173,7 +1166,7 @@ jobs:
llvm-10-dev \ llvm-10-dev \
nasm \ nasm \
ninja-build \ ninja-build \
openjdk-17-jdk-headless \ openjdk-11-jdk-headless \
pkg-config \ pkg-config \
tree \ tree \
wget wget
@ -1218,7 +1211,7 @@ jobs:
path: ./flutter/android/app/src/main/jniLibs/x86 path: ./flutter/android/app/src/main/jniLibs/x86
- name: fix android for flutter 3.13 - name: fix android for flutter 3.13
if: ${{ env.ANDROID_FLUTTER_VERSION == '3.13.9' }} if: $${{ env.ANDROID_FLUTTER_VERSION == '3.13.9' }}
run: | run: |
cd flutter cd flutter
sed -i 's/uni_links_desktop/#uni_links_desktop/g' pubspec.yaml sed -i 's/uni_links_desktop/#uni_links_desktop/g' pubspec.yaml
@ -1230,9 +1223,9 @@ jobs:
- name: Build rustdesk - name: Build rustdesk
shell: bash shell: bash
env: env:
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64
run: | run: |
export PATH=/usr/lib/jvm/java-17-openjdk-amd64/bin:$PATH export PATH=/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH
# temporary use debug sign config # temporary use debug sign config
sed -i "s/signingConfigs.release/signingConfigs.debug/g" ./flutter/android/app/build.gradle sed -i "s/signingConfigs.release/signingConfigs.debug/g" ./flutter/android/app/build.gradle
mv ./flutter/android/app/src/main/jniLibs/arm64-v8a/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/librustdesk.so mv ./flutter/android/app/src/main/jniLibs/arm64-v8a/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/librustdesk.so
@ -1292,7 +1285,7 @@ jobs:
signed-apk/rustdesk-${{ env.VERSION }}-universal${{ env.suffix }}.apk signed-apk/rustdesk-${{ env.VERSION }}-universal${{ env.suffix }}.apk
build-rustdesk-linux: build-rustdesk-linux:
needs: [generate-bridge] needs: [generate-bridge-linux]
name: build rustdesk linux ${{ matrix.job.target }} name: build rustdesk linux ${{ matrix.job.target }}
runs-on: ${{ matrix.job.on }} runs-on: ${{ matrix.job.on }}
strategy: strategy:

View File

@ -1,9 +1,6 @@
import com.google.protobuf.gradle.* import com.google.protobuf.gradle.*
plugins { plugins {
id "com.google.protobuf" version "0.9.4" id "com.google.protobuf" version "0.9.4"
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
} }
def keystoreProperties = new Properties() def keystoreProperties = new Properties()
@ -20,6 +17,11 @@ if (localPropertiesFile.exists()) {
} }
} }
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) { if (flutterVersionCode == null) {
flutterVersionCode = '1' flutterVersionCode = '1'
@ -30,6 +32,10 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0' flutterVersionName = '1.0'
} }
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
dependencies { dependencies {
implementation 'com.google.protobuf:protobuf-javalite:3.20.1' implementation 'com.google.protobuf:protobuf-javalite:3.20.1'
} }
@ -51,7 +57,7 @@ protobuf {
} }
android { android {
compileSdkVersion 34 compileSdkVersion 33
sourceSets { sourceSets {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'
@ -99,6 +105,7 @@ flutter {
dependencies { dependencies {
implementation "androidx.media:media:1.6.0" implementation "androidx.media:media:1.6.0"
implementation 'com.github.getActivity:XXPermissions:18.5' implementation 'com.github.getActivity:XXPermissions:18.5'
implementation("org.jetbrains.kotlin:kotlin-stdlib") { version { strictly("1.9.10") } } implementation("org.jetbrains.kotlin:kotlin-stdlib") { version { strictly("$kotlin_version") } }
implementation 'com.caverock:androidsvg-aar:1.4' implementation 'com.caverock:androidsvg-aar:1.4'
} }

View File

@ -1,3 +1,18 @@
buildscript {
ext.kotlin_version = '1.9.10'
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.14'
}
}
allprojects { allprojects {
repositories { repositories {
google() google()
@ -9,8 +24,6 @@ allprojects {
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

View File

@ -1,25 +1,11 @@
pluginManagement { include ':app'
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
repositories { assert localPropertiesFile.exists()
google() localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
mavenCentral()
gradlePluginPortal()
}
}
plugins { def flutterSdkPath = properties.getProperty("flutter.sdk")
id "dev.flutter.flutter-plugin-loader" version "1.0.0" assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
id "com.android.application" version "7.3.0" apply false apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
}
include ":app"

View File

@ -203,8 +203,6 @@ class _ConnectionPageState extends State<ConnectionPage>
bool isPeersLoading = false; bool isPeersLoading = false;
bool isPeersLoaded = false; bool isPeersLoaded = false;
// https://github.com/flutter/flutter/issues/157244
Iterable<Peer> _autocompleteOpts = [];
@override @override
void initState() { void initState() {
@ -332,7 +330,7 @@ class _ConnectionPageState extends State<ConnectionPage>
child: Autocomplete<Peer>( child: Autocomplete<Peer>(
optionsBuilder: (TextEditingValue textEditingValue) { optionsBuilder: (TextEditingValue textEditingValue) {
if (textEditingValue.text == '') { if (textEditingValue.text == '') {
_autocompleteOpts = const Iterable<Peer>.empty(); return const Iterable<Peer>.empty();
} else if (peers.isEmpty && !isPeersLoaded) { } else if (peers.isEmpty && !isPeersLoaded) {
Peer emptyPeer = Peer( Peer emptyPeer = Peer(
id: '', id: '',
@ -348,7 +346,7 @@ class _ConnectionPageState extends State<ConnectionPage>
rdpUsername: '', rdpUsername: '',
loginName: '', loginName: '',
); );
_autocompleteOpts = [emptyPeer]; return [emptyPeer];
} else { } else {
String textWithoutSpaces = String textWithoutSpaces =
textEditingValue.text.replaceAll(" ", ""); textEditingValue.text.replaceAll(" ", "");
@ -359,7 +357,8 @@ class _ConnectionPageState extends State<ConnectionPage>
); );
} }
String textToFind = textEditingValue.text.toLowerCase(); String textToFind = textEditingValue.text.toLowerCase();
_autocompleteOpts = peers
return peers
.where((peer) => .where((peer) =>
peer.id.toLowerCase().contains(textToFind) || peer.id.toLowerCase().contains(textToFind) ||
peer.username peer.username
@ -371,7 +370,6 @@ class _ConnectionPageState extends State<ConnectionPage>
peer.alias.toLowerCase().contains(textToFind)) peer.alias.toLowerCase().contains(textToFind))
.toList(); .toList();
} }
return _autocompleteOpts;
}, },
fieldViewBuilder: ( fieldViewBuilder: (
BuildContext context, BuildContext context,
@ -432,7 +430,6 @@ class _ConnectionPageState extends State<ConnectionPage>
optionsViewBuilder: (BuildContext context, optionsViewBuilder: (BuildContext context,
AutocompleteOnSelected<Peer> onSelected, AutocompleteOnSelected<Peer> onSelected,
Iterable<Peer> options) { Iterable<Peer> options) {
options = _autocompleteOpts;
double maxHeight = options.length * 50; double maxHeight = options.length * 50;
if (options.length == 1) { if (options.length == 1) {
maxHeight = 52; maxHeight = 52;

View File

@ -37,10 +37,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: archive name: archive
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.6.1" version: "3.4.10"
args: args:
dependency: transitive dependency: transitive
description: description:
@ -384,10 +384,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: extended_text name: extended_text
sha256: "38c1cac571d6eaf406f4b80040c1f88561e7617ad90795aac6a1be0a8d0bb676" sha256: "7f382de3af12992e34bd72ddd36becf90c4720900af126cb9859f0189af71ffe"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "14.0.0" version: "13.0.0"
extended_text_library: extended_text_library:
dependency: transitive dependency: transitive
description: description:
@ -408,10 +408,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: ffi name: ffi
sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.3" version: "2.1.0"
ffigen: ffigen:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -865,18 +865,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.11.1" version: "0.8.0"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.15.0" version: "1.11.0"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -1037,6 +1037,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.8" version: "2.1.8"
pointycastle:
dependency: transitive
description:
name: pointycastle
sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29"
url: "https://pub.dev"
source: hosted
version: "3.7.4"
pool: pool:
dependency: transitive dependency: transitive
description: description:
@ -1317,11 +1325,10 @@ packages:
uni_links: uni_links:
dependency: "direct main" dependency: "direct main"
description: description:
path: uni_links name: uni_links
ref: f416118d843a7e9ed117c7bb7bdc2deda5a9e86f sha256: "051098acfc9e26a9fde03b487bef5d3d228ca8f67693480c6f33fd4fbb8e2b6e"
resolved-ref: f416118d843a7e9ed117c7bb7bdc2deda5a9e86f url: "https://pub.dev"
url: "https://github.com/rustdesk-org/uni_links" source: hosted
source: git
version: "0.5.1" version: "0.5.1"
uni_links_desktop: uni_links_desktop:
dependency: "direct main" dependency: "direct main"
@ -1551,18 +1558,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: win32 name: win32
sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.5.4" version: "5.2.0"
win32_registry: win32_registry:
dependency: transitive dependency: transitive
description: description:
name: win32_registry name: win32_registry
sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852" sha256: "41fd8a189940d8696b1b810efb9abcf60827b6cbfab90b0c43e8439e3a39d85a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.5" version: "1.1.2"
window_manager: window_manager:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1622,5 +1629,5 @@ packages:
source: hosted source: hosted
version: "0.2.1" version: "0.2.1"
sdks: sdks:
dart: ">=3.5.0 <4.0.0" dart: ">=3.3.0 <4.0.0"
flutter: ">=3.24.0" flutter: ">=3.19.0"

View File

@ -78,11 +78,7 @@ dependencies:
# if build rustdesk by flutter >=3.3, please use our custom pub below (uncomment code below). # if build rustdesk by flutter >=3.3, please use our custom pub below (uncomment code below).
git: git:
url: https://github.com/rustdesk-org/flutter_improved_scrolling url: https://github.com/rustdesk-org/flutter_improved_scrolling
uni_links: uni_links: ^0.5.1
git:
url: https://github.com/rustdesk-org/uni_links
path: uni_links
ref: f416118d843a7e9ed117c7bb7bdc2deda5a9e86f
uni_links_desktop: ^0.1.6 # use 0.1.6 to make flutter 3.13 works uni_links_desktop: ^0.1.6 # use 0.1.6 to make flutter 3.13 works
path: ^1.8.1 path: ^1.8.1
auto_size_text: ^3.0.0 auto_size_text: ^3.0.0
@ -108,7 +104,7 @@ dependencies:
pull_down_button: ^0.9.3 pull_down_button: ^0.9.3
device_info_plus: ^9.1.0 device_info_plus: ^9.1.0
qr_flutter: ^4.1.0 qr_flutter: ^4.1.0
extended_text: 14.0.0 extended_text: 13.0.0
dev_dependencies: dev_dependencies:
icons_launcher: ^2.0.4 icons_launcher: ^2.0.4
@ -190,4 +186,3 @@ flutter:
# #
# For details regarding fonts from package dependencies, # For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages # see https://flutter.dev/custom-fonts/#from-packages