View main.dart
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
void main() { | |
final json = { | |
'name': 'package_name', | |
'version': '1.0.0', | |
'dependencies': { | |
'dep1': '^1.0.0', | |
'dep2': '^1.5.0', | |
'dep3': { | |
'git': 'https://github.com/graphicbeacon', | |
'home': { |
View main.dart
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 'package:shelf_router/shelf_router.dart'; | |
import 'package:shelf/shelf.dart'; | |
import 'package:shelf/shelf_io.dart' as io; | |
void start() async { | |
// Initiate server | |
const port = 8081; | |
final app = Router(); | |
// CORS Settings |
View 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
<input type="text" /> |
View async-gen.dart
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:async'; | |
void main() { | |
// asynchronousNaturalsTo(10).listen(print); | |
final controller = asyncNaturalsTo(10); | |
controller.stream.listen((n) => print('YEss $n'), | |
onDone: () { | |
controller.close(); | |
}); |
View main.dart
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 'package:flutter/material.dart'; | |
void main() { | |
runApp(MaterialApp( | |
debugShowCheckedModeBanner: false, home: Scaffold(body: BoxApp()))); | |
} | |
class BoxApp extends StatefulWidget { | |
@override | |
BoxAppState createState() => BoxAppState(); |
View 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<!-- Compiled and minified CSS --> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> | |
<!-- Compiled and minified JavaScript --> |
View server.dart
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:io'; | |
import 'package:shelf/shelf.dart' as shelf; | |
import 'package:shelf/shelf_io.dart' as io; | |
// For Google Cloud Run, set _hostname to '0.0.0.0'. | |
const _hostname = 'localhost'; | |
const _port = 8080; | |
void main(List<String> args) async { |
View Dockerfile
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
# ./Dockerfile | |
FROM google/dart-runtime |
View main.dart
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 'package:flutter/material.dart'; | |
void main() => runApp( | |
MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
body: Page(), | |
), | |
), | |
); |
View main.dart
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 'package:flutter/material.dart'; | |
void main() => runApp(MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
body: Page() | |
) | |
)); | |
class Page extends StatefulWidget { |
NewerOlder