commit
						f5b945c09b
					
				
							
								
								
									
										1
									
								
								.github/workflows/flutter-build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/flutter-build.yml
									
									
									
									
										vendored
									
									
								
							| @ -82,6 +82,7 @@ jobs: | |||||||
| 
 | 
 | ||||||
|       - name: Install flutter rust bridge deps |       - name: Install flutter rust bridge deps | ||||||
|         run: | |         run: | | ||||||
|  |           git config --global core.longpaths true | ||||||
|           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" | ||||||
|           Push-Location flutter ; flutter pub get ; Pop-Location |           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 |           ~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart | ||||||
|  | |||||||
| @ -68,7 +68,7 @@ class PeerPayload { | |||||||
| 
 | 
 | ||||||
|   PeerPayload.fromJson(Map<String, dynamic> json) |   PeerPayload.fromJson(Map<String, dynamic> json) | ||||||
|       : id = json['id'] ?? '', |       : id = json['id'] ?? '', | ||||||
|         info = json['info'] ?? '', |         info = (json['info'] is Map<String, dynamic>) ? json['info'] : {}, | ||||||
|         status = json['status'], |         status = json['status'], | ||||||
|         user = json['user'] ?? '', |         user = json['user'] ?? '', | ||||||
|         user_name = json['user_name'] ?? '', |         user_name = json['user_name'] ?? '', | ||||||
|  | |||||||
| @ -1,6 +1,7 @@ | |||||||
| import 'dart:async'; | import 'dart:async'; | ||||||
| import 'dart:collection'; | import 'dart:collection'; | ||||||
| 
 | 
 | ||||||
|  | import 'package:dynamic_layouts/dynamic_layouts.dart'; | ||||||
| import 'package:flutter/foundation.dart'; | import 'package:flutter/foundation.dart'; | ||||||
| import 'package:flutter/material.dart'; | import 'package:flutter/material.dart'; | ||||||
| import 'package:get/get.dart'; | import 'package:get/get.dart'; | ||||||
| @ -177,26 +178,29 @@ class _PeersViewState extends State<_PeersView> with WindowListener { | |||||||
|           if (snapshot.hasData) { |           if (snapshot.hasData) { | ||||||
|             final peers = snapshot.data!; |             final peers = snapshot.data!; | ||||||
|             gFFI.peerTabModel.setCurrentTabCachedPeers(peers); |             gFFI.peerTabModel.setCurrentTabCachedPeers(peers); | ||||||
|             final cards = <Widget>[]; |             final child = DynamicGridView.builder( | ||||||
|             for (final peer in peers) { |               gridDelegate: SliverGridDelegateWithWrapping( | ||||||
|               final visibilityChild = VisibilityDetector( |                   mainAxisSpacing: space / 2, crossAxisSpacing: space), | ||||||
|                 key: ValueKey(_cardId(peer.id)), |               itemCount: peers.length, | ||||||
|                 onVisibilityChanged: onVisibilityChanged, |               itemBuilder: (BuildContext context, int index) { | ||||||
|                 child: widget.peerCardBuilder(peer), |                 final visibilityChild = VisibilityDetector( | ||||||
|               ); |                   key: ValueKey(_cardId(peers[index].id)), | ||||||
|               cards.add(isDesktop |                   onVisibilityChanged: onVisibilityChanged, | ||||||
|                   ? Obx( |                   child: widget.peerCardBuilder(peers[index]), | ||||||
|                       () => SizedBox( |                 ); | ||||||
|                         width: 220, |                 return isDesktop | ||||||
|                         height: |                     ? Obx( | ||||||
|                             peerCardUiType.value == PeerUiType.grid ? 140 : 42, |                         () => SizedBox( | ||||||
|                         child: visibilityChild, |                           width: 220, | ||||||
|                       ), |                           height: peerCardUiType.value == PeerUiType.grid | ||||||
|                     ) |                               ? 140 | ||||||
|                   : SizedBox(width: mobileWidth, child: visibilityChild)); |                               : 42, | ||||||
|             } |                           child: visibilityChild, | ||||||
|             final child = |                         ), | ||||||
|                 Wrap(spacing: space, runSpacing: space, children: cards); |                       ) | ||||||
|  |                     : SizedBox(width: mobileWidth, child: visibilityChild); | ||||||
|  |               }, | ||||||
|  |             ); | ||||||
|             if (updateEvent == UpdateEvent.load) { |             if (updateEvent == UpdateEvent.load) { | ||||||
|               _curPeers.clear(); |               _curPeers.clear(); | ||||||
|               _curPeers.addAll(peers.map((e) => e.id)); |               _curPeers.addAll(peers.map((e) => e.id)); | ||||||
|  | |||||||
| @ -138,7 +138,7 @@ class _ConnectionPageState extends State<ConnectionPage> | |||||||
|                   Divider().paddingOnly(right: 12), |                   Divider().paddingOnly(right: 12), | ||||||
|                 ])), |                 ])), | ||||||
|                 SliverFillRemaining( |                 SliverFillRemaining( | ||||||
|                   hasScrollBody: false, |                   hasScrollBody: true, | ||||||
|                   child: PeerTabPage().paddingOnly(right: 12.0), |                   child: PeerTabPage().paddingOnly(right: 12.0), | ||||||
|                 ) |                 ) | ||||||
|               ], |               ], | ||||||
|  | |||||||
| @ -145,15 +145,14 @@ class GroupModel { | |||||||
|       final pageSize = 100; |       final pageSize = 100; | ||||||
|       var total = 0; |       var total = 0; | ||||||
|       int current = 0; |       int current = 0; | ||||||
|       var queryParameters = { |  | ||||||
|         'current': current.toString(), |  | ||||||
|         'pageSize': pageSize.toString(), |  | ||||||
|         'accessible': '', |  | ||||||
|         'status': '1', |  | ||||||
|         'user_status': '1', |  | ||||||
|       }; |  | ||||||
|       do { |       do { | ||||||
|         current += 1; |         current += 1; | ||||||
|  |         var queryParameters = { | ||||||
|  |           'current': current.toString(), | ||||||
|  |           'pageSize': pageSize.toString(), | ||||||
|  |           'accessible': '', | ||||||
|  |           'status': '1', | ||||||
|  |         }; | ||||||
|         var uri = Uri( |         var uri = Uri( | ||||||
|             scheme: uri0.scheme, |             scheme: uri0.scheme, | ||||||
|             host: uri0.host, |             host: uri0.host, | ||||||
|  | |||||||
| @ -328,7 +328,7 @@ packages: | |||||||
|     description: |     description: | ||||||
|       path: "." |       path: "." | ||||||
|       ref: HEAD |       ref: HEAD | ||||||
|       resolved-ref: "e51fddf7f3b46d4423b7aa79ba824a45a1ea1b7a" |       resolved-ref: e51fddf7f3b46d4423b7aa79ba824a45a1ea1b7a | ||||||
|       url: "https://github.com/rustdesk-org/rustdesk_desktop_multi_window" |       url: "https://github.com/rustdesk-org/rustdesk_desktop_multi_window" | ||||||
|     source: git |     source: git | ||||||
|     version: "0.1.0" |     version: "0.1.0" | ||||||
| @ -396,6 +396,15 @@ packages: | |||||||
|       url: "https://pub.dev" |       url: "https://pub.dev" | ||||||
|     source: hosted |     source: hosted | ||||||
|     version: "2.0.0" |     version: "2.0.0" | ||||||
|  |   dynamic_layouts: | ||||||
|  |     dependency: "direct main" | ||||||
|  |     description: | ||||||
|  |       path: "packages/dynamic_layouts" | ||||||
|  |       ref: "0023d01996576e494094793a6552463f01c5627a" | ||||||
|  |       resolved-ref: "0023d01996576e494094793a6552463f01c5627a" | ||||||
|  |       url: "https://github.com/flutter/packages.git" | ||||||
|  |     source: git | ||||||
|  |     version: "0.0.1+1" | ||||||
|   event_bus: |   event_bus: | ||||||
|     dependency: transitive |     dependency: transitive | ||||||
|     description: |     description: | ||||||
|  | |||||||
| @ -100,6 +100,11 @@ dependencies: | |||||||
|   uuid: ^3.0.7 |   uuid: ^3.0.7 | ||||||
|   auto_size_text_field: ^2.2.1 |   auto_size_text_field: ^2.2.1 | ||||||
|   flex_color_picker: ^3.3.0 |   flex_color_picker: ^3.3.0 | ||||||
|  |   dynamic_layouts: | ||||||
|  |     git: | ||||||
|  |       url: https://github.com/flutter/packages.git | ||||||
|  |       path: packages/dynamic_layouts | ||||||
|  |       ref: 0023d01996576e494094793a6552463f01c5627a | ||||||
| 
 | 
 | ||||||
| dev_dependencies: | dev_dependencies: | ||||||
|   icons_launcher: ^2.0.4 |   icons_launcher: ^2.0.4 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user