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
b31e06a5
Commit
b31e06a5
authored
Jul 17, 2015
by
Matt Perry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make SnackBar animate itself.
parent
839e997e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
14 deletions
+5
-14
stock_home.dart
packages/flutter/example/stocks/lib/stock_home.dart
+2
-2
drawer.dart
packages/flutter/lib/widgets/drawer.dart
+0
-10
snack_bar.dart
packages/flutter/lib/widgets/snack_bar.dart
+3
-2
No files found.
packages/flutter/example/stocks/lib/stock_home.dart
View file @
b31e06a5
...
...
@@ -51,8 +51,8 @@ class StockHome extends StatefulComponent {
bool
_isSearching
=
false
;
String
_searchQuery
;
SnackBarStatus
_snackBarStatus
;
bool
_isSnackBarShowing
=
false
;
// Should it be showing?
SnackBarStatus
_snackBarStatus
=
SnackBarStatus
.
inactive
;
bool
_isSnackBarShowing
=
false
;
void
_handleSearchBegin
()
{
navigator
.
pushState
(
this
,
(
_
)
{
...
...
packages/flutter/lib/widgets/drawer.dart
View file @
b31e06a5
...
...
@@ -46,16 +46,6 @@ enum DrawerStatus {
typedef
void
DrawerStatusChangedCallback
(
DrawerStatus
status
);
// TODO(mpcomplete): find a better place for this.
class
AnimatedColor
extends
AnimatedType
<
Color
>
{
AnimatedColor
(
Color
begin
,
{
Color
end
,
Curve
curve:
linear
})
:
super
(
begin
,
end:
end
,
curve:
curve
);
void
setFraction
(
double
t
)
{
value
=
lerpColor
(
begin
,
end
,
t
);
}
}
class
Drawer
extends
AnimatedComponent
{
Drawer
({
String
key
,
...
...
packages/flutter/lib/widgets/snack_bar.dart
View file @
b31e06a5
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:sky/animation/animated_value.dart'
;
import
'package:sky/animation/animation_performance.dart'
;
import
'package:sky/painting/text_style.dart'
;
import
'package:sky/theme/typography.dart'
as
typography
;
...
...
@@ -69,11 +70,11 @@ class SnackBar extends AnimatedComponent {
}
}
Animated
Typ
e
<
Point
>
_position
;
Animated
Valu
e
<
Point
>
_position
;
AnimationPerformance
_performance
;
void
initState
()
{
_position
=
new
Animated
Typ
e
<
Point
>(
new
Point
(
0.0
,
50.0
),
end:
Point
.
origin
);
_position
=
new
Animated
Valu
e
<
Point
>(
new
Point
(
0.0
,
50.0
),
end:
Point
.
origin
);
_performance
=
new
AnimationPerformance
()
..
duration
=
_kSlideInDuration
..
variable
=
_position
...
...
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