Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: the discord icon redirects to discord page of aossie #403

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions lib/utils/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,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 {
),
);
}
}
}