Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5674921
Added TODO comments
shihaohong Jul 10, 2019
4f2d993
Implement TooltipThemeData and TooltipTheme
shihaohong Jul 10, 2019
7718cc4
WIP - Wire TooltipTheme through Tooltip and ThemeData, add TextStyle …
shihaohong Jul 11, 2019
fa682df
Add API documentation for textStyle property
shihaohong Jul 11, 2019
b875b85
Fix wiring of default tooltip values
shihaohong Jul 11, 2019
12db4ac
Add height and Padding tests for TooltipTheme
shihaohong Jul 11, 2019
6cadb1f
Add preferBelow and verticalOffset theme tests
shihaohong Jul 11, 2019
5a87cd5
Add semantics tests for Tooltip themes
shihaohong Jul 11, 2019
b0b963f
Add tooltip theme waitDuration and showDuration tests
shihaohong Jul 12, 2019
64166b9
Add custom tooltip TextStyle tests, fix implementation bug
shihaohong Jul 12, 2019
137f64d
Add const where needed in test file
Jul 13, 2019
317616d
Merge branch 'master' of github.com:flutter/flutter into tooltip-theme
shihaohong Jul 14, 2019
cafa9b8
Add custom tooltip TextStyle theme tests
shihaohong Jul 15, 2019
e39fd45
Merge branch 'tooltip-theme' of github.com:shihaohong/flutter into to…
shihaohong Jul 15, 2019
6929760
Add const to both tests where missing
shihaohong Jul 15, 2019
a1232e9
Incorporate doc improvement and const declaration code review feedback
shihaohong Jul 15, 2019
2b83cf2
add debugFillProperties tests to tooltip_theme_test.dart
shihaohong Jul 15, 2019
04edf97
Add tests on TooltipThemeData copyWith, ==, hashCode and default init…
shihaohong Jul 15, 2019
f700671
Add missing text style and decoration debugFillProperties
shihaohong Jul 15, 2019
71063db
Update default colors, add test for debugLabel and dark theme
shihaohong Jul 17, 2019
a789fb9
Updated documentation to reflect updated defaults
shihaohong Jul 17, 2019
bfce9be
Incorporate API documentation feedback
Jul 18, 2019
c5eed47
Fix grammar on waitDuration doc
Jul 18, 2019
030a871
Add doc change to Tooltip.preferBelow that reflects change in Tooltip…
Jul 18, 2019
181dc7b
Remove whitespace, add lerp macro doc
shihaohong Jul 18, 2019
7e3dfd7
Fix properties not properly passing to the _TooltipOverlay
shihaohong Jul 18, 2019
82ae05a
Make sample more fun
shihaohong Jul 18, 2019
e7df499
Documentation improvements per feedback by HansMuller
shihaohong Jul 19, 2019
916bee7
Separate tests to ensure that textStyle is properly reflected
shihaohong Jul 22, 2019
921266f
Merge branch 'tooltip-theme' of github.com:shihaohong/flutter into to…
shihaohong Jul 22, 2019
a6061a6
Merge branch 'master' of github.com:flutter/flutter into tooltip-theme
shihaohong Jul 23, 2019
f79f514
Fix tooltipTheme parameter with wrong type
shihaohong Jul 23, 2019
408bf25
Merge branch 'tooltip-theme' of github.com:shihaohong/flutter into to…
shihaohong Jul 23, 2019
dfcaced
Fix debugLabel behavior, updated tests accordingly
shihaohong Jul 24, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/flutter/lib/material.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export 'src/material/time.dart';
export 'src/material/time_picker.dart';
export 'src/material/toggleable.dart';
export 'src/material/tooltip.dart';
export 'src/material/tooltip_theme.dart';
export 'src/material/typography.dart';
export 'src/material/user_accounts_drawer_header.dart';
export 'widgets.dart';
19 changes: 18 additions & 1 deletion packages/flutter/lib/src/material/theme_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import 'slider_theme.dart';
import 'snack_bar_theme.dart';
import 'tab_bar_theme.dart';
import 'text_theme.dart';
import 'tooltip_theme.dart';
import 'typography.dart';

export 'package:flutter/services.dart' show Brightness;
Expand Down Expand Up @@ -155,6 +156,7 @@ class ThemeData extends Diagnosticable {
IconThemeData accentIconTheme,
SliderThemeData sliderTheme,
TabBarTheme tabBarTheme,
TooltipThemeData tooltipTheme,
CardTheme cardTheme,
ChipThemeData chipTheme,
TargetPlatform platform,
Expand Down Expand Up @@ -257,6 +259,7 @@ class ThemeData extends Diagnosticable {

sliderTheme ??= const SliderThemeData();
tabBarTheme ??= const TabBarTheme();
tooltipTheme ??= const TooltipThemeData();
appBarTheme ??= const AppBarTheme();
bottomAppBarTheme ??= const BottomAppBarTheme();
cardTheme ??= const CardTheme();
Expand Down Expand Up @@ -313,6 +316,7 @@ class ThemeData extends Diagnosticable {
accentIconTheme: accentIconTheme,
sliderTheme: sliderTheme,
tabBarTheme: tabBarTheme,
tooltipTheme: tooltipTheme,
cardTheme: cardTheme,
chipTheme: chipTheme,
platform: platform,
Expand Down Expand Up @@ -383,6 +387,7 @@ class ThemeData extends Diagnosticable {
@required this.accentIconTheme,
@required this.sliderTheme,
@required this.tabBarTheme,
@required this.tooltipTheme,
@required this.cardTheme,
@required this.chipTheme,
@required this.platform,
Expand Down Expand Up @@ -438,6 +443,7 @@ class ThemeData extends Diagnosticable {
assert(accentIconTheme != null),
assert(sliderTheme != null),
assert(tabBarTheme != null),
assert(tooltipTheme != null),
assert(cardTheme != null),
assert(chipTheme != null),
assert(platform != null),
Expand Down Expand Up @@ -658,12 +664,17 @@ class ThemeData extends Diagnosticable {
/// A theme for customizing the size, shape, and color of the tab bar indicator.
final TabBarTheme tabBarTheme;

/// A theme for customizing the visual properties of [Tooltip]s.
///
/// This is the value returned from [TooltipTheme.of].
final TooltipThemeData tooltipTheme;

/// The colors and styles used to render [Card].
///
/// This is the value returned from [CardTheme.of].
final CardTheme cardTheme;

/// The colors and styles used to render [Chip], [
/// The colors and styles used to render [Chip]s.
///
/// This is the value returned from [ChipTheme.of].
final ChipThemeData chipTheme;
Expand Down Expand Up @@ -811,6 +822,7 @@ class ThemeData extends Diagnosticable {
IconThemeData accentIconTheme,
SliderThemeData sliderTheme,
TabBarTheme tabBarTheme,
TooltipThemeData tooltipTheme,
CardTheme cardTheme,
ChipThemeData chipTheme,
TargetPlatform platform,
Expand Down Expand Up @@ -870,6 +882,7 @@ class ThemeData extends Diagnosticable {
accentIconTheme: accentIconTheme ?? this.accentIconTheme,
sliderTheme: sliderTheme ?? this.sliderTheme,
tabBarTheme: tabBarTheme ?? this.tabBarTheme,
tooltipTheme: tooltipTheme ?? this.tooltipTheme,
cardTheme: cardTheme ?? this.cardTheme,
chipTheme: chipTheme ?? this.chipTheme,
platform: platform ?? this.platform,
Expand Down Expand Up @@ -1007,6 +1020,7 @@ class ThemeData extends Diagnosticable {
accentIconTheme: IconThemeData.lerp(a.accentIconTheme, b.accentIconTheme, t),
sliderTheme: SliderThemeData.lerp(a.sliderTheme, b.sliderTheme, t),
tabBarTheme: TabBarTheme.lerp(a.tabBarTheme, b.tabBarTheme, t),
tooltipTheme: TooltipThemeData.lerp(a.tooltipTheme, b.tooltipTheme, t),
cardTheme: CardTheme.lerp(a.cardTheme, b.cardTheme, t),
chipTheme: ChipThemeData.lerp(a.chipTheme, b.chipTheme, t),
platform: t < 0.5 ? a.platform : b.platform,
Expand Down Expand Up @@ -1072,6 +1086,7 @@ class ThemeData extends Diagnosticable {
(otherData.accentIconTheme == accentIconTheme) &&
(otherData.sliderTheme == sliderTheme) &&
(otherData.tabBarTheme == tabBarTheme) &&
(otherData.tooltipTheme == tooltipTheme) &&
(otherData.cardTheme == cardTheme) &&
(otherData.chipTheme == chipTheme) &&
(otherData.platform == platform) &&
Expand Down Expand Up @@ -1136,6 +1151,7 @@ class ThemeData extends Diagnosticable {
accentIconTheme,
sliderTheme,
tabBarTheme,
tooltipTheme,
cardTheme,
chipTheme,
platform,
Expand Down Expand Up @@ -1198,6 +1214,7 @@ class ThemeData extends Diagnosticable {
properties.add(DiagnosticsProperty<IconThemeData>('accentIconTheme', accentIconTheme));
properties.add(DiagnosticsProperty<SliderThemeData>('sliderTheme', sliderTheme));
properties.add(DiagnosticsProperty<TabBarTheme>('tabBarTheme', tabBarTheme));
properties.add(DiagnosticsProperty<TooltipThemeData>('tooltipTheme', tooltipTheme));
properties.add(DiagnosticsProperty<CardTheme>('cardTheme', cardTheme));
properties.add(DiagnosticsProperty<ChipThemeData>('chipTheme', chipTheme));
properties.add(DiagnosticsProperty<MaterialTapTargetSize>('materialTapTargetSize', materialTapTargetSize));
Expand Down
Loading