Skip to content

Commit 854cf36

Browse files
committed
add url links
1 parent d04e900 commit 854cf36

File tree

5 files changed

+72
-9
lines changed

5 files changed

+72
-9
lines changed

lib/landing/landing_screen.dart

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:flutter/material.dart';
22
import 'package:flutter_screenutil/flutter_screenutil.dart';
33
import 'package:routemaster/routemaster.dart';
4+
import 'package:url_launcher/url_launcher.dart';
45

56
import '../animations/hover_lift_and_rise.dart';
67

@@ -67,21 +68,36 @@ class LandingScreen extends StatelessWidget {
6768
mainAxisAlignment: MainAxisAlignment.end,
6869
children: <Widget>[
6970
HoverLiftAndRise(
70-
child: Image.asset(
71-
"assets/logos/github.png",
72-
width: 40,
71+
child: GestureDetector(
72+
onTap: () async {
73+
await launch("https://github.com/appwrite/appwrite");
74+
},
75+
child: Image.asset(
76+
"assets/logos/github.png",
77+
width: 40,
78+
),
7379
),
7480
),
7581
HoverLiftAndRise(
76-
child: Image.asset(
77-
"assets/logos/twitter.png",
78-
width: 40,
82+
child: GestureDetector(
83+
onTap: () async {
84+
await launch("https://twitter.com/appwrite_io");
85+
},
86+
child: Image.asset(
87+
"assets/logos/twitter.png",
88+
width: 40,
89+
),
7990
),
8091
),
8192
HoverLiftAndRise(
82-
child: Image.asset(
83-
"assets/logos/appwrite.png",
84-
width: 40,
93+
child: GestureDetector(
94+
onTap: () async {
95+
await launch("https://appwrite.io/");
96+
},
97+
child: Image.asset(
98+
"assets/logos/appwrite.png",
99+
width: 40,
100+
),
85101
),
86102
),
87103
],

pubspec.lock

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,48 @@ packages:
497497
url: "https://pub.dartlang.org"
498498
source: hosted
499499
version: "2.0.4"
500+
url_launcher:
501+
dependency: "direct main"
502+
description:
503+
name: url_launcher
504+
url: "https://pub.dartlang.org"
505+
source: hosted
506+
version: "6.0.4"
507+
url_launcher_linux:
508+
dependency: transitive
509+
description:
510+
name: url_launcher_linux
511+
url: "https://pub.dartlang.org"
512+
source: hosted
513+
version: "2.0.0"
514+
url_launcher_macos:
515+
dependency: transitive
516+
description:
517+
name: url_launcher_macos
518+
url: "https://pub.dartlang.org"
519+
source: hosted
520+
version: "2.0.0"
521+
url_launcher_platform_interface:
522+
dependency: transitive
523+
description:
524+
name: url_launcher_platform_interface
525+
url: "https://pub.dartlang.org"
526+
source: hosted
527+
version: "2.0.3"
528+
url_launcher_web:
529+
dependency: transitive
530+
description:
531+
name: url_launcher_web
532+
url: "https://pub.dartlang.org"
533+
source: hosted
534+
version: "2.0.0"
535+
url_launcher_windows:
536+
dependency: transitive
537+
description:
538+
name: url_launcher_windows
539+
url: "https://pub.dartlang.org"
540+
source: hosted
541+
version: "2.0.0"
500542
vector_math:
501543
dependency: transitive
502544
description:

pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies:
2828
flutter_riverpod: ^0.14.0+3
2929
flutter_screenutil: ^5.0.0+2
3030
routemaster: ^0.9.0-dev2
31+
url_launcher: ^6.0.4
3132

3233
dev_dependencies:
3334
flutter_test:

windows/flutter/generated_plugin_registrant.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
#include "generated_plugin_registrant.h"
66

7+
#include <url_launcher_windows/url_launcher_plugin.h>
78

89
void RegisterPlugins(flutter::PluginRegistry* registry) {
10+
UrlLauncherPluginRegisterWithRegistrar(
11+
registry->GetRegistrarForPlugin("UrlLauncherPlugin"));
912
}

windows/flutter/generated_plugins.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44

55
list(APPEND FLUTTER_PLUGIN_LIST
6+
url_launcher_windows
67
)
78

89
set(PLUGIN_BUNDLED_LIBRARIES)

0 commit comments

Comments
 (0)