#dart:core example
Example illustrating how to remove key/value pairs from a Map
, where the key/value pair satisfies some test. Similar as the List.removeWhere
method.
Main library: dart:core
Main elements: Map Map.remove
Tags:
#dart:core example
Example illustrating how to remove key/value pairs from a Map
, where the key/value pair satisfies some test. Similar as the List.removeWhere
method.
Main library: dart:core
Main elements: Map Map.remove
Tags:
#firebase:firebase example
How to make a very simple public #chatbox using firebase.
Main library: firebase:firebase
Main elements: Firebase Firebase.push Firebase.onChildAdded
Gist: https://gist.github.com/kasperpeulen/2d1d6184e6cb5fecdac1
Tags: #chatbox
#dart:html example
Example of setInnerHtml configured so that all nodes are allowed.
Main library: dart:html
Main element: Element.setInnerHtml
Gist: https://gist.github.com/kasperpeulen/fdf8012098d834e1d608
DartPad: https://dartpad.dartlang.org/fdf8012098d834e1d608
#github:browser example
Authenticate users with GitHub by writing only client-side code. Uses the OAuth2 Flow of firebase.
Main library: github:browser
Main element: Authentication.withToken
Gist: https://gist.github.com/kasperpeulen/ec3f3717f398ccce389e
Tags: #OAauth2
#analyzer:analyzer example
How to extract the used libraries in a dart file using the analyzer
package.
Main library: analyzer:analyzer
Main elements: parseCompilationUnit CompilationUnit.directives ImportDirective.uri
Gist: https://gist.github.com/kasperpeulen/d086078ed00429d5a335
Tags: #server
#dart:core example
How to remove a key/value pair, satisfying some test, from a Map
.
Similar as the List.removeWhere
method.
Main library: dart:core
Main elements: Map Map.remove
Gist: https://gist.github.com/kasperpeulen/7fbb9d27a05b7534a808
DartPad: https://dartpad.dartlang.org/7fbb9d27a05b7534a808
#intl:intl example
Format some DateTime
objects to good looking strings.
Uses the same format as used in stackoverflow (and many other popular websites). For example, a DateTime object that was 10 seconds ago will be formatted as 10 seconds ago
.
Main library: intl:intl
Main elements: DateFormat DateFormat.format DateTime
Gist: https://gist.github.com/kasperpeulen/99a0e72c084b09b969f4
#dart:convert example
How to pretty-print JSON using Dart.
How to display JSON in an easy-to-read (for human readers) format.
Main library: dart:convert
Main element: JsonEncoder.withIndent
Gist: https://gist.github.com/kasperpeulen/d61029fc0bc6cd104602
#dart:convert example
How to pretty-print JSON using Dart.
How to display JSON in an easy-to-read (for human readers) format.
Main library: dart:convert
Main element: JsonEncoder.withIndent
Gist: https://gist.github.com/kasperpeulen/af21031476152378dd9e
#dart:core example
How to get a timestamp in Dart.
Main library: dart:core
Main element: DateTime.now
Gist: https://gist.github.com/kasperpeulen/c54b5925019b62843ef9
DartPad: https://dartpad.dartlang.org/c54b5925019b62843ef9
Tags: #datetime #timestamp