Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove UrlLauncher class
  • Loading branch information
szakarias committed Apr 24, 2017
commit 81ff9b337f08a44bacf87f072e2f5ca78f3a666c
4 changes: 2 additions & 2 deletions packages/url-launcher/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class MyHomePage extends StatefulWidget {

class _MyHomePageState extends State<MyHomePage> {
void _launchUrl() {
UrlLauncher.launch("https://flutter.io");
launch("https://flutter.io");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single quotes?

}

@override
Expand All @@ -54,4 +54,4 @@ class _MyHomePageState extends State<MyHomePage> {
),
);
}
}
}
14 changes: 5 additions & 9 deletions packages/url-launcher/lib/url_launcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ import 'dart:async';

import 'package:flutter/services.dart';

class UrlLauncher {
static const MethodChannel _channel =
const MethodChannel('plugins.flutter.io/URLLauncher');

/// Parse the specified URL string and delegate handling of the same to the
/// underlying platform.
static Future<Null> launch(String urlString) =>
_channel.invokeMethod('UrlLauncher.launch', urlString);
}
/// Parse the specified URL string and delegate handling of the same to the
/// underlying platform.
Future<Null> launch(String urlString) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{ and extra , + dartfmt might give something that satisfies flutter code style.

const MethodChannel('plugins.flutter.io/URLLauncher')
.invokeMethod('UrlLauncher.launch', urlString);