Skip to content

Commit ba0b302

Browse files
committed
v0.1.3
1 parent 0c1c4a4 commit ba0b302

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.3
2+
3+
* Remove protocol_handler dependency
4+
15
## 0.1.0
26

37
* First release.

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Add this to your package's pubspec.yaml file:
4141

4242
```yaml
4343
dependencies:
44-
uni_links_desktop: ^0.1.2
44+
uni_links_desktop: ^0.1.3
4545
```
4646
4747
Or
@@ -59,16 +59,18 @@ dependencies:
5959
```dart
6060
import 'package:uni_links_desktop/uni_links_desktop.dart';
6161

62-
void main() {
63-
if (Platform.isMacOS || Platform.isWindows) {
64-
enableUniLinksDesktop();
65-
if (Platform.isWindows) {
66-
registerProtocol('unilinks');
67-
}
62+
Future<void> main() async {
63+
WidgetsFlutterBinding.ensureInitialized();
64+
65+
if (Platform.isWindows) {
66+
registerProtocol('unilinks');
6867
}
6968

70-
runApp(MyApp());
69+
runApp(const MaterialApp(
70+
home: MyApp(),
71+
));
7172
}
73+
7274
```
7375

7476
> Just add these extra steps, see [uni_links](https://github.com/avioli/uni_links/tree/master/uni_links) for other usage
@@ -138,13 +140,13 @@ Change the file `windows/runner/main.cpp` as follows:
138140
#include "flutter_window.h"
139141
#include "utils.h"
140142

141-
+#include <protocol_handler/protocol_handler_plugin.h>
143+
+#include <uni_links_desktop/uni_links_desktop_plugin.h>
142144

143145
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
144146
_In_ wchar_t *command_line, _In_ int show_command) {
145147
+ HWND hwnd = ::FindWindow(L"FLUTTER_RUNNER_WIN32_WINDOW", L"uni_links_desktop_example");
146148
+ if (hwnd != NULL) {
147-
+ DispatchToProtocolHandler(hwnd);
149+
+ DispatchToUniLinksDesktop(hwnd);
148150
+
149151
+ ::ShowWindow(hwnd, SW_NORMAL);
150152
+ ::SetForegroundWindow(hwnd);

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ packages:
195195
path: ".."
196196
relative: true
197197
source: path
198-
version: "0.1.2"
198+
version: "0.1.3"
199199
uni_links_platform_interface:
200200
dependency: transitive
201201
description:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: uni_links_desktop
22
description: A desktop (supports macOS and Windows) implementation of uni_links plugin.
3-
version: 0.1.2
3+
version: 0.1.3
44
homepage: https://github.com/leanflutter/uni_links_desktop
55

66
platforms:

0 commit comments

Comments
 (0)