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
de8ba530
Commit
de8ba530
authored
Mar 16, 2016
by
Hixie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some docs for people looking at bindings
parent
80423ae9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
binding.dart
packages/flutter/lib/src/rendering/binding.dart
+7
-0
binding.dart
packages/flutter/lib/src/services/binding.dart
+10
-0
No files found.
packages/flutter/lib/src/rendering/binding.dart
View file @
de8ba530
...
...
@@ -118,6 +118,13 @@ void debugDumpSemanticsTree() {
/// A concrete binding for applications that use the Rendering framework
/// directly. This is the glue that binds the framework to the Flutter engine.
///
/// You would only use this binding if you are writing to the
/// rendering layer directly. If you are writing to a higher-level
/// library, such as the Flutter Widgets library, then you would use
/// that layer's binding.
///
/// See also [BindingBase].
class
RenderingFlutterBinding
extends
BindingBase
with
Scheduler
,
Gesturer
,
Services
,
Renderer
{
RenderingFlutterBinding
({
RenderBox
root
})
{
assert
(
renderView
!=
null
);
...
...
packages/flutter/lib/src/services/binding.dart
View file @
de8ba530
...
...
@@ -13,6 +13,16 @@ export 'package:flutter/shell.dart';
/// [initInstances()]. The mixin is guaranteed to only be constructed once in
/// the lifetime of the app (more precisely, it will assert if constructed twice
/// in checked mode).
///
/// The top-most layer used to write the application will have a
/// concrete class that inherits from BindingBase and uses all the
/// various BindingBase mixins (such as [Services]). For example, the
/// Widgets library in flutter introduces a binding called
/// [WidgetFlutterBinding]. The relevant library defines how to create
/// the binding. It could be implied (for example,
/// [WidgetFlutterBinding] is automatically started from [runApp]), or
/// the application might be required to explicitly call the
/// constructor.
abstract
class
BindingBase
{
BindingBase
()
{
assert
(!
_debugInitialized
);
...
...
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