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
780c9a8d
Unverified
Commit
780c9a8d
authored
Feb 10, 2023
by
Kate Lovett
Committed by
GitHub
Feb 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated SystemChrome.setEnabledSystemUIOverlays (#119576)
parent
b2e37c65
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
49 deletions
+2
-49
system_chrome.dart
packages/flutter/lib/src/services/system_chrome.dart
+2
-32
system_chrome_test.dart
packages/flutter/test/services/system_chrome_test.dart
+0
-17
No files found.
packages/flutter/lib/src/services/system_chrome.dart
View file @
780c9a8d
...
...
@@ -72,7 +72,7 @@ class ApplicationSwitcherDescription {
/// Specifies a system overlay at a particular location.
///
/// Used by [SystemChrome.setEnabledSystemUI
Overlays
].
/// Used by [SystemChrome.setEnabledSystemUI
Mode
].
enum
SystemUiOverlay
{
/// The status bar provided by the embedder on the top of the application
/// surface, if any.
...
...
@@ -400,36 +400,6 @@ class SystemChrome {
);
}
/// Specifies the set of system overlays to have visible when the application
/// is running.
///
/// The `overlays` argument is a list of [SystemUiOverlay] enum values
/// denoting the overlays to show.
///
/// If a particular overlay is unsupported on the platform, enabling or
/// disabling that overlay will be ignored.
///
/// The settings here can be overridden by the platform when System UI becomes
/// necessary for functionality.
///
/// For example, on Android, when the keyboard becomes visible, it will enable the
/// navigation bar and status bar system UI overlays. When the keyboard is closed,
/// Android will not restore the previous UI visibility settings, and the UI
/// visibility cannot be changed until 1 second after the keyboard is closed to
/// prevent malware locking users from navigation buttons.
///
/// To regain "fullscreen" after text entry, the UI overlays should be set again
/// after a delay of 1 second. This can be achieved through [restoreSystemUIOverlays]
/// or calling this again. Otherwise, the original UI overlay settings will be
/// automatically restored only when the application loses and regains focus.
@Deprecated
(
'Migrate to setEnabledSystemUIMode. '
'This feature was deprecated after v2.3.0-17.0.pre.'
)
static
Future
<
void
>
setEnabledSystemUIOverlays
(
List
<
SystemUiOverlay
>
overlays
)
async
{
await
setEnabledSystemUIMode
(
SystemUiMode
.
manual
,
overlays:
overlays
);
}
/// Specifies the [SystemUiMode] to have visible when the application
/// is running.
///
...
...
@@ -508,7 +478,7 @@ class SystemChrome {
}
/// Restores the system overlays to the last settings provided via
/// [setEnabledSystemUI
Overlays
]. May be used when the platform force enables/disables
/// [setEnabledSystemUI
Mode
]. May be used when the platform force enables/disables
/// UI elements.
///
/// For example, when the Android keyboard disables hidden status and navigation bars,
...
...
packages/flutter/test/services/system_chrome_test.dart
View file @
780c9a8d
...
...
@@ -120,23 +120,6 @@ void main() {
expect
(
log
,
isNotEmpty
);
});
test
(
'setEnabledSystemUIOverlays control test'
,
()
async
{
final
List
<
MethodCall
>
log
=
<
MethodCall
>[];
TestDefaultBinaryMessengerBinding
.
instance
!.
defaultBinaryMessenger
.
setMockMethodCallHandler
(
SystemChannels
.
platform
,
(
MethodCall
methodCall
)
async
{
log
.
add
(
methodCall
);
return
null
;
});
await
SystemChrome
.
setEnabledSystemUIOverlays
(<
SystemUiOverlay
>[
SystemUiOverlay
.
top
]);
expect
(
log
,
hasLength
(
1
));
expect
(
log
.
single
,
isMethodCall
(
'SystemChrome.setEnabledSystemUIOverlays'
,
arguments:
<
String
>[
'SystemUiOverlay.top'
],
));
});
test
(
'setEnabledSystemUIMode control test'
,
()
async
{
final
List
<
MethodCall
>
log
=
<
MethodCall
>[];
...
...
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