Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ButtonTextTheme isn't coming through properly #29556

Closed
lukepighetti opened this issue Mar 18, 2019 · 2 comments
Closed

ButtonTextTheme isn't coming through properly #29556

lukepighetti opened this issue Mar 18, 2019 · 2 comments
Labels
f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Comments

@lukepighetti
Copy link

lukepighetti commented Mar 18, 2019

I believe this should render with a Yellow text color, but it renders with a blue one.

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Sandbox',
      theme: ThemeData(
        buttonTheme: ButtonThemeData(
          textTheme: ButtonTextTheme.primary,
        ),
        textTheme: TextTheme(
          button: TextStyle(color: Colors.red),
        ),
        primaryTextTheme: TextTheme(
          button: TextStyle(color: Colors.yellow),
        ),
        accentTextTheme: TextTheme(
          button: TextStyle(color: Colors.green),
        ),
      ),
      home: Scaffold(
        body: SafeArea(
          child: _Home(),
        ),
      ),
    );
  }
}

class _Home extends StatefulWidget {
  @override
  __HomeState createState() => __HomeState();
}

class __HomeState extends State<_Home> {
  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.all(28.0),
      child: Center(
        child: FlatButton(
          child: Text("weeee"),
          onPressed: () => null,
        ),
      ),
    );
  }
}

IMG_7DE4847B50DA-1

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, v1.3.10, on Mac OS X 10.14.3 18D109, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.1)
[✓] VS Code (version 1.32.3)
[✓] Connected device (1 available)

• No issues found!
@HansMuller HansMuller added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Mar 18, 2019
@TahaTesser
Copy link
Member

TahaTesser commented Feb 26, 2020

Duplicate of #29728

@TahaTesser TahaTesser marked this as a duplicate of #29556 Feb 26, 2020
@TahaTesser TahaTesser marked this as a duplicate of #29728 Feb 26, 2020
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

No branches or pull requests

3 participants