Custom widget for Flutter

Related tags

UI flushbar
Overview

Flushbar

Use this package if you need more customization when notifying your user. For Android developers, it is made to substitute toasts and snackbars. IOS developers, I don't know what you use there, but you will like it.

See the install instructions.

Quick reference

Since customization requires a lot of properties, here is a quick cheatsheet:

Property What does it do
title The title displayed to the user
message The message displayed to the user.
titleText Replaces [title]. Although this accepts a [widget], it is meant to receive [Text] or [RichText]
messageText Replaces [message]. Although this accepts a [widget], it is meant to receive [Text] or [RichText]
icon You can use any widget here, but I recommend [Icon] or [Image] as indication of what kind of message you are displaying. Other widgets may break the layout
shouldIconPulse An option to animate the icon (if present). Defaults to true.
maxWidth Used to limit Flushbar width (usually on large screens)
margin Adds a custom margin to Flushbar
padding Adds a custom padding to Flushbar. The default follows material design guide line
borderRadius Adds a radius to all corners of Flushbar. Best combined with [margin]. I do not recommend using it with [showProgressIndicator] or [leftBarIndicatorColor]
borderColor Adds a border to every side of Flushbar. I do not recommend using it with [showProgressIndicator] or [leftBarIndicatorColor]
borderWidth Changes the width of the border if [borderColor] is specified
backgroundColor Flushbar background color. Will be ignored if [backgroundGradient] is not null.
leftBarIndicatorColor If not null, shows a left vertical bar to better indicate the humor of the notification. It is not possible to use it with a [Form] and I do not recommend using it with [LinearProgressIndicator].
boxShadows The shadows generated by Flushbar. Leave it null if you don't want a shadow. You can use more than one if you feel the need. Check this example
backgroundGradient Flushbar background gradient. Makes [backgroundColor] be ignored.
mainButton Use if you need an action from the user. [FlatButton] is recommended here.
onTap A callback that registers the user's click anywhere. An alternative to [mainButton]
duration How long until Flushbar will hide itself (be dismissed). To make it indefinite, leave it null.
isDismissible Determines if the user can swipe or click the overlay (if [routeBlur] > 0) to dismiss. It is recommended that you set [duration] != null if this is false. If the user swipes to dismiss or clicks the overlay, no value will be returned.
dismissDirection FlushbarDismissDirection.VERTICAL by default. Can also be [FlushbarDismissDirection.HORIZONTAL] in which case both left and right dismiss are allowed.
flushbarPosition Flushbar can be based on [FlushbarPosition.TOP] or on [FlushbarPosition.BOTTOM] of your screen. [FlushbarPosition.BOTTOM] is the default.
flushbarStyle Flushbar can be floating or be grounded to the edge of the screen. If grounded, I do not recommend using [margin] or [borderRadius]. [FlushbarStyle.FLOATING] is the default
forwardAnimationCurve The [Curve] animation used when show() is called. [Curves.easeOut] is default.
reverseAnimationCurve The [Curve] animation used when dismiss() is called. [Curves.fastOutSlowIn] is default.
animationDuration Use it to speed up or slow down the animation duration
showProgressIndicator true if you want to show a [LinearProgressIndicator]. If [progressIndicatorController] is null, an infinite progress indicator will be shown
progressIndicatorController An optional [AnimationController] when you want to control the progress of your [LinearProgressIndicator]. You are responsible for controlling the progress
progressIndicatorBackgroundColor a [LinearProgressIndicator] configuration parameter.
progressIndicatorValueColor a [LinearProgressIndicator] configuration parameter.
barBlur Default is 0.0. If different than 0.0, blurs only Flushbar's background. To take effect, make sure your [backgroundColor] has some opacity. The greater the value, the greater the blur.
blockBackgroundInteraction Determines if user can interact with the screen behind it. If this is false, [routeBlur] and [routeColor] will be ignored
routeBlur Default is 0.0. If different than 0.0, creates a blurred overlay that prevents the user from interacting with the screen. The greater the value, the greater the blur. It does not take effect if [blockBackgroundInteraction] is false
routeColor Default is [Colors.transparent]. Only takes effect if [routeBlur] > 0.0. Make sure you use a color with transparency e.g. Colors.grey[600].withOpacity(0.2). It does not take effect if [blockBackgroundInteraction] is false
userInputForm A [TextFormField] in case you want a simple user input. Every other widget is ignored if this is not null.
onStatusChanged a callback for you to listen to the different Flushbar status

Quick tip

If you use a lot of those properties, it makes sense to make a factory to help with your Flushbar's base appearance. Things like shadows, padding, margins, text styles usually don't change within the app. Take a look at FlushbarHelper class and use it as an example.

We are on YouTube!

While studying Flutter I stumbled on two amazing tutorials on how to use Flushbar. Make sure you show those guys some love.

  1. A beginners tutorial by Matej Rešetár
  2. A more advanced usage by Javier González Rodríguez

Getting Started

The examples bellow were updated for version 1.3.0. Changes might have been made. See the changelog if any of the examples do not reflect Flushbar's current state.

The possibilities

Flushbar Animated

A basic Flushbar

The most basic Flushbar uses only a message. Failing to provide it before you call show() will result in a runtime error. Duration, if not provided, will create an infinite Flushbar, only dismissible by code, back button clicks, or a drag (case isDismissible is set to true).

  • Note that only message is a required parameter. All the other ones are optional
class YourAwesomeApp extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'YourAwesomeApp',
      home: Scaffold(
        Container(
          child: Center(
            child: MaterialButton(
              onPressed: (){
                Flushbar(
                  title:  "Hey Ninja",
                  message:  "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
                  duration:  Duration(seconds: 3),              
                )..show(context);
              },
            ),
          ),
        ),
      ),
    );
  }
}

Basic Example

Lets get crazy Flushbar

Here is how customized things can get.

Flushbar(
      title: "Hey Ninja",
      message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
      flushbarPosition: FlushbarPosition.TOP,
      flushbarStyle: FlushbarStyle.FLOATING,
      reverseAnimationCurve: Curves.decelerate,
      forwardAnimationCurve: Curves.elasticOut,
      backgroundColor: Colors.red,
      boxShadows: [BoxShadow(color: Colors.blue[800], offset: Offset(0.0, 2.0), blurRadius: 3.0)],
      backgroundGradient: LinearGradient(colors: [Colors.blueGrey, Colors.black]),
      isDismissible: false,
      duration: Duration(seconds: 4),
      icon: Icon(
        Icons.check,
        color: Colors.greenAccent,
      ),
      mainButton: FlatButton(
        onPressed: () {},
        child: Text(
          "CLAP",
          style: TextStyle(color: Colors.amber),
        ),
      ),
      showProgressIndicator: true,
      progressIndicatorBackgroundColor: Colors.blueGrey,
      titleText: Text(
        "Hello Hero",
        style: TextStyle(
            fontWeight: FontWeight.bold, fontSize: 20.0, color: Colors.yellow[600], fontFamily: "ShadowsIntoLightTwo"),
      ),
      messageText: Text(
        "You killed that giant monster in the city. Congratulations!",
        style: TextStyle(fontSize: 18.0, color: Colors.green, fontFamily: "ShadowsIntoLightTwo"),
      ),
    );

Complete Example

  • Don't forget to call show() or the bar will stay hidden.
  • To deactivate any of those properties, pass null to it.

Styles

Flushbar can be either floating or grounded to the edge of the screen. I don't recommend using margin or borderRadius if you chose FlushbarStyle.GROUNDED style.

Flushbar(flushbarStyle: FlushbarStyle.FLOATING)

or

Flushbar(flushbarStyle: FlushbarStyle.GROUNDED)
Floating Style Grounded Style
Floating Style Grounded Style

Padding and Border Radius

You can give it some padding and a border radius. Works best with FlushbarStyle.FLOATING

Flushbar(
  margin: EdgeInsets.all(8),
  borderRadius: 8,
);
  

Padding and Radius

Left indicator bar

Flushbar has a lateral bar to better convey the humor of the notification. To use it, simple give leftBarIndicatorColor a color.

Flushbar(
  message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
  icon: Icon(
    Icons.info_outline,
    size: 28.0,
    color: Colors.blue[300],
    ),
  duration: Duration(seconds: 3),
  leftBarIndicatorColor: Colors.blue[300],
)..show(context);

Left indicator example

Customize your text

If you need a more fancy text, you can use Text or RichText and pass it to the titleText or messageText variables.

  • Note that title will be ignored if titleText is not null
  • Note that message will be ignored if messageText is not null
Flushbar(
  title: "Hey Ninja", //ignored since titleText != null
  message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry", //ignored since messageText != null
  titleText: Text("Hello Hero", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0 color: Colors.yellow[600], fontFamily:"ShadowsIntoLightTwo"),),
  messageText: Text("You killed that giant monster in the city. Congratulations!", style: TextStyle(fontSize: 16.0, color: Colors.green[fontFamily: "ShadowsIntoLightTwo"),),
)..show(context);

Customized Text

Customize background and shadow

You can paint the background with any color you want. You can use any shadow you want. Just give it a backgroundColor and boxShadows.

Flushbar(
  title: "Hey Ninja",
  message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
  backgroundColor: Colors.red,
  boxShadows: [BoxShadow(color: Colors.red[800], offset: Offset(0.0, 2.0), blurRadius: 3.0,)],
)..show(context);

Background and Shadow

Want a gradient in the background? No problem.

  • Note that backgroundColor will be ignored while backgroundGradient is not null
Flushbar(
  title: "Hey Ninja",
  message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
  backgroundGradient: LinearGradient(colors: [Colors.blue, Colors.teal]),
  backgroundColor: Colors.red,
  boxShadows: [BoxShadow(color: Colors.blue[800], offset: Offset(0.0, 2.0), blurRadius: 3.0,)],
)..show(context);

Background Gradient

Icon and button action

Let us put a Icon that has a PulseAnimation. Icons have this animation by default and cannot be changed as of now. Also, let us put a button. Have you noticed that show() returns a Future? This Future will yield a value when you call dismiss([T result]). I recommend that you specify the result generic type if you intend to collect an user input.

Flushbar flush;
bool _wasButtonClicked;
@override
  Widget build(BuildContext context) {
    return Container(
      child: Center(
        child: MaterialButton(
          onPressed: () {
            flush = Flushbar<bool>(
              title: "Hey Ninja",
              message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
              icon: Icon(
                       Icons.info_outline,
                       color: Colors.blue,),
              mainButton: FlatButton(
                             onPressed: () {
                                 flush.dismiss(true); // result = true
                               },
                             child: Text(
                               "ADD",
                               style: TextStyle(color: Colors.amber),
                             ),
                           ),) // <bool> is the type of the result passed to dismiss() and collected by show().then((result){})
              ..show(context).then((result) {
                setState(() { // setState() is optional here
                  _wasButtonClicked = result;
                });
              });
          },
        ),
      ),
    );
  }

Icon and Button

Flushbar position

Flushbar can be at FlushbarPosition.BOTTOM or FlushbarPosition.TOP.

Flushbar(
  flushbarPosition: FlushbarPosition.TOP,
  title: "Hey Ninja",
  message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry",)..show(context);

Bar position

Duration and dismiss policy

By default, Flushbar is infinite. To set a duration, use the duration property. By default, Flushbar is dismissible by the user. A right or left drag will dismiss it. Set isDismissible to false to change this behaviour.

Flushbar(
  title: "Hey Ninja",
  message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
  duration: Duration(seconds: 3),
  isDismissible: false,
)..show(context);

Progress Indicator

If you are loading something, use a LinearProgressIndicator If you want an undetermined progress indicator, do not set progressIndicatorController. If you want a determined progress indicator, you now have full control over the progress since you own the AnimationController

  • There is no need to add a listener to your controller just to call setState(){}. Once you pass in your controller, Flushbar will do this automatically. Just make sure you call _controller.forward()
AnimationController _controller = AnimationController(
      vsync: this,
      duration: Duration(seconds: 3),
    );

Flushbar(
  title: "Hey Ninja",
  message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
  showProgressIndicator: true,
  progressIndicatorController: _controller,
  progressIndicatorBackgroundColor: Colors.grey[800],
)..show(context);

Show and dismiss animation curves

You can set custom animation curves using forwardAnimationCurve and reverseAnimationCurve.

Flushbar(
  forwardAnimationCurve: Curves.decelerate,
  reverseAnimationCurve: Curves.easeOut,
  title: "Hey Ninja",
  message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
)..show(context);

Listen to status updates

You can listen to status update using the onStatusChanged property.

  • Note that when you pass a new listener using onStatusChanged, it will activate once immediately so you can check in what state the Flushbar is.
Flushbar flushbar = Flushbar(title: "Hey Ninja", message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry");

  flushbar
    ..onStatusChanged = (FlushbarStatus status) {
      switch (status) {
        case FlushbarStatus.SHOWING:
          {
            doSomething();
            break;
          }
        case FlushbarStatus.IS_APPEARING:
          {
            doSomethingElse();
            break;
          }
        case FlushbarStatus.IS_HIDING:
          {
            doSomethingElse();
            break;
          }
        case FlushbarStatus.DISMISSED:
          {
            doSomethingElse();
            break;
          }
      }
    }
    ..show(context);

Input text

Sometimes we just want a simple user input. Use the propertyuserInputForm.

  • Note that buttons, messages, and icons will be ignored if userInputForm != null
  • dismiss(result) will yield result. dismiss() will yield null.
Flushbar<List<String>> flush;
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
TextFormField getFormField(String text) {
    return TextFormField(
      initialValue: text,
      style: TextStyle(color: Colors.white),
      maxLength: 100,
      maxLines: 1,
      maxLengthEnforced: true,
      decoration: InputDecoration(
          fillColor: Colors.white10,
          filled: true,
          icon: Icon(
            Icons.label,
            color: Colors.grey[500],
          ),
          border: UnderlineInputBorder(),
          helperText: "Helper Text",
          helperStyle: TextStyle(color: Colors.grey),
          labelText: "Label Text",
          labelStyle: TextStyle(color: Colors.grey)),
    );
  }

flush = Flushbar<List<String>>(
  userInputForm = Form(
          key: _formKey,
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: [
              getTextFormField("Initial Value"),
              getTextFormField("Initial Value Two"),
            ]
            Align(
              alignment: Alignment.bottomRight,
              child: Padding(
                padding: const EdgeInsets.only(top: 8.0),
                child: MaterialButton(
                  textColor: Colors.amberAccent,
                  child: Text("SUBMIT"),
                  onPressed: () {
                    flush.dismiss([_controller1.value.text, _controller2.value.text]);
                  },
                ),
              ),
            )
          ],),),
)..show(context).then((result) {
        if (result != null) {
          String userInput1 = result[0];
          String userInput2 = result[1];
        }
      });

This example tries to mimic the Material Design style guide

Bar input

Flushbar Helper

I made a helper class to facilitate the creation of the most common Flushbars.

FlushbarHelper.createSuccess({message, title, duration});
FlushbarHelper.createInformation({message, title, duration});
FlushbarHelper.createError({message, title, duration});
FlushbarHelper.createAction({message, title, duration flatButton});
FlushbarHelper.createLoading({message,linearProgressIndicator, title, duration, progressIndicatorController, progressIndicatorBackgroundColor});
FlushbarHelper.createInputFlushbar({textForm});

Make it rain

Buy Me A Coffee

Comments
  • flutter run error: Error: The method 'FlushbarRoute.install' has more required arguments than those of overridden method 'OverlayRoute.install'.

    flutter run error: Error: The method 'FlushbarRoute.install' has more required arguments than those of overridden method 'OverlayRoute.install'.

    Error message when running flutter run:

    [+32498 ms] [+32508 ms] 
    [        ]             Compiler message:
    [        ] [   +2 ms] /C:/Users/fauzi/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/flushbar-1.9.1/lib/flushbar_route.dart:273:8: Error: The method 'FlushbarRoute.install' has more
    required arguments than those of overridden method 'OverlayRoute.install'.
    [        ] [        ]   void install(OverlayEntry insertionPoint) {
    [        ] [        ]        ^
    [        ] [        ] /C:/src/flutter/packages/flutter/lib/src/widgets/routes.dart:40:8: Context: This is the overridden method ('install').
    [        ] [        ]   void install() {
    [        ] [        ]        ^
    [+4594 ms] [+4590 ms] /C:/Users/fauzi/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/flushbar-1.9.1/lib/flushbar_route.dart:281:18: Error: Too many positional arguments: 0 allowed,
    but 1 found.
    [   +1 ms] [        ] Try removing the extra positional arguments.
    [        ] [        ]     super.install(insertionPoint);
    [        ] [        ]                  ^
    [+6798 ms] [+6801 ms] Persisting file store
    [        ] [  +31 ms] Done persisting file store
    [        ] [   +1 ms] Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
    [        ] build failed.
    [        ] [  +10 ms] "flutter assemble" took 44,673ms.
    [        ] #0      throwToolExit (package:flutter_tools/src/base/common.dart:27:3)
    [        ] #1      AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:190:7)
    [        ] <asynchronous suspension>
    [        ] #2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:639:18)
    [        ] <asynchronous suspension>
    [        ] #3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:537:33)
    [        ] <asynchronous suspension>
    [        ] #4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
    [        ] #5      _rootRun (dart:async/zone.dart:1126:13)
    [        ] #6      _CustomZone.run (dart:async/zone.dart:1023:19)
    [   +1 ms] #7      _runZoned (dart:async/zone.dart:1518:10)
    [   +1 ms] #8      runZoned (dart:async/zone.dart:1465:12)
    [        ] #9      AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
    [        ] #10     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:527:20)
    [        ] #11     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
    [   +1 ms] #12     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:338:21)
    [        ] <asynchronous suspension>
    [        ] #13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
    [        ] #14     _rootRun (dart:async/zone.dart:1126:13)
    [        ] #15     _CustomZone.run (dart:async/zone.dart:1023:19)
    [  +15 ms] #16     _runZoned (dart:async/zone.dart:1518:10)
    [   +1 ms] #17     runZoned (dart:async/zone.dart:1465:12)
    [        ] #18     AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
    [        ] #19     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:288:19)
    [        ] #20     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
    [   +1 ms] #21     new Future.sync (dart:async/future.dart:224:31)
    [        ] #22     CommandRunner.run (package:args/command_runner.dart:112:14)
    [        ] #23     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:231:18)
    [        ] #24     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:64:22)
    [        ] #25     _rootRun (dart:async/zone.dart:1126:13)
    [        ] #26     _CustomZone.run (dart:async/zone.dart:1023:19)
    [        ] #27     _runZoned (dart:async/zone.dart:1518:10)
    [        ] #28     runZoned (dart:async/zone.dart:1502:12)
    [        ] #29     run.<anonymous closure> (package:flutter_tools/runner.dart:62:18)
    [        ] <asynchronous suspension>
    [        ] #30     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
    [        ] #31     _rootRun (dart:async/zone.dart:1126:13)
    [        ] #32     _CustomZone.run (dart:async/zone.dart:1023:19)
    [        ] #33     _runZoned (dart:async/zone.dart:1518:10)
    [        ] #34     runZoned (dart:async/zone.dart:1465:12)
    [        ] #35     AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
    [        ] #36     runInContext (package:flutter_tools/src/context_runner.dart:64:24)
    [        ] #37     run (package:flutter_tools/runner.dart:51:10)
    [        ] #38     main (package:flutter_tools/executable.dart:65:9)
    [        ] #39     main (file:///C:/src/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
    [        ] #40     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
    [        ] #41     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
    [  +51 ms] > Task :app:compileFlutterBuildDebug FAILED
    [   +1 ms] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
    [        ] Use '--warning-mode all' to show the individual deprecation warnings.
    [        ] FAILURE: Build failed with an exception.
    [   +1 ms] * Where:
    [        ] Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 803
    [        ] * What went wrong:
    [        ] Execution failed for task ':app:compileFlutterBuildDebug'.
    [        ] > Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1
    [   +1 ms] * Try:
    [        ] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    [        ] * Get more help at https://help.gradle.org
    [        ] BUILD FAILED in 1m 2s
    [   +4 ms] See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
    [        ] 1 actionable task: 1 executed
    [ +411 ms] Running Gradle task 'assembleDebug'... (completed in 63.7s)
    [   +7 ms] "flutter run" took 73,207ms.
    Gradle task assembleDebug failed with exit code 1
    
    #0      throwToolExit (package:flutter_tools/src/base/common.dart:27:3)
    #1      buildGradleApp (package:flutter_tools/src/android/gradle.dart:394:7)
    #2      _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:75:64)
    #3      _rootRunUnary (dart:async/zone.dart:1134:38)
    #4      _CustomZone.runUnary (dart:async/zone.dart:1031:19)
    #5      _FutureListener.handleValue (dart:async/future_impl.dart:140:18)
    #6      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
    #7      Future._propagateToListeners (dart:async/future_impl.dart:711:32)
    #8      Future._completeWithValue (dart:async/future_impl.dart:526:5)
    #9      _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:34:15)
    #10     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:293:13)
    #11     _DefaultProcessUtils.stream (package:flutter_tools/src/base/process.dart)
    #12     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:75:64)
    #13     _rootRunUnary (dart:async/zone.dart:1134:38)
    #14     _CustomZone.runUnary (dart:async/zone.dart:1031:19)
    #15     _FutureListener.handleValue (dart:async/future_impl.dart:140:18)
    #16     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
    #17     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
    #18     Future._completeWithValue (dart:async/future_impl.dart:526:5)
    #19     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:556:7)
    #20     _rootRun (dart:async/zone.dart:1126:13)
    #21     _CustomZone.run (dart:async/zone.dart:1023:19)
    #22     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
    #23     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
    #24     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
    #25     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
    #26     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
    #27     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
    

    flutter doctor:

    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel master, v1.14.7-pre.38, on Microsoft Windows [Version 10.0.17134.950], locale en-US)
    
    [√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    [√] Android Studio (version 4.0)
    [√] VS Code (version 1.41.1)
    [√] VS Code, 64-bit edition (version 1.41.1)
    [√] Connected device (1 available)
    
    • No issues found!
    
    opened by fauzipadlaw 33
  • Flushbar throws error when we swipe from left to right to go back on ios.

    Flushbar throws error when we swipe from left to right to go back on ios.

    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.

    enhancement priority 
    opened by orangepreneur 32
  • Error building with flutter 1.14.6

    Error building with flutter 1.14.6

    Compiler message:
    ../../Flutter_SDK/.pub-cache/hosted/pub.dartlang.org/flushbar-1.9.1/lib/flushbar_route.dart:273:8: Error: The method 'FlushbarRoute.install' has more required arguments than those of overridden method 'OverlayRoute.install'.
      void install(OverlayEntry insertionPoint) {
           ^
    ../../Flutter_SDK/packages/flutter/lib/src/widgets/routes.dart:40:8: Context: This is the overridden method ('install').
      void install() {
           ^
    ../../Flutter_SDK/.pub-cache/hosted/pub.dartlang.org/flushbar-1.9.1/lib/flushbar_route.dart:281:18: Error: Too many positional arguments: 0 allowed, but 1 found.
    Try removing the extra positional arguments.
        super.install(insertionPoint);
                     ^
    
    opened by ahmaducg 26
  • spamming flushbar issues

    spamming flushbar issues

    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

    1. when i spam the button that trigger the flushbar, some of it got stuck in screen and i have to swipe it to dismiss it.
    2. Sometimes, the last flushbar dismissed itself by disappearing into the bottom of the screen, and it also pulling my app to the bottom of the screen, leaving blank space on top of my screen and i cant scroll the app back to the top

    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.

    screenshot_20180919-094327 1

    bug 
    opened by Kucingemas 18
  • The method 'detach' isn't defined for the class 'FocusScopeNode'

    The method 'detach' isn't defined for the class 'FocusScopeNode'

    [✓] 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:

    • 'FocusScopeNode' is from 'package:flutter/src/widgets/focus_manager.dart' ('file:///Users/fsdf/Tools/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(); ^^^^^^
    bug fix when it hits stable 
    opened by fvisticot 16
  • Error when trying to show flushbar

    Error when trying to show flushbar

    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.

    bug 
    opened by carnivash 10
  • Version 1.10.0 - Install problem - READ THE CHANGELOG BEFORE OPENING AN ISSUE

    Version 1.10.0 - Install problem - READ THE CHANGELOG BEFORE OPENING AN ISSUE

    Compiler message: /D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/flushbar-1.10.0/lib/flushbar_route.dart:303:8: Error: The method 'FlushbarRoute.install' has fewer positional arguments than those of overridden method 'OverlayRoute.install'. void install() { ^ /D:/flutter/packages/flutter/lib/src/widgets/routes.dart:41:8: Context: This is the overridden method ('install'). void install(OverlayEntry insertionPoint) { ^ /D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/flushbar-1.10.0/lib/flushbar_route.dart:311:18: Error: Too few positional arguments: 1 required, 0 given. super.install(); ^ Target kernel_snapshot failed: Exception: Errors during snapshot creation: null build failed.

    FAILURE: Build failed with an exception.

    • Where: Script 'D:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 784

    • What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.

    Process 'command 'D:\flutter\bin\flutter.bat'' finished with non-zero exit value 1

    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    • Get more help at https://help.gradle.org

    BUILD FAILED in 19s Finished with error: Gradle task assembleDebug failed with exit code 1

    opened by josephviq 9
  • Error: The method 'FlushbarRoute.install' has more required arguments than those of overridden method 'OverlayRoute.install'.

    Error: The method 'FlushbarRoute.install' has more required arguments than those of overridden method 'OverlayRoute.install'.

    flutter run Using hardware rendering with device sdk gphone x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering". Launching lib\main.dart on sdk gphone x86 in debug mode... Running Gradle task 'assembleDebug'...

    Compiler message:

    ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/flushbar-1.9.1/lib/flushbar_route.dart:273:8: Error: The method 'FlushbarRoute.install' has more required arguments than those of overridden method 'OverlayRoute.install'.

    void install(OverlayEntry insertionPoint) {

       ^
    

    /C:/flutter/packages/flutter/lib/src/widgets/routes.dart:40:8: Context: This is the overridden method ('install').

    void install() {

       ^
    

    ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/flushbar-1.9.1/lib/flushbar_route.dart:281:18: Error: Too many positional arguments: 0 allowed, but 1 found.

    Try removing the extra positional arguments.

    super.install(insertionPoint);
    
                 ^
    

    FAILURE: Build failed with an exception.

    • What went wrong:

    A problem was found with the configuration of task ':app:compileFlutterBuildDebug'.

    Cannot write to file 'C:\Users\anasmuhamad98\AndroidStudioProjects\umtouch' specified for property 'outputFiles' as it is a directory.

    • Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    • Get more help at https://help.gradle.org

    BUILD FAILED in 45s Running Gradle task 'assembleDebug'... 48.7s Exception: Gradle task assembleDebug failed with exit code 1

    opened by anasmuhamad98 8
  • Add support for full bottom fill on iPhone X

    Add support for full bottom fill on iPhone X

    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.

    waiting for user response 
    opened by beardo01 7
  • Hide/Remove FlushBar at will

    Hide/Remove FlushBar at will

    Hello!

    Awesome job with this widget. It is super useful and great.

    I have a question, is it possible to hide a flushbar at will, and not waiting the set time?

    Thank you!

    opened by GonzaloSaad 6
  • Why not use overlay for flushbar

    Why not use overlay for flushbar

    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.

    enhancement priority 
    opened by ryanhz 6
  • Change of Copyright notice

    Change of Copyright notice

    Hello! According to the Appendix of Apache License 2.0, if you want to license your software under this License you should "attach the boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information". This condition is not met now. Сould you remove the copyright from the text of the license and add a COPYRIGHT NOTICE FILE (like this) in the appropriate form instead (including the year of the software development and your name and surname)? You could also apply the Apache License to your source-code files by attaching the notice as a comment at the top of each file. Thank you in advance!

    Apache.org says:

    Include a copy of the Apache License, typically in a file called LICENSE, in your work, and consider also including a NOTICE file.

    It is also valuable to tag each of your source-code files in case they become detached from the LICENSE file. To apply the Apache License to your source-code files, one approach is to attach the following notice to as a comment at the top of each file. Replace the copyright templates with your own identifying information:

    Copyright [yyyy] [name of copyright owner]

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

    opened by lubovtorina 1
  • Will you move it to null-safety

    Will you move it to null-safety

    **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 :)

    opened by ShrikantaMazumder 2
  • Transfer to Flutter Community GH Repo

    Transfer to Flutter Community GH Repo

    Please follow instructions on this page: https://github.com/fluttercommunity/transfer-guide

    and the Flutter Community will help to look after unmaintained packages

    This will help benefit You as the original developer and the many developers who rely on this package.

    Thank you for your attention

    opened by nodinosaur 0
  • Can't test if using duration property.

    Can't test if using duration property.

    Describe the bug If I use duration property, then I have exception testing my widget that uses Flushbar for displaying error message. Timer needs to be canceled on dispose.

    The following assertion was thrown running a test:
    A Timer is still pending even after the widget tree was disposed.
    'package:flutter_test/src/binding.dart':
    Failed assertion: line 1241 pos 12: '!timersPending'
    
    opened by nakuzm 0
  • migrate to null safty

    migrate to null safty

    Description

    All dependencies are migrated to null safety. So we should migrate this package to null safety. Resources

    https://www.youtube.com/watch?v=eBr5tlumwlg&feature=youtu.be https://medium.com/dartlang/announcing-dart-null-safety-beta-87610fee6730

    opened by kw2019ltd 3
Owner
Andre Haueisen
Andre Haueisen
DirectSelect is a selection widget with an ethereal, full-screen modal popup displaying the available choices when the widget is interact with. https://dribbble.com/shots/3876250-DirectSelect-Dropdown-ux

direct-select-flutter DirectSelect is a selection widget with an ethereal, full-screen modal popup displaying the available choices when the widget is

null 582 Jan 4, 2023
🔁 A custom refresh indicator for flutter.

Liquid Pull To Refresh A beautiful and custom refresh indicator for flutter highly inspired from Ramotion Pull Down to Refresh. Table of contents Inst

Ayush Agarwal 1.1k Jan 8, 2023
A customizable timer builder, with controller, animation, intervals, callbacks and custom actions for Flutter.

Custom Timer ⌛ A highly customizable timer builder, with controller, animation, intervals, callbacks, custom actions, and more! ?? Simple Usage @overr

Federico De Sía 27 Nov 23, 2022
A custom is strong dropdown menu for Flutter

A custom is strong dropdown menu for Flutter. Easy to use and powerful for customization, it's up to you what you want to display in the dropdown menu!

干志雄 662 Dec 26, 2022
A Splash screen with curved custom bottom sheet and dots indicator within it.

Pub.dev Curved Splash Screen A Splash screen with curved custom bottom sheet and dots indicator within it. You can add your custom splash screens acco

Hosain Mohamed 16 Dec 1, 2022
this repo is testing the custom painter by changing according to slider value. It was intended to be used for volume control in audio player.

custom_paint_demo Trying a widget called custom paint Getting Started This project is a starting point for a Flutter application. A few resources to g

Edy 7 Jan 16, 2022
A simple animated radial menu widget for Flutter.

flutter_radial_menu A radial menu widget for Flutter. . Installation Install the latest version from pub. Quick Start Import the package, create a Rad

Victor Choueiri 434 Jan 7, 2023
flutter stepper_touch widget

stepper_touch the concept of the widget inspired from Nikolay Kuchkarov. i extended the functionality to be more useful in real world applications Tha

Raouf Rahiche 271 Dec 30, 2022
A TypeAhead widget for Flutter, where you can show suggestions to users as they type

Flutter TypeAhead A TypeAhead (autocomplete) widget for Flutter, where you can show suggestions to users as they type Features Shows suggestions in an

null 661 Jan 5, 2023
A highly customisable Flutter widget for entering pin code. Suitable for use cases such as login and OTP.

pin_code_text_field It's a beautiful and highly customizable Flutter widget for entering pin code. Suitable for use cases such as login and OTP. Usage

Liew Jun Tung 309 Dec 28, 2022
Flutter FoldingCell widget

Simple FoldingCell widget Simple folding cell widget, pass frontWidget and innerWidget to fold and unfold. Installation Add dependency in pubspec.yaml

Farrukh 513 Dec 30, 2022
A Flutter package that provides an Emoji picker widget with 1500+ emojis in 8 categories.

emoji_picker_flutter Yet another Emoji Picker for Flutter ?? Note: This package is based on emoji_picker which has been deprecated and not maintained

Stefan Humm 99 Dec 24, 2022
A Flutter Widget Approach for using HTML tags & CSS styles in your upcoming Apps.

html_widgets A Flutter Widget Approach for using HTML tags & CSS styles in your upcoming Apps. Text Widgets *text property is required for all the tex

XenonLabz 7 Jul 14, 2022
Flutter widget with pond ripple effect!

Ripple pond effect This project contains Ripple pond effect widget. It makes wave when you click on it! There is still many things to improve in this

null 24 Dec 19, 2021
top-snackbar-flutter - Modern UI snackbar widget

top-snackbar-flutter - Modern UI snackbar widget

null 110 Jan 7, 2023
A flutter widget where a card is expanded ontap.

Expansion card This package provides an easy implementation of a Expansion type card where you can also add gif at the background. How to use import '

null 127 Dec 6, 2022
Scratch card widget which temporarily hides content from user.

scratcher Scratch card widget which temporarily hides content from user. Features Android and iOS support Cover content with full color or custom imag

Kamil Rykowski 405 Dec 27, 2022
Animated Selection Slide Sezgin BilgetayAnimated Selection Slide An animated selection widget by swiping by Sezgin Bilgetay.

Animated Selection Slide This flutter project allows you to make your choices with animation in inbox. For UI, it's inspired by the great example on d

null 340 Jan 7, 2023
A Very Good Infinite List Widget created by Very Good Ventures. Great for activity feeds, news feeds, etc. 🦄

InfiniteList comes in handy when building features like activity feeds, news feeds, or anywhere else where you need to lazily fetch and render content for users to consume.

Very Good Open Source 102 Dec 12, 2022