Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Can't override the disabled Button Color

  • Emrah KAYA
  • 2024-10-20
  • 2
Can't override the disabled Button Color
  • ok logo

Скачать Can't override the disabled Button Color бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Can't override the disabled Button Color или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Can't override the disabled Button Color бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Can't override the disabled Button Color

Hello everyone! I hope this video has helped solve your questions and issues. This video is shared because a solution has been found for the question/problem. I create videos for questions that have solutions. If you have any other issues, feel free to reach out to me on Instagram:   / ky.emrah  

Below, you can find the text related to the question/problem. In the video, the question will be presented first, followed by the answers. If the video moves too fast, feel free to pause and review the answers. If you need more detailed information, you can find the necessary sources and links at the bottom of this description. I hope this video has been helpful, and even if it doesn't directly solve your problem, it will guide you to the source of the solution. I'd appreciate it if you like the video and subscribe to my channel!Can't override the disabled Button Color

I'm feeling stupid: I can't override the color of a Button when it is disabled.
The code looks good, and I can ensure that the logic of _isDisabled is correct.
_isDisabled
The button:
ElevatedButton(
onPressed: _isDisabled
? null
: () {
//something really fancy
},
style:
ElevatedButton.styleFrom(
backgroundColor: _isDisabled
? Colors.amber
: MyTheme.getCiSonoButtonColor(context: context),
padding: const EdgeInsets.symmetric(
horizontal: 50, vertical: 16
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
),
child: Text('Button'),

ElevatedButton(
onPressed: _isDisabled
? null
: () {
//something really fancy
},
style:
ElevatedButton.styleFrom(
backgroundColor: _isDisabled
? Colors.amber
: MyTheme.getCiSonoButtonColor(context: context),
padding: const EdgeInsets.symmetric(
horizontal: 50, vertical: 16
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
),
child: Text('Button'),

As you can see I'm trying to set the color of the button (when disabled) to Amber, but the result is a light Grey. I really don't know why. It seems like there is a predefined color for the disabled mode.
How to fix this annoying problem?
For clearness I attach a screenshot of the app (look at the Grey button):



NB: when the logic turn the _isDisabled variable to false, the button looks as I want. The problem is when disabled.
_isDisabled
(I've already tried to set the property disabledColor of ThemeData and nothing changed)
disabledColor
ThemeData


Tags: flutter,button,material-design,themesSource of the question:
https://stackoverflow.com/questions/7...

Question and source license information:
https://meta.stackexchange.com/help/l...
https://stackoverflow.com/

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]