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
e7661905
Unverified
Commit
e7661905
authored
May 27, 2020
by
Kirill
Committed by
GitHub
May 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deleted deprecated profile func and profile.dart (#57841)
parent
4465ff9e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
46 deletions
+0
-46
foundation.dart
packages/flutter/lib/foundation.dart
+0
-1
profile.dart
packages/flutter/lib/src/foundation/profile.dart
+0
-25
profile_test.dart
packages/flutter/test/foundation/profile_test.dart
+0
-20
No files found.
packages/flutter/lib/foundation.dart
View file @
e7661905
...
...
@@ -52,7 +52,6 @@ export 'src/foundation/object.dart';
export
'src/foundation/observer_list.dart'
;
export
'src/foundation/platform.dart'
;
export
'src/foundation/print.dart'
;
export
'src/foundation/profile.dart'
;
export
'src/foundation/serialization.dart'
;
export
'src/foundation/stack_frame.dart'
;
export
'src/foundation/synchronous_future.dart'
;
...
...
packages/flutter/lib/src/foundation/profile.dart
deleted
100644 → 0
View file @
4465ff9e
// 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
'basic_types.dart'
;
import
'constants.dart'
;
/// DEPRECATED. `function` cannot be tree-shaken out of release builds.
///
/// Instead use:
///
/// ```dart
/// if (!kReleaseMode) {
/// function();
/// }
/// ```
@Deprecated
(
'Use `if (!kReleaseMode) { function(); }` instead. '
'This feature was deprecated after v1.3.9.'
)
void
profile
(
VoidCallback
function
)
{
if
(
kReleaseMode
)
return
;
function
();
}
packages/flutter/test/foundation/profile_test.dart
deleted
100644 → 0
View file @
4465ff9e
// 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/foundation.dart'
;
import
'../flutter_test_alternative.dart'
;
void
main
(
)
{
// TODO(devoncarew): This test - while very nice - isn't testing what we really want to know:
// that the code in the `profile` closure is omitted in release mode.
test
(
'profile invokes its closure in debug or profile mode'
,
()
{
int
count
=
0
;
profile
(()
{
// ignore: deprecated_member_use_from_same_package
count
++;
});
// We run our tests in debug mode, so kReleaseMode will always evaluate to
// false...
expect
(
count
,
kReleaseMode
?
0
:
1
);
});
}
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