flushbar
flushbar copied to clipboard
Migrate to null safety
- Migrate to null safety using flutter sdk 2.0.1
- Bump a major version
@AndreHaueisen Any updates on this ?
Getting the following errors since the latest commit:
../../flutter/.pub-cache/git/flushbar-b67c315fbc0f0d1a21a04a88719a7b76ddc0a5dd/lib/flushbar_route.dart:283:27: Error: The argument type 'FlushbarStatus?' can't be assigned to the parameter type 'FlushbarStatus' because 'FlushbarStatus?' is nullable and 'FlushbarStatus' isn't.
- 'FlushbarStatus' is from 'package:flushbar/flushbar.dart' ('../../flutter/.pub-cache/git/flushbar-b67c315fbc0f0d1a21a04a88719a7b76ddc0a5dd/lib/flushbar.dart').
_onStatusChanged!(currentStatus);
^
../../flutter/.pub-cache/git/flushbar-b67c315fbc0f0d1a21a04a88719a7b76ddc0a5dd/lib/flushbar_route.dart:289:27: Error: The argument type 'FlushbarStatus?' can't be assigned to the parameter type 'FlushbarStatus' because 'FlushbarStatus?' is nullable and 'FlushbarStatus' isn't.
- 'FlushbarStatus' is from 'package:flushbar/flushbar.dart' ('../../flutter/.pub-cache/git/flushbar-b67c315fbc0f0d1a21a04a88719a7b76ddc0a5dd/lib/flushbar.dart').
_onStatusChanged!(currentStatus);
^
../../flutter/.pub-cache/git/flushbar-b67c315fbc0f0d1a21a04a88719a7b76ddc0a5dd/lib/flushbar_route.dart:293:27: Error: The argument type 'FlushbarStatus?' can't be assigned to the parameter type 'FlushbarStatus' because 'FlushbarStatus?' is nullable and 'FlushbarStatus' isn't.
- 'FlushbarStatus' is from 'package:flushbar/flushbar.dart' ('../../flutter/.pub-cache/git/flushbar-b67c315fbc0f0d1a21a04a88719a7b76ddc0a5dd/lib/flushbar.dart').
_onStatusChanged!(currentStatus);
^
../../flutter/.pub-cache/git/flushbar-b67c315fbc0f0d1a21a04a88719a7b76ddc0a5dd/lib/flushbar_route.dart:303:27: Error: The argument type 'FlushbarStatus?' can't be assigned to the parameter type 'FlushbarStatus' because 'FlushbarStatus?' is nullable and 'FlushbarStatus' isn't.
- 'FlushbarStatus' is from 'package:flushbar/flushbar.dart' ('../../flutter/.pub-cache/git/flushbar-b67c315fbc0f0d1a21a04a88719a7b76ddc0a5dd/lib/flushbar.dart').
_onStatusChanged!(currentStatus);
^
when can this be merged?
Should be able to use this for now:
flushbar:
git:
url: git://github.com/prasadsunny1/flushbar
ref: master
ElevatedButton(
onPressed: () {
FlushbarHelper.createSuccess(
message: 'Action Success', title: 'Success')
.show(context);
},
child: Text('Success')),
when flushbar close after 3 second after that throw error :
══╡ EXCEPTION CAUGHT BY ANIMATION LIBRARY ╞═════════════════════════════════════════════════════════ The following assertion was thrown while notifying status listeners for AnimationController: 'package:flushbar/flushbar_route.dart': Failed assertion: line 307 pos 18: 'overlayEntries.isEmpty': is not true.
When the exception was thrown, this was the stack:
#2 FlushbarRoute._handleStatusChanged (package:flushbar/flushbar_route.dart:307:18)
#3 AnimationLocalStatusListenersMixin.notifyStatusListeners
(package:flutter/src/animation/listener_helpers.dart:199:19)
#4 AnimationController._checkStatusChanged (package:flutter/src/animation/animation_controller.dart:812:7)
#5 AnimationController._tick (package:flutter/src/animation/animation_controller.dart:828:5)
#6 Ticker._tick (package:flutter/src/scheduler/ticker.dart:238:12)
#7 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144:15)
#8 SchedulerBinding.handleBeginFrame.
The AnimationController notifying status listeners was:
AnimationController#349f1(⏮ 0.000; paused; for FlushbarRoute
awesome!!