Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
fcd154bd
Unverified
Commit
fcd154bd
authored
Feb 23, 2024
by
LongCatIsLooong
Committed by
GitHub
Feb 23, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated `InteractiveViewer.alignPanAxis` (#142500)
parent
59da873e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
145 additions
and
29 deletions
+145
-29
fix_interactive_viewer.yaml
...tter/lib/fix_data/fix_widgets/fix_interactive_viewer.yaml
+105
-0
interactive_viewer.dart
packages/flutter/lib/src/widgets/interactive_viewer.dart
+0
-29
interactive_viewer.dart
packages/flutter/test_fixes/widgets/interactive_viewer.dart
+20
-0
interactive_viewer.dart.expect
...flutter/test_fixes/widgets/interactive_viewer.dart.expect
+20
-0
No files found.
packages/flutter/lib/fix_data/fix_widgets/fix_interactive_viewer.yaml
0 → 100644
View file @
fcd154bd
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# For details regarding the *Flutter Fix* feature, see
# https://flutter.dev/docs/development/tools/flutter-fix
# Please add new fixes to the top of the file, separated by one blank line
# from other fixes. In a comment, include a link to the PR where the change
# requiring the fix was made.
# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md
# file for instructions on testing these data driven fixes.
# For documentation about this file format, see
# https://dart.dev/go/data-driven-fixes.
# * Fixes in this file are for InteractiveViewer from the widgets library. *
version
:
1
transforms
:
# Change made in https://github.com/flutter/flutter/pull/109014
-
title
:
"
Migrate
to
'panAxis'"
date
:
2024-02-22
element
:
uris
:
[
'
widgets.dart'
,
'
material.dart'
,
'
cupertino.dart'
]
constructor
:
'
'
inClass
:
'
InteractiveViewer'
variables
:
alignPanAxis
:
kind
:
'
fragment'
value
:
'
arguments[alignPanAxis]'
panAxis
:
kind
:
'
fragment'
value
:
'
arguments[panAxis]'
oneOf
:
-
if
:
"
panAxis
==
''
&&
alignPanAxis
==
'true'"
changes
:
-
kind
:
'
addParameter'
index
:
0
name
:
'
panAxis'
style
:
optional_named
argumentValue
:
expression
:
'
PanAxis.aligned'
requiredIf
:
"
alignPanAxis
==
'true'"
-
kind
:
'
removeParameter'
name
:
'
alignPanAxis'
-
if
:
"
panAxis
==
''
&&
alignPanAxis
==
'false'"
changes
:
-
kind
:
'
addParameter'
index
:
0
name
:
'
panAxis'
style
:
optional_named
argumentValue
:
expression
:
'
PanAxis.free'
requiredIf
:
"
alignPanAxis
==
'false'"
-
kind
:
'
removeParameter'
name
:
'
alignPanAxis'
-
if
:
"
alignPanAxis
!=
''"
changes
:
-
kind
:
'
removeParameter'
name
:
'
alignPanAxis'
# Change made in https://github.com/flutter/flutter/pull/109014
-
title
:
"
Migrate
to
'panAxis'"
date
:
2024-02-22
element
:
uris
:
[
'
widgets.dart'
,
'
material.dart'
,
'
cupertino.dart'
]
constructor
:
'
builder'
inClass
:
'
InteractiveViewer'
variables
:
alignPanAxis
:
kind
:
'
fragment'
value
:
'
arguments[alignPanAxis]'
panAxis
:
kind
:
'
fragment'
value
:
'
arguments[panAxis]'
oneOf
:
-
if
:
"
panAxis
==
''
&&
alignPanAxis
==
'true'"
changes
:
-
kind
:
'
addParameter'
index
:
0
name
:
'
panAxis'
style
:
optional_named
argumentValue
:
expression
:
'
PanAxis.aligned'
requiredIf
:
"
alignPanAxis
==
'true'"
-
kind
:
'
removeParameter'
name
:
'
alignPanAxis'
-
if
:
"
panAxis
==
''
&&
alignPanAxis
==
'false'"
changes
:
-
kind
:
'
addParameter'
index
:
0
name
:
'
panAxis'
style
:
optional_named
argumentValue
:
expression
:
'
PanAxis.free'
requiredIf
:
"
alignPanAxis
==
'false'"
-
kind
:
'
removeParameter'
name
:
'
alignPanAxis'
-
if
:
"
alignPanAxis
!=
''"
changes
:
-
kind
:
'
removeParameter'
name
:
'
alignPanAxis'
# Before adding a new fix: read instructions at the top of this file.
packages/flutter/lib/src/widgets/interactive_viewer.dart
View file @
fcd154bd
...
@@ -63,11 +63,6 @@ class InteractiveViewer extends StatefulWidget {
...
@@ -63,11 +63,6 @@ class InteractiveViewer extends StatefulWidget {
InteractiveViewer
({
InteractiveViewer
({
super
.
key
,
super
.
key
,
this
.
clipBehavior
=
Clip
.
hardEdge
,
this
.
clipBehavior
=
Clip
.
hardEdge
,
@Deprecated
(
'Use panAxis instead. '
'This feature was deprecated after v3.3.0-0.5.pre.'
,
)
this
.
alignPanAxis
=
false
,
this
.
panAxis
=
PanAxis
.
free
,
this
.
panAxis
=
PanAxis
.
free
,
this
.
boundaryMargin
=
EdgeInsets
.
zero
,
this
.
boundaryMargin
=
EdgeInsets
.
zero
,
this
.
constrained
=
true
,
this
.
constrained
=
true
,
...
@@ -112,11 +107,6 @@ class InteractiveViewer extends StatefulWidget {
...
@@ -112,11 +107,6 @@ class InteractiveViewer extends StatefulWidget {
InteractiveViewer
.
builder
({
InteractiveViewer
.
builder
({
super
.
key
,
super
.
key
,
this
.
clipBehavior
=
Clip
.
hardEdge
,
this
.
clipBehavior
=
Clip
.
hardEdge
,
@Deprecated
(
'Use panAxis instead. '
'This feature was deprecated after v3.3.0-0.5.pre.'
,
)
this
.
alignPanAxis
=
false
,
this
.
panAxis
=
PanAxis
.
free
,
this
.
panAxis
=
PanAxis
.
free
,
this
.
boundaryMargin
=
EdgeInsets
.
zero
,
this
.
boundaryMargin
=
EdgeInsets
.
zero
,
// These default scale values were eyeballed as reasonable limits for common
// These default scale values were eyeballed as reasonable limits for common
...
@@ -162,25 +152,6 @@ class InteractiveViewer extends StatefulWidget {
...
@@ -162,25 +152,6 @@ class InteractiveViewer extends StatefulWidget {
/// Defaults to [Clip.hardEdge].
/// Defaults to [Clip.hardEdge].
final
Clip
clipBehavior
;
final
Clip
clipBehavior
;
/// This property is deprecated, please use [panAxis] instead.
///
/// If true, panning is only allowed in the direction of the horizontal axis
/// or the vertical axis.
///
/// In other words, when this is true, diagonal panning is not allowed. A
/// single gesture begun along one axis cannot also cause panning along the
/// other axis without stopping and beginning a new gesture. This is a common
/// pattern in tables where data is displayed in columns and rows.
///
/// See also:
/// * [constrained], which has an example of creating a table that uses
/// alignPanAxis.
@Deprecated
(
'Use panAxis instead. '
'This feature was deprecated after v3.3.0-0.5.pre.'
,
)
final
bool
alignPanAxis
;
/// When set to [PanAxis.aligned], panning is only allowed in the horizontal
/// When set to [PanAxis.aligned], panning is only allowed in the horizontal
/// axis or the vertical axis, diagonal panning is not allowed.
/// axis or the vertical axis, diagonal panning is not allowed.
///
///
...
...
packages/flutter/test_fixes/widgets/interactive_viewer.dart
0 → 100644
View file @
fcd154bd
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter/widgets.dart'
;
void
main
(
)
{
// Change made in https://github.com/flutter/flutter/pull/109014
InteractiveViewer
(
alignPanAxis:
false
);
InteractiveViewer
.
builder
(
alignPanAxis:
false
);
InteractiveViewer
(
alignPanAxis:
true
);
InteractiveViewer
.
builder
(
alignPanAxis:
true
);
InteractiveViewer
(
alignPanAxis:
false
,
panAxis:
PanAxis
.
aligned
,);
InteractiveViewer
.
builder
(
alignPanAxis:
false
,
panAxis:
PanAxis
.
aligned
,);
InteractiveViewer
(
alignPanAxis:
true
,
panAxis:
PanAxis
.
aligned
,);
InteractiveViewer
.
builder
(
alignPanAxis:
true
,
panAxis:
PanAxis
.
aligned
,);
}
packages/flutter/test_fixes/widgets/interactive_viewer.dart.expect
0 → 100644
View file @
fcd154bd
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/widgets.dart';
void main() {
// Change made in https://github.com/flutter/flutter/pull/109014
InteractiveViewer(panAxis: PanAxis.free);
InteractiveViewer.builder(panAxis: PanAxis.free);
InteractiveViewer(panAxis: PanAxis.aligned);
InteractiveViewer.builder(panAxis: PanAxis.aligned);
InteractiveViewer(panAxis: PanAxis.aligned,);
InteractiveViewer.builder(panAxis: PanAxis.aligned,);
InteractiveViewer(panAxis: PanAxis.aligned,);
InteractiveViewer.builder(panAxis: PanAxis.aligned,);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment