Skip to content

Commit 6dba863

Browse files
gnpricechrisbobbe
authored andcommitted
binding [nfc]: Clean up name of re-exported url_launcher.LaunchMode
In particular make the name appropriately specific about what's being launched, since we're exporting it from this more general context.
1 parent 94ac8fa commit 6dba863

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/model/binding.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import 'package:device_info_plus/device_info_plus.dart' as device_info_plus;
22
import 'package:flutter/foundation.dart';
33
import 'package:url_launcher/url_launcher.dart' as url_launcher;
4-
export 'package:url_launcher/url_launcher.dart' show LaunchMode;
54

65
import '../widgets/store.dart';
76
import 'store.dart';
87

8+
/// Alias for [url_launcher.LaunchMode].
9+
typedef UrlLaunchMode = url_launcher.LaunchMode;
10+
911
/// A singleton service providing the app's data and use of Flutter plugins.
1012
///
1113
/// Only one instance will be constructed in the lifetime of the app,

lib/widgets/content.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,8 +695,8 @@ void _launchUrl(BuildContext context, String urlString) async {
695695
// opening a URL in a browser, where the system gives the user
696696
// a bit of UI to choose which browser to use:
697697
// https://github.com/zulip/zulip-flutter/issues/74#issuecomment-1514040730
698-
TargetPlatform.android => LaunchMode.externalApplication,
699-
_ => LaunchMode.platformDefault,
698+
TargetPlatform.android => UrlLaunchMode.externalApplication,
699+
_ => UrlLaunchMode.platformDefault,
700700
},
701701
);
702702
} on PlatformException catch (e) {

0 commit comments

Comments
 (0)