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
15a13b89
Commit
15a13b89
authored
Dec 03, 2015
by
Ian Hickson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #713 from Hixie/title
Allow non-Material apps to use the Title widget.
parents
5252a300
5dd8bd6e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
material.dart
packages/flutter/lib/material.dart
+0
-1
material_app.dart
packages/flutter/lib/src/material/material_app.dart
+3
-2
title.dart
packages/flutter/lib/src/widgets/title.dart
+4
-4
widgets.dart
packages/flutter/lib/widgets.dart
+1
-0
No files found.
packages/flutter/lib/material.dart
View file @
15a13b89
...
...
@@ -53,7 +53,6 @@ export 'src/material/theme.dart';
export
'src/material/theme_data.dart'
;
export
'src/material/time_picker.dart'
;
export
'src/material/time_picker_dialog.dart'
;
export
'src/material/title.dart'
;
export
'src/material/toggleable.dart'
;
export
'src/material/tool_bar.dart'
;
export
'src/material/typography.dart'
;
...
...
packages/flutter/lib/src/material/material_app.dart
View file @
15a13b89
...
...
@@ -10,7 +10,6 @@ import 'package:flutter/widgets.dart';
import
'page.dart'
;
import
'theme.dart'
;
import
'title.dart'
;
const
TextStyle
_errorTextStyle
=
const
TextStyle
(
color:
const
Color
(
0xD0FF0000
),
...
...
@@ -107,16 +106,18 @@ class _MaterialAppState extends State<MaterialApp> implements BindingObserver {
}
Widget
build
(
BuildContext
context
)
{
ThemeData
theme
=
config
.
theme
??
new
ThemeData
.
fallback
();
return
new
MediaQuery
(
data:
new
MediaQueryData
(
size:
_size
),
child:
new
Theme
(
data:
config
.
theme
??
new
ThemeData
.
fallback
()
,
data:
theme
,
child:
new
DefaultTextStyle
(
style:
_errorTextStyle
,
child:
new
DefaultAssetBundle
(
bundle:
_defaultBundle
,
child:
new
Title
(
title:
config
.
title
,
color:
theme
.
primaryColor
,
child:
new
Navigator
(
key:
_navigator
,
initialRoute:
ui
.
window
.
defaultRouteName
,
...
...
packages/flutter/lib/src/
material
/title.dart
→
packages/flutter/lib/src/
widgets
/title.dart
View file @
15a13b89
...
...
@@ -5,21 +5,21 @@
import
'package:flutter/services.dart'
;
import
'package:flutter/widgets.dart'
;
import
'theme.dart'
;
class
Title
extends
StatelessComponent
{
Title
({
this
.
title
,
this
.
child
});
Title
({
this
.
title
,
this
.
child
,
this
.
color
});
final
Widget
child
;
final
String
title
;
final
Color
color
;
Widget
build
(
BuildContext
context
)
{
updateTaskDescription
(
title
,
Theme
.
of
(
context
).
primaryC
olor
);
updateTaskDescription
(
title
,
c
olor
);
return
child
;
}
void
debugFillDescription
(
List
<
String
>
description
)
{
super
.
debugFillDescription
(
description
);
description
.
add
(
'"
$title
"'
);
description
.
add
(
'color:
$color
'
);
}
}
packages/flutter/lib/widgets.dart
View file @
15a13b89
...
...
@@ -33,6 +33,7 @@ export 'src/widgets/routes.dart';
export
'src/widgets/scrollable.dart'
;
export
'src/widgets/statistics_overlay.dart'
;
export
'src/widgets/status_transitions.dart'
;
export
'src/widgets/title.dart'
;
export
'src/widgets/transitions.dart'
;
export
'src/widgets/unique_component.dart'
;
...
...
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