Skip to content

Commit d8e28ac

Browse files
committed
Added Dart and Flutter snippets.
I collected (and edited) these from Dart-Code (for VSC) and YASnippet-snippets and wrote some of them myself. This is the complete collection in here. If there's gonna be a Dart-Mode in Doom. Also, this needs to be right next to it.
1 parent bc89701 commit d8e28ac

File tree

31 files changed

+272
-0
lines changed

31 files changed

+272
-0
lines changed

dart-mode/aclass

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# -*- mode: snippet -*-
2+
# contributor: M. Yas. Davoodeh
3+
# name: aclass
4+
# key: acls
5+
# --
6+
abstract class ${1:Name} {
7+
$0
8+
}

dart-mode/afun

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# -*- mode: snippet -*-
2+
# contributor: M. Yas. Davoodeh
3+
# name: async fun
4+
# --
5+
Future<${1:Type}> ${2:Name}($3) async {
6+
$0
7+
}

dart-mode/bltval

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# -*- mode: snippet -*-
2+
# contributor: M. Yas. Davoodeh
3+
# name: built value
4+
# key: blt
5+
# group: dart
6+
# --
7+
abstract class ${1:Name} implements Built<$1, $1Builder> {
8+
factory $1([void Function($1Builder) updates]) = _$$1;
9+
$1._();
10+
11+
$0
12+
}

dart-mode/class

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# -*- mode: snippet -*-
2+
# contributor: M. Yas. Davoodeh
3+
# name: class
4+
# --
5+
class ${1:Name} {
6+
$0
7+
}

dart-mode/do

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# -*- mode: snippet -*-
2+
# contributor: M. Yas. Davoodeh
3+
# name: do while
4+
# --
5+
do {
6+
$0
7+
} while ($1);

dart-mode/elif

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# -*- mode: snippet -*-
2+
# contributor: M. Yas. Davoodeh
3+
# name: if else
4+
# --
5+
else if ($1) {
6+
$0
7+
}

dart-mode/ext

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# -*- mode: snippet -*-
2+
# contributor: M. Yas. Davoodeh
3+
# name: ext
4+
# --
5+
extends ${1:Name}$0

dart-mode/for

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# -*- mode: snippet -*-
2+
# contributor: M. Yas. Davoodeh
3+
# name: for
4+
# --
5+
for (var i = 0; i < ${1:count}; i++) {
6+
$0
7+
}

dart-mode/fori

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# -*- mode: snippet -*-
2+
# contributor: M. Yas. Davoodeh
3+
# name: for-in
4+
# --
5+
for (var ${1:item} in ${2:items}) {
6+
$0
7+
}

dart-mode/fun

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# -*- mode: snippet -*-
2+
# contributor: M. Yas. Davoodeh
3+
# name: fun
4+
# --
5+
${1:Type} ${2:Name}($3) {
6+
$0
7+
}

0 commit comments

Comments
 (0)