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
329f86a9
Unverified
Commit
329f86a9
authored
Jan 30, 2023
by
LongCatIsLooong
Committed by
GitHub
Jan 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make a few values non-nullable in cupertino (#119478)
parent
18c7f8a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
17 deletions
+12
-17
route.dart
packages/flutter/lib/src/cupertino/route.dart
+8
-10
tab_view.dart
packages/flutter/lib/src/cupertino/tab_view.dart
+4
-7
No files found.
packages/flutter/lib/src/cupertino/route.dart
View file @
329f86a9
...
...
@@ -1010,14 +1010,12 @@ class CupertinoModalPopupRoute<T> extends PopupRoute<T> {
this
.
barrierLabel
=
'Dismiss'
,
this
.
barrierColor
=
kCupertinoModalBarrierColor
,
bool
barrierDismissible
=
true
,
bool
?
semanticsDismissibl
e
,
bool
semanticsDismissible
=
fals
e
,
super
.
filter
,
super
.
settings
,
this
.
anchorPoint
,
})
{
_barrierDismissible
=
barrierDismissible
;
_semanticsDismissible
=
semanticsDismissible
;
}
})
:
_barrierDismissible
=
barrierDismissible
,
_semanticsDismissible
=
semanticsDismissible
;
/// A builder that builds the widget tree for the [CupertinoModalPopupRoute].
///
...
...
@@ -1029,9 +1027,9 @@ class CupertinoModalPopupRoute<T> extends PopupRoute<T> {
/// widget needs to update dynamically.
final
WidgetBuilder
builder
;
bool
?
_barrierDismissible
;
final
bool
_barrierDismissible
;
bool
?
_semanticsDismissible
;
final
bool
_semanticsDismissible
;
@override
final
String
barrierLabel
;
...
...
@@ -1040,10 +1038,10 @@ class CupertinoModalPopupRoute<T> extends PopupRoute<T> {
final
Color
?
barrierColor
;
@override
bool
get
barrierDismissible
=>
_barrierDismissible
??
true
;
bool
get
barrierDismissible
=>
_barrierDismissible
;
@override
bool
get
semanticsDismissible
=>
_semanticsDismissible
??
false
;
bool
get
semanticsDismissible
=>
_semanticsDismissible
;
@override
Duration
get
transitionDuration
=>
_kModalPopupTransitionDuration
;
...
...
@@ -1167,7 +1165,7 @@ Future<T?> showCupertinoModalPopup<T>({
Color
barrierColor
=
kCupertinoModalBarrierColor
,
bool
barrierDismissible
=
true
,
bool
useRootNavigator
=
true
,
bool
?
semanticsDismissibl
e
,
bool
semanticsDismissible
=
fals
e
,
RouteSettings
?
routeSettings
,
Offset
?
anchorPoint
,
})
{
...
...
packages/flutter/lib/src/cupertino/tab_view.dart
View file @
329f86a9
...
...
@@ -175,13 +175,13 @@ class _CupertinoTabViewState extends State<CupertinoTabView> {
Route
<
dynamic
>?
_onGenerateRoute
(
RouteSettings
settings
)
{
final
String
?
name
=
settings
.
name
;
WidgetBuilder
?
routeBuilder
;
final
WidgetBuilder
?
routeBuilder
;
String
?
title
;
if
(
name
==
Navigator
.
defaultRouteName
&&
widget
.
builder
!=
null
)
{
routeBuilder
=
widget
.
builder
;
title
=
widget
.
defaultTitle
;
}
else
if
(
widget
.
routes
!=
null
)
{
routeBuilder
=
widget
.
routes
!
[
name
];
}
else
{
routeBuilder
=
widget
.
routes
?
[
name
];
}
if
(
routeBuilder
!=
null
)
{
return
CupertinoPageRoute
<
dynamic
>(
...
...
@@ -190,10 +190,7 @@ class _CupertinoTabViewState extends State<CupertinoTabView> {
settings:
settings
,
);
}
if
(
widget
.
onGenerateRoute
!=
null
)
{
return
widget
.
onGenerateRoute
!(
settings
);
}
return
null
;
return
widget
.
onGenerateRoute
?.
call
(
settings
);
}
Route
<
dynamic
>?
_onUnknownRoute
(
RouteSettings
settings
)
{
...
...
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