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
1d773ace
Commit
1d773ace
authored
Jan 29, 2019
by
Remi Rousselet
Committed by
Michael Goderbauer
Jan 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make reassemble public (#26900)
parent
e38efc89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
16 deletions
+26
-16
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+26
-16
No files found.
packages/flutter/lib/src/widgets/framework.dart
View file @
1d773ace
...
...
@@ -21,7 +21,6 @@ export 'package:flutter/foundation.dart' show
protected
,
required
,
visibleForTesting
;
export
'package:flutter/foundation.dart'
show
FlutterError
,
debugPrint
,
debugPrintStack
;
export
'package:flutter/foundation.dart'
show
VoidCallback
,
ValueChanged
,
ValueGetter
,
ValueSetter
;
export
'package:flutter/foundation.dart'
show
DiagnosticLevel
;
...
...
@@ -1030,23 +1029,15 @@ abstract class State<T extends StatefulWidget> extends Diagnosticable {
@protected
void
didUpdateWidget
(
covariant
T
oldWidget
)
{
}
/// Called whenever the application is reassembled during debugging, for
/// example during hot reload.
///
/// This method should rerun any initialization logic that depends on global
/// state, for example, image loading from asset bundles (since the asset
/// bundle may have changed).
/// {@macro flutter.widgets.reassemble}
///
/// In addition to this method being invoked, it is guaranteed that the
/// [build] method will be invoked when a reassemble is signaled. Most
/// widgets therefore do not need to do anything in the [reassemble] method.
///
/// This function will only be called during development. In release builds,
/// the `ext.flutter.reassemble` hook is not available, and so this code will
/// never execute.
///
/// See also:
///
/// * [Element.reassemble]
/// * [BindingBase.reassembleApplication]
/// * [Image], which uses this to reload images.
@protected
...
...
@@ -2467,7 +2458,7 @@ class BuildOwner {
try
{
assert
(
root
.
_parent
==
null
);
assert
(
root
.
owner
==
this
);
root
.
_
reassemble
();
root
.
reassemble
();
}
finally
{
Timeline
.
finishSync
();
}
...
...
@@ -2595,11 +2586,30 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
bool
_active
=
false
;
/// {@template flutter.widgets.reassemble}
/// Called whenever the application is reassembled during debugging, for
/// example during hot reload.
///
/// This method should rerun any initialization logic that depends on global
/// state, for example, image loading from asset bundles (since the asset
/// bundle may have changed).
///
/// This function will only be called during development. In release builds,
/// the `ext.flutter.reassemble` hook is not available, and so this code will
/// never execute.
/// {@endtemplate}
///
/// See also:
///
/// * [State.reassemble]
/// * [BindingBase.reassembleApplication]
/// * [Image], which uses this to reload images.
@mustCallSuper
void
_reassemble
()
{
@protected
void
reassemble
()
{
markNeedsBuild
();
visitChildren
((
Element
child
)
{
child
.
_
reassemble
();
child
.
reassemble
();
});
}
...
...
@@ -3817,9 +3827,9 @@ class StatefulElement extends ComponentElement {
State
<
StatefulWidget
>
_state
;
@override
void
_
reassemble
()
{
void
reassemble
()
{
state
.
reassemble
();
super
.
_
reassemble
();
super
.
reassemble
();
}
@override
...
...
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