andrehaueisen / flushbar Goto Github PK
View Code? Open in Web Editor NEWCustom widget for Flutter
License: Other
Custom widget for Flutter
License: Other
I was excited to start integrating the FlushBar into my app a few months ago, but got a build error as soon as I add it to my yaml file, so I put it off. Tried again with the new version but got the same error, which is this:
The current Dart SDK version is 2.0.0-dev.61.0.flutter-c95617b19c.
Because [my app name] depends on flushbar >=0.2.6 which requires SDK version >=2.0.0-dev.52.0 <=2.0.0-dev.58.0.flutter-f981f09760, version solving failed.
pub get failed (1)
exit code 1
I also noticed it's listed as Unidentified in the dartlang packages directory now and I couldn't search for it directly anymore. Thought you might want to know, but maybe that's because it's not working. Dunno, but hope I can get it working. Thanks.
Hi there. First of all,
I would like to say - the Flushbar is an amazing package - it can handle most of the cases with ease.
I have however one particular case, where I cannot see how to properly configure / use it. Here is it:
I would like to show a Flushbar when the user is on the app Home page and taps Android hardware back button. The short message pops and says "Tap once more to exit" and stays with certain duration
e.g. 10 seconds. If within the duration
the user taps the back button once more, the app will close, otherwise the message closes and the process can start over. I am able to show the Flushbar with the message, however, while it is open, if the user taps back button one more time, the back button event goes to the Flushbar rather than to the Home page. The side effect is that this tap event closes the Flushbar message rather than be sent to the Home page, where I can handle it.
If I use a standard flutter SnackBar
everything works as I expected - even though the snackbar is visible the back button tap event is sent to the Home page.
Please note, the above behavior is true even though isDismissible = false
.
Any idea how I can overcome the above side effect and properly get Android back button event in my page, when Flushbar is open?
I'll try to explain this issue in my poor english :)
I am currently using Flushbar to show push notifications.
When a notification arrives, a new Flushba" is shown and will be dismissed after 4 seconds.
But, when a new Flushbar is shown and I tap on a button in the current screen to open a new screen/route, that Flushbar is not dismissed and when I go back to the previous screen, the flushbar is there, opened, for ever.
I manage Flushbar from a "main container" that contains all the app, a kind of iOS "appdelegate".
I tried to tell Flushbar to dismiss by implementing RouteObservers (onPush() method) but, ironically, when a flushbar is pushed, routeobservers doesn't observe anymore...
isn't aroundPadding
really a margin? Like Container's margin
property adds space on the outside of the widget, and padding
adds space inside the widget? I expect padding to make space between the left margin and the icon, for example.
Hello, could you update the constraint of your package to match <3.0.0 ?
Hi - this is not an issue. Just checking about iPhone X compatible for TOP flushbar? thank you for the package. Really appreciate it.
When using Bloc, and when it transitions to Error state this is when we want to show the Flushbar. However, calling .show we get error. Is there a way to trigger it after everything has been built?
[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: setState() or markNeedsBuild() called during build. This Overlay widget cannot be marked as needing to build because the framework is already in the process of building widgets. A widget can be marked as needing to be built during the build phase only if one of its ancestors is currently building. This exception is allowed because the framework builds parent widgets before children, which means a dirty descendant will always be built. Otherwise, the framework might not visit this widget during this build phase. The widget on which setState() or markNeedsBuild() was called was: Overlay-[LabeledGlobalKey<OverlayState>#04d73](state: OverlayState#2d026(entries: [OverlayEntry#53c1f(opaque: true; maintainState: false), OverlayEntry#ea687(opaque: false; maintainState: true), OverlayEntry#82953(opaque: true; maintainState: false), OverlayEntry#d6ccf(opaque: false; maintainState: true), OverlayEntry#8a034(opaque: false; maintainState: false)])) The widg<β¦>
@override
Widget build(BuildContext context) {
return BlocBuilder(
bloc: _searchStoreBloc,
builder: (_, SearchStoreState state) {
if(state is SearchStoreError) {
_flushbar = Flushbar(
flushbarStyle: FlushbarStyle.FLOATING,
flushbarPosition: FlushbarPosition.BOTTOM,
backgroundColor: Colors.red,
aroundPadding: EdgeInsets.all(8.0),
borderRadius: 8.0,
message: "Error occurred contacting Server",
duration: Duration(seconds: 5),
)..show(context);
print("print 2");
}
Hey,
I want my snackbar to appear over the bottom navigation bar (and under app bar in case of FlushbarPosition.TOP
). Right now I can achieve this by adding a bigger aroundPadding
, but the snackbar flies over those widgets and I want it to appear from under them, just like the top of the bottom navigation bar was actually the bottom of the screen.
That's my feature request, I guess other people would be grateful for that too :)
Hi,
I put my flushbar on the very top screen (Tabbar Screen) to listen to events from Socket.io. The flushbar works well on Tabbar Screen, but when I Navigator.push to next screen, call Chat Screen, the flushbar still showing. How can I dismiss flushbar on Chat Screen? Thanks in advance.
Hey, thanks for the plugin! Can you add elevation and elevation shadow color properties along with boxShadow?
@AndreHaueisen , thanks for the blocking UI feature!
Could you please also update the FlushbarHelper.createLoading ?
Hello, first of all, i'm sorry for my bad English and knowledge in the field, i'm new in this thing :)
Here are some things i found when i try to implement flushbar in my app
Relevant Code
signIn(String email, String password, BuildContext context) async {
this
._auth
.signInWithEmailAndPassword(email: email, password: password)
.then((user) async {
//settingemail to shared preferences to pass into other screens
sharedPreferences = await SharedPreferences.getInstance();
sharedPreferences.setString("useremail", user.email);
sharedPreferences.commit();
Navigator.of(context).pop();
Navigator.of(context).pushReplacementNamed("/joblist");
}).catchError((e) {
Flushbar()
..message = "error message"
..icon = Icon(
Icons.info_outline,
color: Colors.red,
)
..duration = Duration(seconds: 3)
..leftBarIndicatorColor = Colors.red
..show(context);
});
}
//
Thankyou.
Hi @AndreHaueisen ,
Would it be possible to have our custom indicator widget (such as hourglass) to display at the center of the page when in blocking mode?
Thanks in advance.
Thanks !
If you wish you're welcome to join Awesome Flutter so more people can find your work.
https://github.com/Solido/awesome-flutter
How can I use it with map_view ?
I need to show a flushbar always while the marker is moving (like google maps) ?
if we try to go back via swiping on ios when flushbar is showing toast. it will go back in navigator and flush notification will remain at their positon.
Hi,
When a Flushbar is shown while the keyboard is open the Flushbar is hidden behind it.
When I use a standard Snackbar instead it is shown above the keyboard.
My expectation is that the Flushbar is shown above the keyboard as well.
Regards,
Florian
Hello;
Can the text in the flushbar be dynamic??
Trying to do something like this, but not working
Flushbar( title: 'Hey ${user.fullName}', titleText: Text(user.lastName), message: 'You have successfully logged in ...', duration: Duration(seconds: 2), )..show(context);
Compiler message:
file:///Users/elev/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flushbar-1.4.0/lib/flushbar.dart:235:15
: Error: The method 'detach' isn't defined for the class 'FocusScopeNode'.
- 'FocusScopeNode' is from 'package:flutter/src/widgets/focus_manager.dart'
('file:///Users/elev/Documents/flutter/packages/flutter/lib/src/widgets/focus_manager.dart').
Try correcting the name to the name of an existing method, or defining a method named 'detach'.
focusNode.detach();
^^^^^^
Seems to be because of:
flutter/flutter#31909
Similar issue:
flutter/flutter#31784
I loved FlushBar until I hit an issue yesterday. As part of an upgrade to the latest Flutter release, I was forced to upgrade FlushBar to the latest version. Now, calling FlushBar doesn't do anything. No error is thrown but nothing is displayed. I tried the simple SnackBar but that also doesn't work. The screens flickers briefly but nothing is shown. Any suggestions?
Hi, it would be great if you can add the possibility to add a RichText to titleText and messageText parameters :)
It would be nice to have the possibility to set swipe-directions
Currently it's left and right to dismiss a Flushbar.
It would be nice to also have the possibilities to swipe up (FlushbarPosition.TOP) or swipe down (FlushbarPosition.BOTTOM) to dismiss
Btw. great package! ππ
I would like to use Html widget instead of a Text. Would it be possible to accept and widget as messageText, and not just Text?
Describe the bug
If I show a basic Flushbar
it shows properly. As soon as I add aroundPadding
and borderRadius
, it throws an error. I am running on iOS and using a CupertinoPageScaffold
.
Paste relevant code
Flushbar(
title: "Subscribed",
message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
aroundPadding: EdgeInsets.all(8),
borderRadius: 8,
duration: Duration(seconds: 2),
).show(context);
When the exception was thrown, this was the stack:
flutter: #0 new Flushbar (package:flushbar/flushbar.dart:375:27)
flutter: #1 _ArtistDetailState.subscribeWidget.<anonymous closure> (package:schedule/artist_detail_widget.dart:309:15)
flutter: #2 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:513:14)
flutter: #3 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:568:30)
flutter: #4 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:120:24)
flutter: #5 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:242:9)
flutter: #6 TapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:175:7)
flutter: #7 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:369:9)
flutter: #8 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:73:12)
flutter: #9 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:11)
flutter: #10 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:214:19)
flutter: #11 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:192:22)
flutter: #12 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:149:7)
flutter: #13 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:101:7)
flutter: #14 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:85:7)
flutter: #18 _invoke1 (dart:ui/hooks.dart:223:10)
flutter: #19 _dispatchPointerDataPacket (dart:ui/hooks.dart:144:5)
Wherever i call show(context) for flushbar i get a bunch of errors:
flutter: βββ‘ EXCEPTION CAUGHT BY WIDGETS LIBRARY ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
flutter: The following assertion was thrown building _FocusScopeMarker(dirty):
flutter: A build function returned null.
flutter: The offending widget is: _FocusScopeMarker
flutter: Build functions must never return null. To return an empty space that causes the building widget to
flutter: fill available room, return "new Container()". To return an empty space that takes as little room as
flutter: possible, return "new Container(width: 0.0, height: 0.0)".
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 debugWidgetBuilderValue. (package:flutter/src/widgets/debug.dart:250:7)
flutter: #1 debugWidgetBuilderValue (package:flutter/src/widgets/debug.dart:259:4)
flutter: #2 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3656:7)
flutter: #3 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #4 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #5 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #6 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #7 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #8 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4667:14)
flutter: #9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #10 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #11 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #12 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #13 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #14 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3782:11)
flutter: #15 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #16 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #17 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #18 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4667:14)
flutter: #19 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #20 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #21 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4667:14)
flutter: #22 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #23 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #24 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4667:14)
flutter: #25 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #26 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #27 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #28 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #29 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #30 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #31 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #32 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #33 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4667:14)
flutter: #34 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #35 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #36 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #37 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #38 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #39 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #40 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #41 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #42 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #43 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #44 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #45 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #46 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #47 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #48 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #49 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #50 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #51 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3782:11)
flutter: #52 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #53 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #54 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #55 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4667:14)
flutter: #56 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #57 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #58 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #59 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #60 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #61 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #62 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #63 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #64 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4667:14)
flutter: #65 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #66 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #67 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #68 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #69 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #70 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3782:11)
flutter: #71 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #72 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #73 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #74 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #75 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #76 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #77 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3782:11)
flutter: #78 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #79 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #80 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #81 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4667:14)
flutter: #82 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #83 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #84 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #85 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #86 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #87 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3782:11)
flutter: #88 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #89 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #90 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #91 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4667:14)
flutter: #92 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #93 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #94 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #95 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #96 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #97 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3782:11)
flutter: #98 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #99 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #100 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #101 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #102 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #103 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #104 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #105 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #106 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #107 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4667:14)
flutter: #108 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #109 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #110 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #111 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #112 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #113 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #114 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #115 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #116 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #117 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #118 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #119 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #120 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #121 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #122 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #123 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #124 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #125 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #126 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #127 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #128 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #129 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #130 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3635:5)
flutter: #131 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3782:11)
flutter: #132 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3630:5)
flutter: #133 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2920:14)
flutter: #134 Element.updateChild (package:flutter/src/widgets/framework.dart:2723:12)
flutter: #135 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4450:32)
flutter: #136 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4782:17)
flutter: #137 Element.updateChild (package:flutter/src/widgets/framework.dart:2712:15)
flutter: #138 _TheatreElement.update (package:flutter/src/widgets/overlay.dart:507:16)
flutter: #139 Element.updateChild (package:flutter/src/widgets/framework.dart:2712:15)
flutter: #140 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #141 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #142 StatefulElement.update (package:flutter/src/widgets/framework.dart:3812:5)
flutter: #143 Element.updateChild (package:flutter/src/widgets/framework.dart:2712:15)
flutter: #144 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #145 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #146 ProxyElement.update (package:flutter/src/widgets/framework.dart:3922:5)
flutter: #147 Element.updateChild (package:flutter/src/widgets/framework.dart:2712:15)
flutter: #148 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4674:14)
flutter: #149 Element.updateChild (package:flutter/src/widgets/framework.dart:2712:15)
flutter: #150 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #151 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #152 StatefulElement.update (package:flutter/src/widgets/framework.dart:3812:5)
flutter: #153 Element.updateChild (package:flutter/src/widgets/framework.dart:2712:15)
flutter: #154 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4674:14)
flutter: #155 Element.updateChild (package:flutter/src/widgets/framework.dart:2712:15)
flutter: #156 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4674:14)
flutter: #157 Element.updateChild (package:flutter/src/widgets/framework.dart:2712:15)
flutter: #158 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3666:16)
flutter: #159 Element.rebuild (package:flutter/src/widgets/framework.dart:3508:5)
flutter: #160 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2255:33)
flutter: #161 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:653:20)
flutter: #162 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:214:5)
flutter: #163 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
flutter: #164 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
flutter: #165 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
flutter: #166 _invoke (dart:ui/hooks.dart:128:13)
flutter: #167 _drawFrame (dart:ui/hooks.dart:117:3)
flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
flutter: Another exception was thrown: A build function returned null.
Actually the only location available for the Icon is in the left side, is possible locate the icon in the right side ?
Describe the bug
Unable to run due to focus attachment error. I'm aware of this #6 but I'm on the stable channel and not sure why it is still happening.
Flutter doctor
[β] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F132, locale en-PH)
β’ Flutter version 1.5.4-hotfix.2 at /Users/jongbanaag/Documents/Files/flutter
β’ Framework revision 7a4c33425d (5 weeks ago), 2019-04-29 11:05:24 -0700
β’ Engine revision 52c7a1e849
β’ Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
[β] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
β’ Android SDK at /Users/jongbanaag/Library/Android/sdk
β’ Android NDK location not configured (optional; useful for native profiling support)
β’ Platform android-28, build-tools 28.0.3
β’ Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
β’ All Android licenses accepted.
[β] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
β’ Xcode at /Applications/Xcode.app/Contents/Developer
β’ Xcode 10.2.1, Build version 10E1001
β’ ios-deploy 1.9.4
β’ CocoaPods version 1.6.1
[β] Android Studio (version 3.4)
β’ Android Studio at /Applications/Android Studio.app/Contents
β’ Flutter plugin version 35.3.1
β’ Dart plugin version 183.6270
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[β] VS Code (version 1.34.0)
β’ VS Code at /Applications/Visual Studio Code.app/Contents
β’ Flutter extension version 3.0.2
[β] Connected device (2 available)
β’ Drex β’ e592cf9cc8c43b20f195fdd5a0db29be1068f795 β’ ios β’ iOS 12.3.1
β’ iPhone Xs β’ 5E0528FE-478A-423E-AA2B-478469E20552 β’ ios β’ com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)
β’ No issues found!
Thanks for the feedback :)
I am getting the FocusScopeNode error all of a sudden. I see that more people are experiencing this and that there is some major Flutter/Dart update that is causing this.
All of a sudden, out of the blue today, I suddenly could not run my app.
I hadn't updated anything that I know of, not the pubspec.yaml or installed a new version of Flutter.
I've been running flushbar v1.2.1 and I haven't had any trouble.
Now that I got this issue, I see that the flushbar was updated today to v1.6.0, probably around the similar time that my code stopped working.
Here is my Flutter Doctor -v
[β] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F132, locale en-IS)
β’ Flutter version 1.5.4-hotfix.2 at /Users/ori.annas/flutter
β’ Framework revision 7a4c33425d (5 weeks ago), 2019-04-29 11:05:24 -0700
β’ Engine revision 52c7a1e849
β’ Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
[β] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
β’ Android SDK at /Users/ori.annas/Library/Android/sdk
β’ Android NDK location not configured (optional; useful for native profiling support)
β’ Platform android-28, build-tools 28.0.3
β’ Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
β’ All Android licenses accepted.
[β] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
β’ Xcode at /Applications/Xcode.app/Contents/Developer
β’ Xcode 10.2.1, Build version 10E1001
β’ ios-deploy 1.9.4
β’ CocoaPods version 1.6.0.beta.1
[β] Android Studio (version 3.4)
β’ Android Studio at /Applications/Android Studio.app/Contents
β’ Flutter plugin version 35.3.1
β’ Dart plugin version 183.6270
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[β] Connected device (2 available)
β’ Android SDK built for x86 β’ emulator-5554 β’ android-x86 β’ Android 8.1.0 (API 27) (emulator)
β’ iPhone XΚ β’ 473D4A7D-7473-4CAB-87AB-C474EBFAC701 β’ ios β’ com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)
β’ No issues found!
And here is a part of my pubspec.yaml
I tried using either flushbar v1.2.1 and v.1.5.3, but what ever do, it seems that it still always installs v.1.6.0 and I don't understand why.
Why can't I use v.1.2.1 or v.1.5.3 all of a sudden? And what can I do to be able to keep running my app?
Thank you in advance for the help!
First, sorry for my English...
There are three exception:
1.quick click button twice, then click navigator bar back icon, it will not pop at first time ,need click back twice.
2.click 'toast' button once, when flushbar dismissing, click 'toast' again, it doesn't show.
3.click 'toast' and wait a second, before it dismiss, click 'toast' again, then wait, about one second after, it whill cause a exception.
Then, here is my code:
import 'package:flutter/material.dart';
import 'package:flushbar/flushbar.dart';
void main() => runApp(MaterialApp(
home: MyApp(),
routes: <String, WidgetBuilder>{
'/two': (context) => TwoButton(),
},
));
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(
title: Text('test'),
),
body: Center(
child: RaisedButton(
child: Text('go'),
onPressed: () {
Navigator.pushNamed(context, '/two');
},
),
),
);
}
class TwoButton extends StatefulWidget {
@override
State<StatefulWidget> createState() => _TwoButtonState();
}
class _TwoButtonState extends State<TwoButton> {
@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(
title: Text('twp'),
),
body: ListView(
children: <Widget>[
RaisedButton(
child: Text('toast'),
onPressed: () {
Flushbar(
message: 'toast',
duration: const Duration(seconds: 2),
isDismissible: true,
).show(context);
},
),
Text("""
1.quick click button twice, then click navigator bar back icon, it will not pop at first time ,need click back twice.
2.click 'toast' button once, when flushbar dismissing, click 'toast' again, it doesn't show.
3.click 'toast' and wait a second, before it dismiss, click 'toast' again, then wait, about one second after, it whill cause a exception:
E/flutter (31575): [ERROR:flutter/shell/common/shell.cc(181)] Dart Error: Unhandled exception:
E/flutter (31575): NoSuchMethodError: The method 'stop' was called on null.
E/flutter (31575): Receiver: null
E/flutter (31575): Tried calling: stop(canceled: true)
E/flutter (31575): #0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:48:5)
E/flutter (31575): #1 AnimationController.stop (package:flutter/src/animation/animation_controller.dart:556:13)
E/flutter (31575): #2 AnimationController._animateToInternal (package:flutter/src/animation/animation_controller.dart:433:5)
E/flutter (31575): #3 AnimationController.reverse (package:flutter/src/animation/animation_controller.dart:381:12)
E/flutter (31575): #4 _FlushbarState._configureTimer.<anonymous closure> (package:flushbar/flushbar.dart:252:24)
E/flutter (31575): #5 Timer._createTimer.<anonymous closure> (dart:async/runtime/libtimer_patch.dart:21:15)
"""),
],
),
);
}
and my flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[β] Flutter (Channel beta, v0.7.3, on Microsoft Windows [Version 10.0.17134.228], locale zh-CN)
[β] Android toolchain - develop for Android devices (Android SDK 28.0.2)
[β] Android Studio (version 3.1)
[!] IntelliJ IDEA Ultimate Edition (version 2018.2)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[β] Connected devices (1 available)
! Doctor found issues in 1 category.
flushbar: ^0.8.3
**Before reporting **
Make sure you restarted the IDE, especially after an update.
Make sure to perform a clean build, especially after an update.
If the error persists, you are in the right place.
Describe the bug
A clear and concise description of what the bug is.
Paste relevant code
Give me a taste of what you are doing so I can be directed towards the error.
**Screenshots **
If you have some screenshots, that is where you will put them.
Thanks for the feedback :)
Clicking on the last box does not disappear.
I didn't solve your problem yesterday. Please take a look and use your demo urgently.
Hi @AndreHaueisen ,
When calling the loading in progress flushbar, is it possible to block the UI input? If it is not within the scope of the package, then can you please suggest me how should I do it with flushbar? The flushbar is really cool and I definitely want it to be in my app.
Thanks in advance.
**Before reporting **
Make sure you restarted the IDE, especially after an update.
Make sure to perform a clean build, especially after an update.
If the error persists, you are in the right place.
Describe the bug
A clear and concise description of what the bug is.
Paste relevant code
Give me a taste of what you are doing so I can be directed towards the error.
**Screenshots **
If you have some screenshots, that is where you will put them.
Thanks for the feedback :)
Is there a way to specify the speed it takes to show the snackbar?
I would like to speed it up so it shows quicker than what it does normally as i feel it displays slower than the standard snackbar.
Thanks.
Thank you ! Great library, love the high customization !
It would be useful to have a way to trigger on action when the bar is tapped (for exemple in case of a notification, to trigger a navigation).
Hey there,
First of all, thanks for creating this great library :-).
In my current project we have a custom IconSet, which we would like to use with this, however the implementation has the icon argument locked to being a material Icon
.
Is there any chance of being able to provide a custom one?
Cheers,
Joel.
This code throws an a UI error on iOS:
Flushbar(
title: "Password Reset Failed",
duration: Duration(seconds: 3),
flushbarStyle: FlushbarStyle.GROUNDED,
leftBarIndicatorColor: Colors.red[300],
).show(context);
This works though
Flushbar(
title: "Password Reset Failed",
message: "",
duration: Duration(seconds: 3),
flushbarStyle: FlushbarStyle.GROUNDED,
leftBarIndicatorColor: Colors.red[300],
).show(context);
When I listen to onStatusChanged, it never gets triggered.
flushbar.onStatusChanged = (FlushbarStatus status) {
print('Status: $status');
};
flutter v1.2.1
flushbar: ^1.2.4
Whenever I create a Flushbar on an iPhone X/XS device there is a gap between the bottom of the screen and the Flushbar. Ideally, the background would colour this part of the screen.
Hi! Great library, very convenient :)
I've been wondering if it's worth adding a binding in Flushbar to allow people to align their text. For example:
Flushbar(
messageText: const Text(
'Check this out!',
textAlign: TextAlign.center
)
);
This has no effect currently, because the Text
doesn't scale to the width of the screen - and as far as I can tell, there's no way to actually enforce this from outside of the Flushbar library itself. It looks like we'd just have to wrap the actual messageText in some container that allows for maximum width. Perhaps it could be an additional option?
If you think this is worth it, I might be able to take a shot at it if needed! It appears (at least to me) to look nicer if shorter messages (such as the example above) can be aligned into the center.
this is good library currently that i use, but i got some odd behavior when flushbar show in i swipe back to previous screen i go error , maybe there is something to do in super.dispose();
Describe the bug
After firing another call to show a flushbar, the previous doesnt dissapear and stays infinitely long.
Paste relevant code
/// Displays a snackbar message for the current scaffold. void showInSnackBar(String value, [String type="Warning", int duration=2]) { Flushbar(forwardAnimationCurve: Curves.bounceIn, reverseAnimationCurve: Curves.easeOut,) ..icon = Icon( Icons.info_outline, size: 28.0, color: Colors.blue[300], ) ..title = type ..message = value ..duration = Duration(seconds: 2) ..show(context); }
**Screenshots **
Not really required I think.
[β] Flutter (Channel master, v1.5.5-pre.15, on Mac OS X 10.14.4 18E226, locale fr-FR)
[β] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[β] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
[β] Android Studio (version 3.4)
[β] VS Code (version 1.31.1)
I get this compilation error:
I'm aware of iOS back swipe issue. This issue was fixed here but a recent change on the Flutter platform broke it again.
Adding to that, some users don't like the fact that Android back button dismisses Flushbar.
For those reasons I will be working on a different rounting solution to the package. @huzhiren sugested overlays
and after some research, it looks like a possible solution.
Any help or feedback are welcome.
It is fantastic to have flushbar, but it really mangles with the route state if you need to show flushbar at the same time you want to pop back to another page, which can also happen when user tap the back button on the phone.
Hi, i can't install on my app , i get this error on dart analysis.
i added the pubspec dependecie and import the package into the dart file, but i get this:
error: Target of URI doesn't exist: 'package:flushbar/flushbar.dart'. (uri_does_not_exist at .......)
flutter doctor -v
[β] Flutter (Channel dev, v0.9.2, on Microsoft Windows [VersiΓΒ³n 10.0.14393], locale es-US)
β’ Flutter version 0.9.2 at c:\flutter
β’ Framework revision 85b4670b2a (7 days ago), 2018-09-19 14:59:23 -0700
β’ Engine revision 2e8e96fad1
β’ Dart version 2.1.0-dev.4.0.flutter-4eb879133a
[β] Android toolchain - develop for Android devices (Android SDK 28.0.3)
β’ Android SDK at C:\Users\Alex\AppData\Local\Android\sdk
β’ Android NDK location not configured (optional; useful for native profiling support)
β’ Platform android-28, build-tools 28.0.3
β’ Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
β’ All Android licenses accepted.
[β] Android Studio (version 3.2)
β’ Android Studio at C:\Program Files\Android\Android Studio
β’ Flutter plugin version 28.0.2
β’ Dart plugin version 181.5616
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[β] Connected devices (2 available)
β’ ONE E1005 β’ 1ab62aa4 β’ android-arm β’ Android 7.1.2 (API 25)
β’ MIX β’ 6539389a β’ android-arm64 β’ Android 8.0.0 (API 26)
β’ No issues found!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.