Skip to content

Instantly share code, notes, and snippets.

Harry Terkelsen hterkelsen

  • Google
  • United States
Block or report user

Report or block hterkelsen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hterkelsen
hterkelsen / url_launcher_web.dart
Created Nov 20, 2019
Implementation of url_launcher for the web
View url_launcher_web.dart
import 'dart:async';
import 'dart:html' as html;
import 'package:flutter/services.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
class UrlLauncherPlugin {
static void registerWith(Registrar registrar) {
final MethodChannel channel = MethodChannel(
'plugins.flutter.io/url_launcher',
View url_launcher_web_pubspec.yaml
name: url_launcher_web
version: 0.0.1
flutter:
plugin:
platforms:
web:
pluginClass: UrlLauncherPlugin
fileName: url_launcher_web.dart
@hterkelsen
hterkelsen / url_launcher_snippet.dart
Created Nov 20, 2019
Main code of interest in package:url_launcher
View url_launcher_snippet.dart
const MethodChannel _channel = MethodChannel('plugins.flutter.io/url_launcher');
Future<bool> launch(
String urlString, {
...
}) async {
assert(urlString != null);
final bool result = await _channel.invokeMethod<bool>(
'launch',
<String, Object>{
@hterkelsen
hterkelsen / url_launcher_example_main.dart
Created Nov 20, 2019
Main file for url_launcher_example
View url_launcher_example_main.dart
import 'package:url_launcher/url_launcher.dart';
import 'package:flutter/material.dart';
void main() => runApp(UrlLauncherExample());
class UrlLauncherExample extends StatelessWidget {
static const String _title = 'URL Launcher Example';
@override
Widget build(BuildContext context) {
return MaterialApp(
@hterkelsen
hterkelsen / gist:651926a57474d066a984
Created Sep 4, 2015
Result of turning on modifier checks in ts2dart
View gist:651926a57474d066a984
[14:31:53] TS2DartError: [TSToDartTranspiler]: angular2/src/core/reflection/reflector.ts:22:3: public members must not be prefixed with "_"
angular2/src/core/reflection/reflector.ts:23:3: public members must not be prefixed with "_"
angular2/src/core/reflection/reflector.ts:24:3: public members must not be prefixed with "_"
angular2/src/core/reflection/reflector.ts:25:3: public members must not be prefixed with "_"
angular2/src/core/reflection/reflector.ts:26:3: public members must not be prefixed with "_"
angular2/src/core/reflection/reflector.ts:148:3: public members must not be prefixed with "_"
angular2/src/core/reflection/reflector.ts:155:3: public members must not be prefixed with "_"
angular2/src/core/di/binding.ts:184:3: public members must not be prefixed with "_"
angular2/src/core/di/injector.ts:187:3: public members must not be prefixed with "_"
angular2/src/core/di/injector.ts:478:3: public members must not be prefixed with "_"
You can’t perform that action at this time.