mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-11 18:36:11 +02:00
add ScrollController to each ScrollView
fix "The provided ScrollController is currently attached to more than one ScrollPosition" Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
42d17f9d2b
commit
76e7bf5293
9 changed files with 18 additions and 2 deletions
|
@ -1023,6 +1023,7 @@ class _PeerTabbedPageState extends State<_PeerTabbedPage>
|
|||
return ListView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
shrinkWrap: true,
|
||||
controller: ScrollController(),
|
||||
children: super.widget.tabs.asMap().entries.map((t) {
|
||||
return Obx(() => GestureDetector(
|
||||
child: Container(
|
||||
|
|
|
@ -122,6 +122,7 @@ class _DesktopSettingPageState extends State<DesktopSettingPage>
|
|||
|
||||
Widget _listView({required List<_TabInfo> tabs}) {
|
||||
return ListView(
|
||||
controller: ScrollController(),
|
||||
children: tabs
|
||||
.asMap()
|
||||
.entries
|
||||
|
@ -181,6 +182,7 @@ class _GeneralState extends State<_General> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListView(
|
||||
controller: ScrollController(),
|
||||
children: [
|
||||
theme(),
|
||||
abr(),
|
||||
|
@ -300,6 +302,7 @@ class _LanguageState extends State<_Language>
|
|||
Widget build(BuildContext context) {
|
||||
super.build(context);
|
||||
return ListView(
|
||||
controller: ScrollController(),
|
||||
children: [
|
||||
_Card(title: 'Language', children: [language()]),
|
||||
],
|
||||
|
@ -353,6 +356,7 @@ class _SafetyState extends State<_Safety> with AutomaticKeepAliveClientMixin {
|
|||
Widget build(BuildContext context) {
|
||||
super.build(context);
|
||||
return ListView(
|
||||
controller: ScrollController(),
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
|
@ -622,7 +626,7 @@ class _NetworkState extends State<_Network> with AutomaticKeepAliveClientMixin {
|
|||
Widget build(BuildContext context) {
|
||||
super.build(context);
|
||||
bool enabled = !locked;
|
||||
return ListView(children: [
|
||||
return ListView(controller: ScrollController(), children: [
|
||||
Column(
|
||||
children: [
|
||||
_lock(locked, 'Unlock Network Settings', () {
|
||||
|
@ -657,6 +661,7 @@ class _AcountState extends State<_Acount> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListView(
|
||||
controller: ScrollController(),
|
||||
children: [
|
||||
_Card(title: 'Acount', children: [login()]),
|
||||
_Card(title: 'ID', children: [changeId()]),
|
||||
|
@ -705,7 +710,7 @@ class _AboutState extends State<_About> {
|
|||
final license = data['license'].toString();
|
||||
final version = data['version'].toString();
|
||||
const linkStyle = TextStyle(decoration: TextDecoration.underline);
|
||||
return ListView(children: [
|
||||
return ListView(controller: ScrollController(), children: [
|
||||
_Card(title: "About RustDesk", children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
|
|
@ -184,6 +184,7 @@ class _FileManagerPageState extends State<FileManagerPage>
|
|||
children: [
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
controller: ScrollController(),
|
||||
child: ObxValue<RxString>(
|
||||
(searchText) {
|
||||
final filteredEntries = searchText.isEmpty
|
||||
|
@ -309,6 +310,7 @@ class _FileManagerPageState extends State<FileManagerPage>
|
|||
// Center(child: listTail(isLocal: isLocal)),
|
||||
// Expanded(
|
||||
// child: ListView.builder(
|
||||
// controller: ScrollController(),
|
||||
// itemCount: entries.length + 1,
|
||||
// itemBuilder: (context, index) {
|
||||
// if (index >= entries.length) {
|
||||
|
@ -424,6 +426,7 @@ class _FileManagerPageState extends State<FileManagerPage>
|
|||
decoration: BoxDecoration(border: Border.all(color: Colors.grey)),
|
||||
child: Obx(
|
||||
() => ListView.builder(
|
||||
controller: ScrollController(),
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
final item = model.jobTable[index];
|
||||
return Column(
|
||||
|
|
|
@ -133,6 +133,7 @@ class _PortForwardPageState extends State<PortForwardPage>
|
|||
data: Theme.of(context)
|
||||
.copyWith(backgroundColor: MyTheme.color(context).bg),
|
||||
child: Obx(() => ListView.builder(
|
||||
controller: ScrollController(),
|
||||
itemCount: pfs.length + 2,
|
||||
itemBuilder: ((context, index) {
|
||||
if (index == 0) {
|
||||
|
@ -293,6 +294,7 @@ class _PortForwardPageState extends State<PortForwardPage>
|
|||
data: Theme.of(context)
|
||||
.copyWith(backgroundColor: MyTheme.color(context).bg),
|
||||
child: ListView.builder(
|
||||
controller: ScrollController(),
|
||||
itemCount: 2,
|
||||
itemBuilder: ((context, index) {
|
||||
if (index == 0) {
|
||||
|
|
|
@ -614,6 +614,7 @@ class _PopupMenu<T> extends StatelessWidget {
|
|||
padding: const EdgeInsets.symmetric(
|
||||
vertical: _kMenuVerticalPadding,
|
||||
),
|
||||
controller: ScrollController(),
|
||||
child: ListBody(children: children),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -85,6 +85,7 @@ class _PeerWidgetState extends State<_PeerWidget> with WindowListener {
|
|||
child: Text(translate("Empty")),
|
||||
)
|
||||
: SingleChildScrollView(
|
||||
controller: ScrollController(),
|
||||
child: ObxValue<RxString>((searchText) {
|
||||
return FutureBuilder<List<Peer>>(
|
||||
builder: (context, snapshot) {
|
||||
|
|
|
@ -66,6 +66,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
|||
Widget build(BuildContext context) {
|
||||
Provider.of<FfiModel>(context);
|
||||
return SingleChildScrollView(
|
||||
controller: ScrollController(),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
|
|
|
@ -203,6 +203,7 @@ class _FileManagerPageState extends State<FileManagerPage> {
|
|||
headTools(),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
controller: ScrollController(),
|
||||
itemCount: entries.length + 1,
|
||||
itemBuilder: (context, index) {
|
||||
if (index >= entries.length) {
|
||||
|
|
|
@ -759,6 +759,7 @@ class _RemotePageState extends State<RemotePage> {
|
|||
expand: false,
|
||||
builder: (context, scrollController) {
|
||||
return SingleChildScrollView(
|
||||
controller: ScrollController(),
|
||||
padding: EdgeInsets.symmetric(vertical: 10),
|
||||
child: GestureHelp(
|
||||
touchMode: gFFI.ffiModel.touchMode,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue