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
fdb4bd5e
Commit
fdb4bd5e
authored
Mar 06, 2016
by
Ian Hickson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2453 from Hixie/placeholder-assert
Clarify the assert when mimicking twice in a row.
parents
13837371
f86889cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
mimic.dart
packages/flutter/lib/src/widgets/mimic.dart
+12
-1
No files found.
packages/flutter/lib/src/widgets/mimic.dart
View file @
fdb4bd5e
...
...
@@ -176,7 +176,18 @@ class MimicableState extends State<Mimicable> {
/// passing it to a [Mimic] widget. To mimic the child in the
/// [Overlay], consider using [liftToOverlay()] instead.
MimicableHandle
startMimic
()
{
assert
(
_placeholderSize
==
null
);
assert
(()
{
if
(
_placeholderSize
!=
null
)
{
throw
new
WidgetError
(
'Mimicable started while already active.
\n
'
'When startMimic() or liftToOverlay() is called on a MimicableState, the mimic becomes active. '
'While active, it cannot be reactivated until it is stopped. '
'To stop a Mimicable started with startMimic(), call the MimicableHandle object
\'
s stopMimic() method. '
'To stop a Mimicable started with liftToOverlay(), call dispose() on the MimicOverlayEntry.'
);
}
return
true
;
});
RenderBox
box
=
context
.
findRenderObject
();
assert
(
box
!=
null
);
assert
(
box
.
hasSize
);
...
...
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