mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
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:
parent
4f2cf983de
commit
33935c9b1d
8 changed files with 123 additions and 117 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue