Update flushbar (#568)

* Replace old flushbar package with its updated version
Fix flushbars throughtout the app

* Fix Navigation happening all at once causing debugLocked error

* Remove un-necessary async/await

* Remove un-necessary future delayed

* Make process text flushbar indefinite

* Fix show seeds/keys popping page after being pushed instead of popping the auth route
This commit is contained in:
Omar Hatem 2022-10-26 20:13:44 +02:00 committed by GitHub
parent 4f2cf983de
commit 33935c9b1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 123 additions and 117 deletions

View file

@ -1,7 +1,6 @@
import 'package:cake_wallet/utils/show_bar.dart';
// import 'package:flushbar/flushbar.dart';
import 'package:another_flushbar/flushbar.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:cake_wallet/generated/i18n.dart';
class PinCodeWidget extends StatefulWidget {
@ -40,8 +39,7 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
String pin;
String title;
double _aspectRatio;
// FIX-ME: Replace Flushbar
// Flushbar<void>? _progressBar;
Flushbar<void>? _progressBar;
int currentPinLength() => pin.length;
@ -91,19 +89,18 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
void changeProcessText(String text) {
hideProgressText();
// FIX-ME: Empty Duration,
// _progressBar = createBar<void>(text, duration: Duration())
// ..show(_key.currentContext);
_progressBar = createBar<void>(text, duration: null)
..show(_key.currentContext!);
}
void close() {
// _progressBar?.dismiss();
_progressBar?.dismiss();
Navigator.of(_key.currentContext!).pop();
}
void hideProgressText() {
// _progressBar?.dismiss();
// _progressBar = null;
_progressBar?.dismiss();
_progressBar = null;
}
@override