From ed3b0b5715fedbf41f1a39bd4423c4cbbe0f7654 Mon Sep 17 00:00:00 2001 From: Daniel Milnes Date: Sat, 14 Jul 2018 22:45:23 +0100 Subject: [PATCH] Add Discord Link to Sidebar (#16) * Add Entries to Android Gitignore * Updated Gitignore Used modified version of https://www.gitignore.io/api/dart,swift,windows,flutter,androidstudio,visualstudiocode * Add Url_Launcher to pubspec https://pub.dartlang.org/packages/url_launcher * Add Link to Discord Server to Sidebar --- .gitignore | 237 ++++++++++++++++++++++++++++++++++++++- android/.gitignore | 2 + lib/pages/home_page.dart | 7 ++ pubspec.lock | 9 +- pubspec.yaml | 1 + 5 files changed, 250 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index e135b58..4377732 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,239 @@ + +# Created by https://www.gitignore.io/api/dart,swift,windows,flutter,androidstudio,visualstudiocode + +### AndroidStudio ### +# Covers files to be ignored for android development using Android Studio. + +# Built application files +*.apk +*.ap_ + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ + +# Gradle files +.gradle +.gradle/ +build/ + +# Signing files +.signing/ + +# Local configuration file (sdk path, etc) +local.properties + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files +*.log + +# Android Studio +/*/build/ +/*/local.properties +/*/out +/*/*/build +/*/*/production +captures/ +.navigation/ +*.ipr +*~ +*.swp + +# Android Patch +gen-external-apklibs + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild + +# NDK +obj/ + +# IntelliJ IDEA +*.iml +*.iws +/out/ + +# User-specific configurations +.idea + +# OS-specific files .DS_Store -.dart_tool/ +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Legacy Eclipse project files +.classpath +.project +.cproject +.settings/ + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.war +*.ear + +# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml) +hs_err_pid* + +## Plugin-specific files: + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Mongo Explorer plugin +.idea/mongoSettings.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties +### AndroidStudio Patch ### + +!/gradle/wrapper/gradle-wrapper.jar + +### Dart ### +# See https://www.dartlang.org/guides/libraries/private-files + +# Files and directories created by pub +.dart_tool/ .packages .pub/ +# If you're building an application, you may want to check-in your pubspec.lock +pubspec.lock -build/ -.idea/ -.vscode/ -.packages +# Directory created by dartdoc +# If you don't generate documentation locally you can remove this line. +doc/api/ + +# Avoid committing generated Javascript files: +*.dart.js +*.info.json # Produced by the --dump-info flag. +*.js # When generated by dart2js. Don't specify *.js if your + # project includes source files written in JavaScript. +*.js_ +*.js.deps +*.js.map +### Flutter ### .flutter-plugins + +### Swift ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ +# +# Add this line if you want to avoid checking in source code from the Xcode workspace +# *.xcworkspace + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output + +### VisualStudioCode ### +.vscode/* + +### Windows ### +# Windows thumbnail cache files +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + + +# End of https://www.gitignore.io/api/dart,swift,windows,flutter,androidstudio,visualstudiocode diff --git a/android/.gitignore b/android/.gitignore index 65b7315..afa425e 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -8,3 +8,5 @@ /build /captures GeneratedPluginRegistrant.java +/app/release +.idea diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index 159ef1b..7b8cb33 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; +import 'package:url_launcher/url_launcher.dart'; + import 'package:firebase_database/firebase_database.dart'; import 'package:firebase_analytics/firebase_analytics.dart'; @@ -79,6 +81,11 @@ class _HomePageState extends State { Navigator.pop(context); }); }), + new ListItem(Icons.people, "Discord", (){setState( + (){ + launch("https://discord.gg/Kf8n5rT"); + }); + }), ], ), ), diff --git a/pubspec.lock b/pubspec.lock index 3e830f2..bbbd79f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -436,6 +436,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.5" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.3" utf: dependency: transitive description: @@ -486,5 +493,5 @@ packages: source: hosted version: "2.1.13" sdks: - dart: ">=2.0.0-dev.52.0 <=2.0.0-dev.54.0.flutter-46ab040e58" + dart: ">=2.0.0-dev.52.0 <=2.0.0-dev.58.0.flutter-f981f09760" flutter: ">=0.1.4 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index af34dc5..11daf0e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -19,6 +19,7 @@ dependencies: html2md: "^0.1.7" flutter_markdown: "^0.1.5" intl: "^0.15.6" + url_launcher: "^3.0.3" dev_dependencies: flutter_test: