Skip to content

Commit

Permalink
Flutter 3.0 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
slavap committed Jun 7, 2022
1 parent f3697cb commit 530cd32
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/ffloat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ class _FFloatState extends State<FFloat> {
}

void postUpdateCallback() {
WidgetsBinding.instance?.addPostFrameCallback((time) {
WidgetsBinding.instance.addPostFrameCallback((time) {
if (!mounted) return;
var r = key.currentContext?.findRenderObject();
RenderBox? box = r is RenderBox ? r : null;
Expand Down Expand Up @@ -363,7 +363,7 @@ class _FFloatState extends State<FFloat> {
if (_float != null) {
asyncParams();
if (_float!.isShow) {
WidgetsBinding.instance?.addPostFrameCallback((_) {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!mounted) return;
_float?._showFloat();
});
Expand Down Expand Up @@ -484,6 +484,7 @@ class _FFloat {
_FFloat(
this.context,
this.builder, {
// ignore: unused_element
this.child,
this.location,
this.margin = EdgeInsets.zero,
Expand Down Expand Up @@ -734,7 +735,7 @@ class _FFloatContentState extends State<_FFloatContent> with TickerProviderState
}

void postUpdateCallback() {
WidgetsBinding.instance?.addPostFrameCallback((time) {
WidgetsBinding.instance.addPostFrameCallback((time) {
if (!mounted) return;
var r = key.currentContext?.findRenderObject();
RenderBox? box = r is RenderBox ? r : null;
Expand Down

0 comments on commit 530cd32

Please sign in to comment.