Last active
June 7, 2022 23:47
-
-
Save PlugFox/622339f7eac3dd0326ad134de6e7cd95 to your computer and use it in GitHub Desktop.
Dart Pad with html index.html
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">empty</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
/// https://dart.dev/tutorials/web/low-level-html/connect-dart-html | |
import 'dart:html'; | |
void main() { | |
final header = querySelector('#header'); | |
header?.text = "Hello, World!"; | |
} |
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%; | |
} | |
h1 { | |
color: white; | |
font-family: Arial, Helvetica, sans-serif; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment