Global level
Closed this issue · 3 comments
Hi @mmcc007 ,
Is it possible to make this at global level, say at MaterialApp level, so to avoid defining it in each widget form?
Thanks in advance.
It is intended as a wrapper around widgets that you want to make modal during an async call. There is nothing that can be declared globally, AFAIK.
Thats not true at all @mmcc007, if you have async calls in separate class calling in their own order you want to control HUD globally. I've created stream where I have on/off states and I would like to pass this value to modal hud and main.dart + material app could be perfect place...however app crashes with
flutter: ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ flutter: The following assertion was thrown during performLayout(): flutter: 'package:flutter/src/painting/alignment.dart': Failed assertion: line 530 pos 12: 'direction != flutter: null': is not true.
Hi @rdev-software, if you can show some sample code (in a PR?) that describes your use case (and preferably demonstrating the problem), would be happy to look into supporting it.