Comments (15)
Hi @AymanProjects, Now the code is as expected. Maybe you need add autofocus: true
in TextFormField
or TextField
.
Example:
Form(
child: TextFormField(
controller: editingController,
autofocus: true,
),
)
from flash.
That solved the problem, Thanks β₯
from flash.
@ming-chu try to remove barrierBlur
and barrierColor
, and set persistent: true
.
barrierBlur
and barrierColor
will block the behind view.
from flash.
I modified the source code and it no longer hides the keyboard.
I just commented the unwanted code as shown in the image.
anyway this is not really elegant and the package is now stored locally with the my project files.
maybe you could make this feature optional ?
from flash.
I have the same issue, how to prevent interrupt the typing when Flash appears?
Any help is appreciated!
from flash.
Hi @AymanProjects, Now the code is as expected. Maybe you need add
autofocus: true
inTextFormField
orTextField
.Example:
Form( child: TextFormField( controller: editingController, autofocus: true, ), )
@ming-chu example:
Line 421 in 839f8c2
from flash.
@sososdk Thanks for your reply.
Here is my case:
I use this lib for the top bar notification, maybe with frequency like 20 times/minutes.
when users typing and respond to the msg, this will interrupt the typing.
from flash.
@ming-chu which one interrupt the typing?
from flash.
@sososdk
I am developing a chat app. I use this lib for showing new message notifications.
When Flash
appears, it blocks the entire screen with overlay and closes the keyboard.
The input will focus again after the Flash
is finished, but the process of typing was interrupted which cannot keep typing when the Flash
show up.
It was fine on flash: ^1.3.1
from flash.
@ming-chu please show me the code about how to display the flash.
from flash.
@sososdk Thanks for the reply and here is the code
showFlash(
context: context,
duration: const Duration(seconds: 2),
persistent: true,
builder: (_, controller) {
return Flash(
controller: controller,
backgroundColor: Colors.white,
brightness: Brightness.light,
boxShadows: [BoxShadow(blurRadius: 4)],
barrierBlur: 3.0,
barrierColor: Colors.black38,
barrierDismissible: true,
behavior: FlashBehavior.floating,
position: FlashPosition.top,
child: FlashBar(
title: Text('You have a new msg!'),
content: Text('hello world~'),
),
);
},
);
from flash.
@ming-chu try to set persistent: false
.
from flash.
after I set persistent: false
it got an exception π€
E/flutter ( 5759): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: 'package:flash/flash.dart': Failed assertion: line 98 pos 14: 'overlay != rootOverlay': overlay can't be the root overlay when persistent is false
E/flutter ( 5759): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
E/flutter ( 5759): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
E/flutter ( 5759): #2 new FlashController (package:flash/flash.dart:98:14)
E/flutter ( 5759): #3 showFlash (package:flash/flash.dart:25:10)
from flash.
@ming-chu try to remove
barrierBlur
andbarrierColor
, and setpersistent: true
.
barrierBlur
andbarrierColor
will block the behind view.
Thanks for the advice, I will try itπ
from flash.
@sososdk
it works!!! Thank you very much!
You are my hero!
from flash.
Related Issues (20)
- QUESTION: is it possible to push a route or dialog in such a way that the Flash is covered behind the new route ? HOT 6
- Error: No named parameter with the name 'foregroundColor' HOT 2
- Dismiss all presented flashes HOT 4
- Error with 'foregroundColor ' HOT 1
- Exception - Expected a value of type 'GlobalKey<NavigatorState>', but got one of type 'Null'
- Cannot reuse a FlashController<dynamic> after disposing it. HOT 3
- RenderFlex overflowed when a dialogs is big and the keyboard is open. HOT 7
- Using of ThemeExtension broke the Flash.bar designs HOT 1
- Null check operator used on a null value HOT 1
- Force disable safe area in FlashBar widget HOT 1
- Add documentation to migarate from `v2.0.x` to `v3.0.x` HOT 3
- Flash.dialog Alternative? HOT 1
- Screen does not detect gestures when FlashBar is shown HOT 2
- Unable to set background using Linear Gradient HOT 2
- Null check on context.showToast(...) HOT 1
- StatusBar brightness changes HOT 6
- Please add migration guide docs HOT 5
- Styling showDialogBlock HOT 2
- Error: The argument type 'BorderRadius?' can't be assigned to the parameter type 'BorderRadiusGeometry' HOT 4
- In my example below, clicking the Top button has no effect. HOT 1
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 flash.