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
e1b8f0b6
Commit
e1b8f0b6
authored
Sep 25, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add UniqueComponent helper for creating components with unique states
parent
ff567695
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
fn3.dart
packages/flutter/lib/src/fn3.dart
+1
-0
unique_component.dart
packages/flutter/lib/src/fn3/unique_component.dart
+16
-0
No files found.
packages/flutter/lib/src/fn3.dart
View file @
e1b8f0b6
...
@@ -47,5 +47,6 @@ export 'fn3/theme.dart';
...
@@ -47,5 +47,6 @@ export 'fn3/theme.dart';
export
'fn3/title.dart'
;
export
'fn3/title.dart'
;
export
'fn3/tool_bar.dart'
;
export
'fn3/tool_bar.dart'
;
export
'fn3/transitions.dart'
;
export
'fn3/transitions.dart'
;
export
'fn3/unique_component.dart'
;
export
'package:vector_math/vector_math.dart'
show
Matrix4
;
export
'package:vector_math/vector_math.dart'
show
Matrix4
;
packages/flutter/lib/src/fn3/unique_component.dart
0 → 100644
View file @
e1b8f0b6
// Copyright 2015 The Chromium 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:sky/src/fn3.dart'
;
abstract
class
UniqueComponent
<
T
extends
State
>
extends
StatefulComponent
{
UniqueComponent
({
GlobalKey
key
})
:
super
(
key:
key
??
new
GlobalKey
());
T
createState
();
T
get
currentState
{
GlobalKey
globalKey
=
key
;
return
globalKey
.
currentState
;
}
}
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