Skip to content

Instantly share code, notes, and snippets.

@GursheeshSingh
Created July 4, 2020 09:27
Show Gist options
  • Save GursheeshSingh/530fd3c11cacb582be6ccd5854f529f2 to your computer and use it in GitHub Desktop.
Save GursheeshSingh/530fd3c11cacb582be6ccd5854f529f2 to your computer and use it in GitHub Desktop.
//Navigate
Abbreviation- navigate
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>$Page$(),
),
);
//Navigate and clear stack
Abbreviation- navigateClearStack
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (context) => $ClassName$(),
),
(Route<dynamic> route) => false,
);
//Add height gap
Abbreviation- gaph
SizedBox(height: $height$),
//Add width gap
Abbreviation- gapv
SizedBox(width: $width$),
//Close screen
Abbreviation- pop
Navigator.pop(context);
//Delay
Abbreviation- delay
await Future.delayed(Duration(seconds: $seconds$));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment