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

add app, app bar and back button #128

Merged
merged 6 commits into from May 30, 2020
Merged

add app, app bar and back button #128

merged 6 commits into from May 30, 2020

Conversation

jaumard
Copy link
Contributor

@jaumard jaumard commented May 27, 2020

fix #122
I also removed UsedTheme to use the existing ThemeMode

@jaumard jaumard changed the title [WIP] add app bar and back button [WIP] add app, app bar and back button May 27, 2020
@jaumard jaumard changed the title [WIP] add app, app bar and back button add app, app bar and back button May 27, 2020
@jaumard
Copy link
Contributor Author

jaumard commented May 28, 2020

I have added a defaultStyle on the theme, the idea is to have a global one that you can merge/override later by providing a specific one. But it will need changes on all components that are currently using NeumorphicStyle, so I'll update those components on another PR to avoir a huge one. That will allow user to have less style to apply across their app.

I also need to add the boxShape on the app bar fields for the button to use that one automatically if specify like we talk earlier, but same I'll do it in another PR.

This one is good to me, let me know what you think

@jaumard
Copy link
Contributor Author

jaumard commented May 29, 2020

I have removed defaultStyle because I finally understand that all field was already on the theme ^^ but not sure those theme fields are used on all components by default, or I didn't understand how it works that's possible

@florent37
Copy link
Member

I see you're doing a lot of changed in this PR, I'll wait until you tell me to review before opening it :)

@florent37 florent37 self-requested a review May 29, 2020 09:03
@florent37 florent37 added enhancement New feature or request widget labels May 29, 2020
@jaumard
Copy link
Contributor Author

jaumard commented May 29, 2020

Yes sorry for that :) I'll not touch it more except to fix your comments. So you can review it.
For now buttons under appBar need manual tweak to look good (basically need to remove button's padding), I plan on fixing that on another PR later by providing an AppBarTheme or something to override the default style when inside an app bar.

@florent37
Copy link
Member

Ok :) I start review it so ! do you have created a sample ?

@florent37
Copy link
Member

yes : main_home.dart

@florent37
Copy link
Member

I think the sample should stay in light mode, my computer is in dark mode & it's ugly here :)

we'll add themeMode: ThemeMode.light, in the root app

then add

 Scaffold(
        backgroundColor: NeumorphicTheme.baseColor(context),

into playground, because the scaffold background color is wierd

@florent37
Copy link
Member

if the appBar uses automaticallyImplyLeading we should add a way to provide an argument of type NeumorphicBoxShape to have for example a circle back button, without defining entierely the leading widget

appBar: NeumorphicAppBar(
     title: "my app",
     leadingBoxShape: NeumorphicBoxShape.circle(),
     ...

for example (i'm not sure of the arg name)

@florent37
Copy link
Member

Oh i forgot, thanks for this MR, the app & appbar implem (fork / wrap of material) is really great !

@florent37
Copy link
Member

NeumorphicBackButton is perfect :)

@jaumard
Copy link
Contributor Author

jaumard commented May 29, 2020

we'll add themeMode: ThemeMode.light, in the root app

Right I didn't test in dark mode ^^

Scaffold(
backgroundColor: NeumorphicTheme.baseColor(context),

There is no need as it's what is done under NeumorphicApp already :)

if the appBar uses automaticallyImplyLeading we should add a way to provide an argument of type NeumorphicBoxShape to have for example a circle back button, without defining entierely the leading widget

Yeah that's the non finished part I was talking about, the idea here is to have a NeumorphicAppBarTheme where you can configure a NeumorphicStyle and a shape and the buttons will retrieve those automatically. But I'll do that in another PR if you don't mind because there is a lot going on here I'm getting a bit lost ^^

Oh i forgot, thanks for this MR

No problem it was cool to do :)

@jaumard
Copy link
Contributor Author

jaumard commented May 29, 2020

I have pushed themeMode: ThemeMode.light, in the root app.

Do you need me to do anymore changes on this ?

@florent37
Copy link
Member

Nope I try again & will merge this :)

@florent37
Copy link
Member

I merge it :) If we have futher work we will do this on master or others PR

@florent37 florent37 merged commit 114882d into Idean:master May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Neumorphic AppBar
2 participants