Skip to content

Commit

Permalink
more dart snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
theniceboy authored and David Chen committed Dec 4, 2020
1 parent b98077d commit 832b8fd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Ultisnips/dart.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,12 @@ endsnippet

snippet push "Navigator push"
Navigator.of(context).push(
MaterialPageRoute(builder: (context) => ${1:Page()}),${0}
);
MaterialPageRoute(builder: (context) => ${1:Page()}),
)${0}
endsnippet

snippet pop "Navigator pop"
Navigator.of(context).pop(${1});
Navigator.of(context).pop(${1})${0}
endsnippet

snippet rmb "RawMaterialButton"
Expand Down Expand Up @@ -333,3 +333,8 @@ snippet f "Function"
() =>
endsnippet

snippet delay "Future.delayed"
Future.delayed(const Duration(milliseconds: ${1:300})).then((_) {
${2}
});
endsnippet

0 comments on commit 832b8fd

Please sign in to comment.