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
9d155bdc
Commit
9d155bdc
authored
Jan 18, 2016
by
Ian Hickson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1285 from Hixie/activity
Activity clean-up
parents
96958b20
c03c4cca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
interactive_flex.dart
examples/rendering/interactive_flex.dart
+1
-1
activity.dart
packages/flutter/lib/src/services/activity.dart
+5
-3
title.dart
packages/flutter/lib/src/widgets/title.dart
+8
-4
No files found.
examples/rendering/interactive_flex.dart
View file @
9d155bdc
...
...
@@ -121,6 +121,6 @@ Pancetta meatball tongue tenderloin rump tail jowl boudin.""";
child:
row
);
updateTaskDescription
(
'Interactive Flex'
,
topColor
);
updateTaskDescription
(
label:
'Interactive Flex'
,
color:
topColor
);
new
DemoBinding
(
root:
root
);
}
packages/flutter/lib/src/services/activity.dart
View file @
9d155bdc
...
...
@@ -11,7 +11,7 @@ import 'shell.dart';
export
'package:sky_services/activity/activity.mojom.dart'
;
/// Dart wrapper around Activity mojo service available in
Sky
on Android.
/// Dart wrapper around Activity mojo service available in
Flutter
on Android.
///
/// Most clients will want to use these methods instead of the activity service
/// directly.
...
...
@@ -50,8 +50,10 @@ final PathService pathService = _pathServiceProxy.ptr;
Color
_cachedPrimaryColor
;
String
_cachedLabel
;
/// Sets the TaskDescription for the current Activity
void
updateTaskDescription
(
String
label
,
Color
color
)
{
/// Sets the TaskDescription for the current Activity.
/// The color, if provided, must be opaque.
void
updateTaskDescription
(
{
String
label
,
Color
color
})
{
assert
(
color
==
null
||
color
.
alpha
==
0xFF
);
if
(
_cachedPrimaryColor
==
color
&&
_cachedLabel
==
label
)
return
;
...
...
packages/flutter/lib/src/widgets/title.dart
View file @
9d155bdc
...
...
@@ -7,7 +7,9 @@ import 'package:flutter/widgets.dart';
/// Controls the description of this app in the operating system.
class
Title
extends
StatelessComponent
{
Title
({
this
.
title
,
this
.
child
,
this
.
color
});
Title
({
this
.
title
,
this
.
child
,
this
.
color
})
{
assert
(
color
==
null
||
color
.
alpha
==
0xFF
);
}
final
Widget
child
;
...
...
@@ -18,13 +20,15 @@ class Title extends StatelessComponent {
final
Color
color
;
Widget
build
(
BuildContext
context
)
{
updateTaskDescription
(
title
,
color
);
updateTaskDescription
(
label:
title
,
color:
color
);
return
child
;
}
void
debugFillDescription
(
List
<
String
>
description
)
{
super
.
debugFillDescription
(
description
);
description
.
add
(
'"
$title
"'
);
description
.
add
(
'color:
$color
'
);
if
(
title
!=
null
)
description
.
add
(
'"
$title
"'
);
if
(
color
!=
null
)
description
.
add
(
'color:
$color
'
);
}
}
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