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

ButtonBar applies it's own theme #51144

Closed
lukepighetti opened this issue Feb 20, 2020 · 5 comments
Closed

ButtonBar applies it's own theme #51144

lukepighetti opened this issue Feb 20, 2020 · 5 comments
Assignees
Labels
f: material design flutter/packages/flutter/material repository. found in release: 1.22 Found to occur in 1.22 found in release: 1.26 Found to occur in 1.26 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on r: solved Issue is closed as solved
Projects

Comments

@lukepighetti
Copy link

            ButtonBar(
              alignment: MainAxisAlignment.spaceEvenly,
              children: <Widget>[
                OutlineButton(
                  child: Text("Outline Button"),
                  onPressed: _enabled,
                ),
                OutlineButton(
                  child: Text("Outline Button"),
                  onPressed: _disabled,
                ),
              ],
            ),
            OutlineButton(
              child: Text("Outline Button"),
              onPressed: _enabled,
            ),
            OutlineButton(
              child: Text("Outline Button"),
              onPressed: _disabled,
            ),

Screen Shot 2020-02-20 at 6 02 41 PM

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, v1.15.3, on Mac OS X 10.15.3 19D76, locale en-US)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.42.1)
[✓] Connected device (2 available)

• No issues found!
@TahaTesser TahaTesser added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Feb 21, 2020
@TahaTesser
Copy link
Member

TahaTesser commented Apr 7, 2020

Code Sample

code sample
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Material App Bar'),
        ),
        body: Center(
          child: Column(
            children: <Widget>[
              ButtonBar(
                alignment: MainAxisAlignment.spaceEvenly,
                children: <Widget>[
                  OutlineButton(
                    child: Text("Outline Button"),
                    onPressed: () {},
                  ),
                  OutlineButton(
                    child: Text("Outline Button"),
                    onPressed: null,
                  ),
                ],
              ),
              OutlineButton(
                child: Text("Outline Button"),
                onPressed: () {},
              ),
              OutlineButton(
                child: Text("Outline Button"),
                onPressed: null,
              )
            ],
          ),
        ),
      ),
    );
  }
}
flutter doctor -v
[✓] Flutter (Channel dev, v1.18.0, on Mac OS X 10.15.4 19E266, locale en-GB)
    • Flutter version 1.18.0 at /Users/taha/Code/flutter_dev
    • Framework revision de1e572916 (13 hours ago), 2020-04-06 16:15:07 -0700
    • Engine revision df257e59c2
    • Dart version 2.8.0 (build 2.8.0-dev.20.0 1210d27678)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/taha/Code/sdk
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = /Users/taha/Code/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.4, Build version 11E146
    • CocoaPods version 1.9.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.0.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)

[✓] VS Code (version 1.43.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.9.1

[✓] Connected device (5 available)
    • SM M305F      • 32003c30dc19668f          • android-arm64  • Android 10
      (API 29)
    • Taha’s iPhone • 00008020-001059882212002E • ios            • iOS 13.4
    • macOS         • macOS                     • darwin-x64     • Mac OS X
      10.15.4 19E266
    • Chrome        • chrome                    • web-javascript • Google Chrome
      80.0.3987.149
    • Web Server    • web-server                • web-javascript • Flutter Tools

• No issues found!

@TahaTesser TahaTesser added the has reproducible steps The issue has been confirmed reproducible and is ready to work on label Apr 7, 2020
@pingbird pingbird self-assigned this Jul 29, 2020
@TahaTesser TahaTesser added the found in release: 1.18 Occurs in 1.18 label Jul 30, 2020
@HansMuller
Copy link
Contributor

Using OverflowBar (#62350) instead of ButtonBar, avoids the problem. So would Row of course, however OverflowBar does share ButtonBar's ability to layout its children in a column, when the row of children does not fit.

import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Material App Bar'),
        ),
        body: Center(
          child: Column(
            children: <Widget>[
              OverflowBar(
                spacing: 8,
                children: <Widget>[
                  OutlineButton(
                    child: Text("Outline Button"),
                    onPressed: () {},
                  ),
                  OutlineButton(
                    child: Text("Outline Button"),
                    onPressed: null,
                  ),
                ],
              ),
              OutlineButton(
                child: Text("Outline Button"),
                onPressed: () {},
              ),
              OutlineButton(
                child: Text("Outline Button"),
                onPressed: null,
              )
            ],
          ),
        ),
      ),
    );
  }
}

@pingbird pingbird removed their assignment Jul 31, 2020
@TahaTesser
Copy link
Member

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.22.5 at /Users/tahatesser/Code/flutter_stable
    • Framework revision 7891006299 (3 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.0

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.0

[✓] Connected device (1 available)
    • iPhone 12 (mobile) • 12D8FF8E-2815-436E-9951-B8A6A42E4ACF • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)

! Doctor found issues in 1 category.
[✓] Flutter (Channel master, 1.26.0-2.0.pre.157, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.26.0-2.0.pre.157 at /Users/tahatesser/Code/flutter_master
    • Framework revision 4b83be6c23 (7 hours ago), 2020-12-30 02:09:03 -0500
    • Engine revision 0e5a25d779
    • Dart version 2.12.0 (build 2.12.0-179.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.0

[✓] Connected device (3 available)
    • iPhone 12 (mobile) • 12D8FF8E-2815-436E-9951-B8A6A42E4ACF • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
    • macOS (desktop)    • macos                                • darwin-x64     • macOS 11.1 20C69 darwin-x64
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 87.0.4280.88

• No issues found!

@TahaTesser TahaTesser added found in release: 1.22 Found to occur in 1.22 found in release: 1.26 Found to occur in 1.26 and removed found in release: 1.18 Occurs in 1.18 labels Dec 30, 2020
@TahaTesser
Copy link
Member

TahaTesser commented Feb 18, 2022

ButtonBar is gonna be deprecated soon.
Please use OverflowBar with new material buttons
Closing as this is obsolete.

@TahaTesser TahaTesser added this to To do in Nevercode via automation Feb 18, 2022
@TahaTesser TahaTesser self-assigned this Feb 18, 2022
@TahaTesser TahaTesser moved this from To do to Issue closed with comment in Nevercode Feb 18, 2022
@TahaTesser TahaTesser added the r: solved Issue is closed as solved label Feb 18, 2022
@github-actions
Copy link

github-actions bot commented Mar 4, 2022

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 Mar 4, 2022
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. found in release: 1.22 Found to occur in 1.22 found in release: 1.26 Found to occur in 1.26 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on r: solved Issue is closed as solved
Projects
Status: Issue closed with comment
Nevercode
  
Issue closed with comment
Development

No branches or pull requests

4 participants