Flutter: Specify textstyle of Button in Theme - flutter

is it possible to influence the textStyle of a Button through the theme? In this particular case, I want every button label to have a specific fontWeight.
The ButtonTextTheme is only responsible for colors.
I know I can style the child of the button itself but I wanted to have the styling on theme level.
Now I'd need to create a custom Button Widget that does that for me

Related

Different icons and text color in navBar Flutter

I'm working on my flutter project and trying to figure out how to make in bottom navBar make each item in a different color. For example, I have:
[icon]Home [icon]Settings [icon]Help [icon]Chat
I need to make the first item (icon&text) in one color, item2(icon&text) in another color, etc
As on the screenshot. Is that even possible? navBarScreenshot
if you using the bottom navigation bar widget there is a function called selectedItemColor: which can be used to change the color of the selected item or you can just give a container as a widget in BottomNavigationBarItem(icon: Container()) and give it a custom color according to your liking

Flutter set custom border side in textFieldForm

I need to make custom TextFieldForm that have only underline and upperline border
this is what i need to make
is that possible to make this custom style only with TextFormField class

How can I disable background widgets in flutter

What I want to achieve is like when you use the alert dialog widget :
When the dialog box shows everything in the background is darkened and disabled. I want to do that but I don't want to use a dialogbox , I have a Container that slides from the bottom of the screen, it's inside a Stack widget.
How can I achieve this?
Wrap your widget with Scaffold and set the backgroundColor to
// change the color as you like
backgroundColor: Colors.black.withOpacity(0.3),

DropdownButton - don't show popup on tap

I want to show my own page on dropdown button tap, then item selected on page should be set as dropdown button value.
So basically, I need DropdownButton without any popup on tap. When I use onTap still default popup will be shown, how to prevent that?
why you don't use a button instead? or you can try to create an Inkwell put a container on its child and make it look like a button and write your code inside Inkwell OnTap(){}
1- Pass null to items parameter to disable the button.
2- You'll notice icon's color will be grey with disabled button, you can change it by setting color of the icon you send to icon parameter or send color directly to iconDisabledColor parameter.
3- You'll not use value parameter, instead you'll just use hint to show both your hint and your value. and update it using your state management after you pick new value from your own page.
4- Wrap your DropdownButton with GestureDetector or InkWell to show your own page when you tap on the button.
5- If you want to customize your DropdownButton shape, size and more. You can try my new package DropdownButton2. It's simple, easy, based on Flutter's core DropdownButton and have lots of features.

how can i make the same style dropdown menu

How can i make this dropdown style in flutter,
also the CupertinoSwitch color change like this one ---background color white & Button color Amber.
Thanks
You could probably use an AnimatedContainer in combination with the expandable package to achieve most of the UI for this widget.
As for the Cupertino switch, you have a property in the widget itself to set a color when the button is active:
https://api.flutter.dev/flutter/cupertino/CupertinoSwitch/activeColor.html