Skip to content

Commit

Permalink
Merge pull request #403 from ARYPROGRAMMER/feat/discord-uri-working
Browse files Browse the repository at this point in the history
feat: the discord icon redirects to discord page of aossie
  • Loading branch information
AyaNady17 authored Dec 11, 2024
2 parents 84b74ba + f0528a7 commit 134f128
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
2 changes: 2 additions & 0 deletions lib/utils/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ const String verificationCollectionID = "64a7c0100eabfe8d3844";

// Github Constants
const String githubRepoUrl = "https://github.com/AOSSIE-Org/Resonate";
const String discordRepoUrl = "https://discord.com/invite/6mFZ2S846n";
const String xPageUrl = "https://x.com/aossie_org";

//Authentication Error types
const String userInvalidCredentials = 'user_invalid_credentials';
Expand Down
26 changes: 20 additions & 6 deletions lib/views/screens/contribute_screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:resonate/utils/ui_sizes.dart';
import 'package:url_launcher/url_launcher.dart';

Expand Down Expand Up @@ -85,21 +86,34 @@ class ContributeScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
IconButton(
onPressed: () {},
onPressed: () {
Uri url = Uri.parse(xPageUrl);
try {
launchUrl(url);
} catch (e) {
log("Error launching URL: ${e.toString()}");
}
},
icon: Icon(
Icons.telegram_rounded,
FontAwesomeIcons.xTwitter,
size: UiSizes.size_40,
),
tooltip: "Join telegram channel",
tooltip: "Follow us on X",
),
IconButton(
onPressed: () {},
onPressed: () {
Uri url = Uri.parse(discordRepoUrl);
try {
launchUrl(url);
} catch (e) {
log("Error launching URL: ${e.toString()}");
}
},
icon: Icon(
Icons.discord,
size: UiSizes.size_40,
),
tooltip: "Join discord server",

)
],
),
Expand All @@ -120,4 +134,4 @@ class ContributeScreen extends StatelessWidget {
),
);
}
}
}

0 comments on commit 134f128

Please sign in to comment.