Skip to content

Flutter web button margins (Theme managed) (Custom modifications to button themes made by FlexColorScheme) #92

Closed Answered by rydmike
Prayer-RecycleSmart asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Prayer-RecycleSmart thank you for your question.

This is good question and complicated a bit by the different structure of the button themes compared to other component themes.

How to modify materialTapTargetSize on global ThemeData?

First off, as you probably figured out, if you want to set MaterialTapTargetSize globally for everything in your ThemeData to e.g. MaterialTapTargetSize.shrinkWrap you can do that with a simple copyWith on the ThemeData produced by FlexColorScheme:

      theme: FlexThemeData.light(
        scheme: FlexScheme.flutterDash,
        blendLevel: 18,
        appBarOpacity: 0.95,
        subThemesData: const FlexSubThemesData(
          blendOnLevel: 20,
       …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Prayer-RecycleSmart
Comment options

Answer selected by rydmike
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question This issue is a usage question and will be moved to the Discussions section.
2 participants