mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 01:45:55 +08:00
Remove the old snackbar before showing a new one
This commit is contained in:
@ -48,7 +48,8 @@ class HomeScreen extends StatelessWidget {
|
||||
await container.syncNotes();
|
||||
} on GitException catch (exp) {
|
||||
_scaffoldKey.currentState
|
||||
.showSnackBar(new SnackBar(content: new Text(exp.cause)));
|
||||
..removeCurrentSnackBar()
|
||||
..showSnackBar(new SnackBar(content: new Text(exp.cause)));
|
||||
}
|
||||
}),
|
||||
),
|
||||
|
@ -246,10 +246,9 @@ class OnBoardingScreenState extends State<OnBoardingScreen> {
|
||||
void _copyKeyToClipboard() {
|
||||
Clipboard.setData(ClipboardData(text: publicKey));
|
||||
var text = "Public Key copied to Clipboard";
|
||||
this
|
||||
._scaffoldKey
|
||||
.currentState
|
||||
.showSnackBar(new SnackBar(content: new Text(text)));
|
||||
this._scaffoldKey.currentState
|
||||
..removeCurrentSnackBar()
|
||||
..showSnackBar(new SnackBar(content: new Text(text)));
|
||||
}
|
||||
|
||||
void _launchDeployKeyPage() async {
|
||||
|
Reference in New Issue
Block a user