Coder Social home page Coder Social logo

Comments (4)

Mounix99 avatar Mounix99 commented on June 9, 2024 1

Hm, I have tried this options, but it doesn't help. I've managed to achieve what I need by copyWith method for Theme data and set DialogTheme with shape parameter

from flex_color_scheme.

rydmike avatar rydmike commented on June 9, 2024

Without more information on how your FlexColorScheme theme definitions look like and are made, it is not possible to answer your question with any significant detail.

Please provide a runnable code reproduction sample, reproducing the current result and describe the result you are expecting.

Meanwhile, a few hints and suggestions on what to look into

By default, if M3 mode is used in FlexColorScheme, radius of dialogs are the same as as with vanilla ThemeData, as shown here:

Screenshot 2024-03-29 at 16 15 24

One possibility is of course that you have set the global default theme radius in your FlexColorScheme too, in its M3 mode, to something custom like 4 or 8. Only at its default undefined setting value, will all components use their default value that varies by component type in M3 mode design. If the value is set, then in that case pretty much every corner radius will use that value, as also explained in the Themes Playground and API docs:

Screenshot 2024-03-29 at 16 17 53

Screenshot 2024-03-29 at 16 19 42

Even if it is the case, that you want eg 8dp on most other components (a very common design), but not on Dialogs, you can specify the radius value for each dialog component theme separately as well and it will the override the global setting. So if you want 28dp back, then use that, it is enough to set it on the general dialog, TimePicker and and DatePicker will follow, but you can if you want to, also give them other values.

Screenshot 2024-03-29 at 16 26 49

Screenshot 2024-03-29 at 16 29 38


TIP
With FlexColorScheme you can even have platform adaptive responses to border radius on many components, so it can look different on e.g. Android and iOS, as well as remove the elevation tint used in Material3 on none Android platforms. These feature are intended to enable more platform agnostic designs when Material3 mode is used on e.g. iOS, desktop and web platform, while keeping M3 Android look on Android.

from flex_color_scheme.

rydmike avatar rydmike commented on June 9, 2024

Hi @Mounix99, sadly without seeing your code or a sample that reproduces the same issue, to be able to figure out what goes wrong were, there is unfortunately not much else I can advice with or do.

It works in all tests and samples. Clearly there is something different with your use case, but I would need more info to be able figure out what it is. Still, glad if you can get it to work as desired with copyWith, even if it should not be needed based on your description of your use case.

from flex_color_scheme.

Mounix99 avatar Mounix99 commented on June 9, 2024

Sorry, I would like but I can't share the code of this project, maybe I'll prepare a sample in future, if I will have time, thanks for help!

from flex_color_scheme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.