Comments (5)
did you tried with frontLayerScrim: Colors.transparent
that should remove the scrimColor.
Sadly to enable user interaction (like tap, etc) behavior: HitTestBehavior.opaque,
in the following code would not allow it:
backdrop/lib/src/scaffold.dart
Lines 515 to 522 in 715f6d7
Suggesting following changes:
- add
HitTestBehavior frontLayerScrimBehaviour
[could also add correspondingbackLayerScrimBehaviour
] - rename
frontLayerScrim
->frontLayerScrimColor
- same forbackLayerScrim
- keep
frontLayerScrim
andbackLayerScrim
for backward compatibility - with deprecation warning - can check how we previously deprecatedfrontLayerBorderRadius
for reference.
@WieFel What are your views on it?
from backdrop.
@lastmeta Backdrop behaviour in MDG defines that the front layer should be inactive when backLayer is revealed, therefore this is the default(hard-coded) behaviour.
from backdrop.
@lastmeta Backdrop behaviour in MDG defines that the front layer should be inactive when backLayer is revealed, therefore this is the default(hard-coded) behaviour.
thats fine. in our case we want to reveal a portion of the backlayer which provides information and is not interacted with. perhaps MDG would suggest we put that information on the front layer but having it on the back and having the front be interactive gives a clean and clear distinction between info and interact portions of the screen.
I was able to create a workaround (rather than a real solution) this problem in the following way:
...
if (_hasFrontLayerScrim) _buildInactiveLayer(context),
...
/// this is not an ideal solution to
/// https://github.com/fluttercommunity/backdrop/issues/117
/// because I don't want the backdrop layer to have access to the streams
/// I'd rather the widget inform the backdrop layer how to behave
/// However, I tried making the `Offstage` in `_buildInactiveLayer` work
/// according to a widget variable which was modified in realtime by
/// `.revealBackLayer(activeFront: true);` but that failed to work, so
/// though this is not the pure top-down solution I was hoping for, it is
/// sufficient for now:
/// look it up how you should build front layer in real time:
bool get _hasFrontLayerScrim => streams.app.page.value == 'Home';
from backdrop.
I think the scrim
can be made optional, therefore re-opening this issue.
Feel free to file PR with changes mentioned above.
from backdrop.
Suggesting following changes:
* add `HitTestBehavior frontLayerScrimBehaviour` [could also add corresponding `backLayerScrimBehaviour`] * rename `frontLayerScrim` -> `frontLayerScrimColor` - same for `backLayerScrim` * keep `frontLayerScrim` and `backLayerScrim` for backward compatibility - with deprecation warning - can check how we previously deprecated `frontLayerBorderRadius` for reference.
@daadu Seems reasonable. LGTM!
from backdrop.
Related Issues (20)
- Merge example and demo project HOT 5
- Abstract out "backdrop core" from `BackdropScaffold`
- Add a shadow to the front layer
- Custom shape on the front layer HOT 7
- Slivers AppBar HOT 7
- cannot paste if backdrop is revealed HOT 6
- I can't get edge swipe to go back to work with BackdropScaffold. Any helpful tips? HOT 1
- flutter beta: SchedulerBinding is now null-safe HOT 2
- BoxShadow on front layer HOT 3
- Backdrop is not compiling after upgrading to Flutter 3.10 HOT 2
- En Flutter 3.10 no compila Por 2 Lineas en el Widget AppBar (brightness y textTheme), las cuales estan en desuso pero el compilador las toma en cuenta, eliminando esas 2 lines el paquete funciona perfectamente HOT 3
- Variable to know if back layer is expanded or collapsed HOT 1
- Manually opening Backdrop HOT 9
- Pressing Back button cause visible frontLayer HOT 10
- Reveal backlayer with natural gestures HOT 1
- Make a parameter out of front layer elevation HOT 6
- BackdropScaffold usage gif example needs an update! HOT 1
- Avoid SubHeader spawn on top of Front Layer HOT 2
- Use AppBar.SystemOverlayStyle instead of AppBar.Brightness 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 backdrop.