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:test/test.dart'; | |
import 'package:stream_channel/stream_channel.dart'; | |
main() { | |
StreamChannel ch; | |
setUpAll(() async { | |
ch = spawnHybridUri('server_start.dart', stayAlive: true); | |
String message = await ch.stream.first; | |
print(message); | |
}); |
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'; | |
import 'package:angular/angular.dart'; | |
import 'package:angular_forms/angular_forms.dart'; | |
import 'package:angular_grecaptcha/angular_grecaptcha.dart'; | |
import 'package:http/browser_client.dart'; | |
@Component( | |
selector: 'my-component', | |
templateUrl: 'my_component.html', | |
styleUrls: const [ |
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
@TestOn('browser'); | |
import 'package:test/test.dart'; | |
import 'package:http/browser_client.dart'; | |
import 'package:http_exception/http_status.dart'; | |
main() { | |
final http = new BrowserClient(); | |
test('Http request', () async { | |
int start = new DateTime.now().millisecondsSinceEpoch; | |
final response = await http.get('http://localhost'); |
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'; | |
import 'dart:io'; | |
import 'package:mime/mime.dart'; | |
import 'package:shelf/shelf.dart' as shelf; | |
import 'package:shelf_rest/shelf_rest.dart'; | |
class Api { | |
@Post('upload') | |
Future upload(shelf.Request request) async { |
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
class MimeTypes { | |
static const String jpeg = 'image/jpeg', | |
static const String png = 'image/png', | |
static const String gif = 'image/gif', | |
static const String txt = 'text/plain', | |
static const String doc = 'application/msword', | |
static const String docx = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', | |
static const String xls = 'application/vnd.ms-excel', | |
static const String xlsx = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', | |
static const String ppt = 'application/vnd.ms-powerpoint', |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<script async type="application/dart" src="main.dart"></script> | |
<script async type="text/javascript" src="packages/browser/dart.js"></script> | |
<title>Hello Dart</title> | |
</head> |
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
class UserId { | |
String _id; | |
UserId(this._id); | |
@override | |
bool operator == (other) { | |
return _id == other._id; | |
} | |
int get hashCode => _id.hashCode; | |
} |
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'; | |
import 'dart:io'; | |
/// Фазы установки соединения с socks5-сервером | |
enum Socks5 {init, auth, connect} | |
Future main() async { | |
String targetHost = 'delidela.com'; | |
int targetPort = 443; |
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(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( | |
title: 'Flutter Demo', | |
theme: new ThemeData( |
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:angular/angular.dart'; | |
import 'package:angular_components/utils/browser/window/module.dart'; | |
import 'package:angular_components/material_datepicker/module.dart'; | |
import 'package:angular_components/material_datepicker/material_date_time_picker.dart'; | |
@Component( | |
selector: 'my-app', | |
styleUrls: ['app_component.css'], | |
templateUrl: 'app_component.html', |
OlderNewer