Reversion for roll (#22984)

For G3 Roll:

* Revert "MaterialButton must honor its minWidth and height parameters (#22919)"

This reverts commit a02332335a.

* Revert "Update uses of ButtonTheme.bar: pass along the current Theme's colorScheme (#22827)"

This reverts commit 655bf6a290.

* Revert "ButtonTheme.of().colorScheme defers to Theme (#22880)"

This reverts commit a590940e45.

* Revert "Bring TextTheme into alignment with the current Material spec (#22330)"

This reverts commit 8bfb4b3ee5.

* Revert "Added ColorScheme, updated ThemeData, ButtonTheme, material buttons (#22013)"

This reverts commit eea3465ae7.

* Manual adjustments to fix reversion issues.
This commit is contained in:
matthew-carroll
2018-10-11 18:17:46 -07:00
committed by GitHub
parent 74d677b58a
commit 80f80ab08c
35 changed files with 1780 additions and 3059 deletions

View File

@@ -57,7 +57,7 @@ class TypographyDemo extends StatelessWidget {
TextStyleItem(name: 'Body 2', style: textTheme.body2, text: 'Medium 14sp'),
TextStyleItem(name: 'Body 1', style: textTheme.body1, text: 'Regular 14sp'),
TextStyleItem(name: 'Caption', style: textTheme.caption, text: 'Regular 12sp'),
TextStyleItem(name: 'Button', style: textTheme.button, text: 'MEDIUM (ALL CAPS) 14sp'),
TextStyleItem(name: 'Button', style: textTheme.button, text: 'MEDIUM (ALL CAPS) 14sp')
];
if (MediaQuery.of(context).size.width > 500.0) {

View File

@@ -24,23 +24,17 @@ TextTheme _buildTextTheme(TextTheme base) {
ThemeData _buildDarkTheme() {
const Color primaryColor = Color(0xFF0175c2);
const Color secondaryColor = Color(0xFF13B9FD);
final ThemeData base = ThemeData.dark();
final ColorScheme colorScheme = const ColorScheme.dark().copyWith(
primary: primaryColor,
secondary: secondaryColor,
);
return base.copyWith(
primaryColor: primaryColor,
buttonColor: primaryColor,
indicatorColor: Colors.white,
accentColor: secondaryColor,
accentColor: const Color(0xFF13B9FD),
canvasColor: const Color(0xFF202124),
scaffoldBackgroundColor: const Color(0xFF202124),
backgroundColor: const Color(0xFF202124),
errorColor: const Color(0xFFB00020),
buttonTheme: ButtonThemeData(
colorScheme: colorScheme,
buttonTheme: const ButtonThemeData(
textTheme: ButtonTextTheme.primary,
),
textTheme: _buildTextTheme(base.textTheme),
@@ -51,26 +45,19 @@ ThemeData _buildDarkTheme() {
ThemeData _buildLightTheme() {
const Color primaryColor = Color(0xFF0175c2);
const Color secondaryColor = Color(0xFF13B9FD);
final ColorScheme colorScheme = const ColorScheme.light().copyWith(
primary: primaryColor,
secondary: secondaryColor,
);
final ThemeData base = ThemeData.light();
return base.copyWith(
colorScheme: colorScheme,
primaryColor: primaryColor,
buttonColor: primaryColor,
indicatorColor: Colors.white,
splashColor: Colors.white24,
splashFactory: InkRipple.splashFactory,
accentColor: secondaryColor,
accentColor: const Color(0xFF13B9FD),
canvasColor: Colors.white,
scaffoldBackgroundColor: Colors.white,
backgroundColor: Colors.white,
errorColor: const Color(0xFFB00020),
buttonTheme: ButtonThemeData(
colorScheme: colorScheme,
buttonTheme: const ButtonThemeData(
textTheme: ButtonTextTheme.primary,
),
textTheme: _buildTextTheme(base.textTheme),

View File

@@ -649,14 +649,12 @@ void main() {
handle.dispose();
});
testWidgets('overscroll_demo', (WidgetTester tester) async {
final AutomatedTestWidgetsFlutterBinding binding = tester.binding;
binding.addTime(const Duration(seconds: 3));
final SemanticsHandle handle = tester.ensureSemantics();
await tester.pumpWidget(const MaterialApp(home: OverscrollDemo()));
await expectLater(tester, meetsGuideline(textContrastGuideline));
handle.dispose();
});
testWidgets('overscroll_demo $themeName', (WidgetTester tester) async {
final SemanticsHandle handle = tester.ensureSemantics();
await tester.pumpWidget(MaterialApp(theme: theme, home: const OverscrollDemo()));
await expectLater(tester, meetsGuideline(textContrastGuideline));
handle.dispose();
});
testWidgets('page_selector_demo $themeName', (WidgetTester tester) async {
final AutomatedTestWidgetsFlutterBinding binding = tester.binding;