Comments (7)
@cpboyd
Thanks, this is a nice catch. Using the elevatedColor and defining the UserInterfaceLevel should make the darkmode detection unnessecary. I will try this and if it works as expected I will open an PR for it.
from modal_bottom_sheet.
Hello, while this option is not pre-built for the modal you can still use backdrop blur filter with the modal. Just make the backgroundColor param transparent.
There is an example using it here cupertino_share.dart#L83
from modal_bottom_sheet.
For the second comment, I will try to make to make the back route lighter when the modal pops up in dark mode. Using the ColorFiltered widget should solve this.
from modal_bottom_sheet.
Additional notes: Currently, for my use case (in dark mode with a Scaffold background of black to match Apple's defaults), there's no real discernible difference between the original content and the default showCupertinoModalBottomSheet
overlay (since _CupertinoBottomSheetContainer
also uses the Scaffold background of black).
from modal_bottom_sheet.
@jamesblasco I trying to implement the ColorFilter, but currently not happy with it. Also I don´t have any idea yet how to detect if darkmode is active. Because in lightmode the color changes from white to a light gray on the native components, so I need a different Color or BlendMode. But will try some more things.
from modal_bottom_sheet.
Thanks for trying it out.
You can get the brightness of the Theme and the platformBrightness
MediaQuery.of(context).platformBrightness
Theme.of(context).brightness
I would suggest to use the theme one, maybe to allow to set a custom brightness as a param, don’t know yet
from modal_bottom_sheet.
@jamesblasco With regards to the making it lighter, I looked into how Apple's Mail app handles it...
This corresponds to the hex value of #1C1C1E, but when it fades and has the dark mask effect, it darkens to #141415 as shown below.
It seems Apple ultimately uses the systemBackground
elevatedColor
for both the original view and the popup, which is noticeable when you slide the draft downward. It doesn't dismiss the draft, but leaves it as a card below the original view (with both having elevatedColor
until you discard the draft.
from modal_bottom_sheet.
Related Issues (20)
- sheet package doesn't work with NestedScrollView. HOT 1
- CupertinoScaffold interfere with statusbar color during CupertinoSliverNavigationBar animation
- How to push with 2 stages.
- Sheet (v1.0.0-pre): Animating between sheet routes with go_router HOT 7
- Blurred(frosted glass effect) navi bar contaminating by black edges
- [sheet] Scrollable and Resizable sheet cannot be open with SheetRoute
- Does inside navigation work with showMaterialModalBottomSheet() or just showCupertinoModalBottomSheet() HOT 3
- Why is my showCupertinoModalBottomSheet not zooming out? HOT 2
- [sheet] 1.0.0-pre scrollable.dart SheetState miss devicePixelRatio HOT 6
- Not compatible with flutter 3.13.0 HOT 2
- [sheet] Show cupertino modal? HOT 5
- How to prevent dialog move up when keyboard show?
- Modal bottom sheet drag doesn't animate on some devices HOT 4
- [Sheet] Expands over screen size on keyboard open HOT 1
- showDragHandle and topRadius for showCupertinoModalBottomSheet HOT 1
- [Sheet] Triggering a re-build in child widget within the first 200ms or so seems to fully break the bottom sheet HOT 11
- Incompatible with the latest version of flutter/dart? HOT 11
- Is this project abandoned ? HOT 2
- The demo code version is not fit with README. HOT 3
- 3.0.0-pre version is not compatible with dart SDK 2.17 (flutter 3.0.1) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modal_bottom_sheet.