I'm using the Flash package but every time when I call the showFlash
function and a Flash.dialog
is displayed the screen below the Flash does not detect gestures anymore, only when the flash is dismissed again.
This is my flash which I call all over the app to visualize a successfull action.
void showSuccessNoti({
required String message,
required BuildContext context,
}) {
showFlash(
context: context,
duration: const Duration(seconds: 2),
builder: (context, controller) {
return Flash.dialog(
barrierColor: Colors.transparent,
controller: controller,
alignment: Alignment.topCenter,
borderRadius: const BorderRadius.all(Radius.circular(4)),
backgroundColor: Theme.of(context).backgroundColor,
boxShadows: [
BoxShadow(
color: Colors.black.withOpacity(0.12),
offset: const Offset(3.0, 3.0),
blurRadius: 6,
)
],
margin: const EdgeInsets.only(top: kMediumPadding),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: kMediumPadding,
vertical: kSmallPadding,
),
child: Row(mainAxisSize: MainAxisSize.min, children: <Widget>[
const Icon(
Icons.check_circle,
color: Color(0xFF52C41A),
size: 18.0,
),
const SizedBox(
width: 8,
),
Text(
message,
style: Theme.of(context).textTheme.bodyText2,
)
]),
),
);
},
);
}
This is how I then call the flash inside of my app when the state changes:
BlocConsumer<UpdatePersonalBloc, UpdatePersonalState>(
listener: (context, state) {
if (state.formStatus is SubmissionSuccess) {
showSuccessNoti(
message: L.of(context).updateSuccessAddress,
context: context);
Navigator.pop(context);
} else if (state.formStatus is SubmissionFailed) {
showErrorNoti(
message: L.of(context).updateErrorMessage,
context: context);
}
},
builder: (context, state) {
I would be interested to know if this behaviour is intendet and if it's a bug how it can be fixed.