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();
|
await container.syncNotes();
|
||||||
} on GitException catch (exp) {
|
} on GitException catch (exp) {
|
||||||
_scaffoldKey.currentState
|
_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() {
|
void _copyKeyToClipboard() {
|
||||||
Clipboard.setData(ClipboardData(text: publicKey));
|
Clipboard.setData(ClipboardData(text: publicKey));
|
||||||
var text = "Public Key copied to Clipboard";
|
var text = "Public Key copied to Clipboard";
|
||||||
this
|
this._scaffoldKey.currentState
|
||||||
._scaffoldKey
|
..removeCurrentSnackBar()
|
||||||
.currentState
|
..showSnackBar(new SnackBar(content: new Text(text)));
|
||||||
.showSnackBar(new SnackBar(content: new Text(text)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _launchDeployKeyPage() async {
|
void _launchDeployKeyPage() async {
|
||||||
|
Reference in New Issue
Block a user