Reland TabBarTheme normalization (#155969)

Reland https://github.com/flutter/flutter/pull/155476 with test fix.

The test fix uses the method mentioned in https://github.com/flutter/flutter/pull/155476#issuecomment-2377287606.
This commit is contained in:
Qun Cheng
2024-10-01 13:13:52 -07:00
committed by GitHub
parent f7fb0f1cd4
commit 33d3e4bda6
4 changed files with 489 additions and 99 deletions

View File

@@ -12,7 +12,7 @@ class TabsTemplate extends TokenTemplate {
@override
String generate() => '''
class _${blockName}PrimaryDefaultsM3 extends TabBarTheme {
class _${blockName}PrimaryDefaultsM3 extends TabBarThemeData {
_${blockName}PrimaryDefaultsM3(this.context, this.isScrollable)
: super(indicatorSize: TabBarIndicatorSize.label);
@@ -91,7 +91,7 @@ class _${blockName}PrimaryDefaultsM3 extends TabBarTheme {
static const EdgeInsetsGeometry iconMargin = EdgeInsets.only(bottom: 2);
}
class _${blockName}SecondaryDefaultsM3 extends TabBarTheme {
class _${blockName}SecondaryDefaultsM3 extends TabBarThemeData {
_${blockName}SecondaryDefaultsM3(this.context, this.isScrollable)
: super(indicatorSize: TabBarIndicatorSize.tab);