Created
December 16, 2019 08:30
-
-
Save tgfjt/50e8c2d2331d38a3bab83d7c11ac7108 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1 id="header"></h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:html'; | |
import 'dart:convert'; | |
void main() async { | |
var raw = await HttpRequest.getString('https://swapi.co/api/people/1'); | |
var ruke = jsonDecode(raw); | |
var $header = querySelector('#header'); | |
$header.text = ruke["name"]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
align-items: center; | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
background-color: #303f41; | |
} | |
h1 { | |
color: #f0f0f0; | |
font-family: serif; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment