-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50dede8
commit bd0f4a7
Showing
460 changed files
with
20,771 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
**/doc/api/ | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
build/ | ||
|
||
# Desktop & Web related | ||
**/GeneratedPlugins.props | ||
**/generated_plugin_registrant.cc | ||
**/generated_plugins.mk | ||
**/generated_plugin_registrant.dart | ||
|
||
# Exceptions to above rules. | ||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages | ||
|
||
# Sample data | ||
sample_data | ||
spikes/contacts_creator/*.csv | ||
|
||
# Firebase | ||
/.firebase | ||
.firebaserc | ||
firebase.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Copyright 2020 gskinner.com, inc. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,83 @@ | ||
Chirp? | ||
# Flokk | ||
A fresh and modern Google Contacts manager that integrates with GitHub and Twitter. | ||
|
||
## Demo Builds | ||
- Web: https://flokk.app | ||
- Linux: https://snapcraft.io/flokk-contacts | ||
- macOS: https://flokk.app/macos/Flokk_Contacts_v1.0.1.dmg | ||
- Windows: https://flokk.app/windows/Flokk_Contacts_v1.0.1.zip | ||
|
||
## Getting Set Up | ||
|
||
### 1. Flutter | ||
|
||
- Follow the install instructions here: https://flutter.dev/docs/get-started/install | ||
- Desktop-specific info: https://flutter.dev/desktop, https://github.com/flutter/flutter/wiki/Desktop-shells | ||
- Flokk was built on the bleeding edge of Flutter, so make sure to use their the `master` branch in their git repo and checkout commit `9c3f0faa6d`. | ||
- We're aiming to upgrade to an official Flutter version soon to make this easier. | ||
|
||
### 2. Add Required API Keys | ||
|
||
Google Sign In is required in order to run the app (unless running with [cached data](#running-with-cached-data)). You will need to provide your own Google API keys in the `/lib/api_keys.dart` file. Follow the instructions here to create them: | ||
- https://developers.google.com/people/v1/how-tos/authorizing#APIKey | ||
|
||
To optionally fetch social data for your contacts, add your own API keys for those as well: | ||
- Twitter: https://developer.twitter.com/en/docs/basics/getting-started | ||
- GitHub: https://developer.github.com/v3/guides/basics-of-authentication/ | ||
|
||
Although the Twitter and GitHub keys are optional, they are recommended. Otherwise the app will not be able to fetch tweets and GitHub calls will be subject to a rate limit (https://developer.github.com/v3/#rate-limiting). | ||
|
||
### Web Builds | ||
If you're building for web: | ||
- Edit `/web/index.html` to include your web credentials (web client Id) `<meta name="google-signin-client_id" content="YOUR_GOOGLE_SIGN_IN_OAUTH_CLIENT_ID.apps.googleusercontent.com">`. | ||
- This is needed for Google Sign In to work on web builds. For more details, see https://pub.dev/packages/google_sign_in_web | ||
|
||
#### CORS Proxy | ||
For Twitter support to work on web builds, it is necessary to use a CORS proxy. You can set up a proxy on your own domain, or else run a localhost instance with `proxy/app.js`. | ||
|
||
If setting up on your domain, ensure you have enabled https (https://letsencrypt.org/). Once you have the security certificate, edit `proxy/app.js` and insert your cert and key. This is not necessary if running a localhost instance. | ||
|
||
After the proxy is set up, edit `services/twitter_rest_service.dart` to point to your running proxy instance (e.g. "https://my-proxy.com", "http://localhost", etc.) | ||
|
||
For more information, see https://github.com/Rob--W/cors-anywhere | ||
|
||
## Running With Cached Data | ||
If you simply want to see the app running, it is possible to run the app using cached data: | ||
- Run the app at least once, to create your data folders | ||
- Extract the _contents_ of /sample_data.zip to the newly created data folder on your machine: | ||
- Windows: \Users\\[USER]\AppData\Roaming\Flokk Contacts | ||
- Linux: $HOME/.local/share/flokk-contacts | ||
- macOS: /Users/[USER]/Library/Containers/app.flokk/Data/Library/Application Support/app.flokk | ||
- Overwrite any files that are there | ||
- Launch the app again, it should now sign in, and load with existing data. | ||
- If you sign out, your saved data will be wiped and you will need to repeat the process. | ||
|
||
Note: This is meant as a 'read-only' mode so you can quickly explore all the widgets and features of the app. Updates, deletes, etc are not expected to work. | ||
|
||
## Test & Build | ||
Debug Builds | ||
- Use `flutter run -d DEVICE_ID` to deploy a test build | ||
- To get a list of available DEVICE_ID, use `flutter run` | ||
- Typical values are: `windows`, `linux`, `macos`, `chrome` | ||
- Add `--release` to deploy an optimized build | ||
|
||
Release Builds | ||
- Use `flutter build PACKAGE_TYPE` to build a release package | ||
- To get a list of available PACKAGE_TYPE, use `flutter build` | ||
- Typical values are `windows`, `linux`, `apk`, `ios` | ||
- In order to build the snap package one must first run `lxd init` on your system if you haven't already. | ||
** Then execute `build.sh` to create the snap from the flutter build | ||
|
||
Force Log In | ||
- The app uses a `kForceWebLogin` flag to force release builds to skip the oauth screen. | ||
- Add `--dart-define=flokk.forceWebLogin=true` to your build command to enable | ||
- E.g. `flutter build web --dart-define=flokk.forceWebLogin=true` | ||
|
||
## Desktop Runners | ||
The /linux and /windows folders contain modifications and should not be upgraded to upstream without first verifying that each plugin works correctly with the new upstream code and any modifications are made. | ||
|
||
Since the desktop runners for this project may contain modifications, upgrades should not be made without first verifying that every plugin and embedder can be upgraded and that they remain compatible after an upgrade. Hopefully this will not be as much of an issue once Flutter's desktop support becomes more mature. | ||
|
||
-- | ||
|
||
Happy Flokking! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
**/doc/api/ | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
/build/ | ||
deploy/ | ||
.firebase/ | ||
|
||
# Web related | ||
lib/generated_plugin_registrant.dart | ||
|
||
# Generated files | ||
lib/hidden_api_keys.dart | ||
linux/flutter/generated_plugins.mk | ||
|
||
# Symbolication related | ||
app.*.symbols | ||
|
||
# Exceptions to above rules. | ||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file tracks properties of this Flutter project. | ||
# Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
# | ||
# This file should be version controlled and should not be manually edited. | ||
|
||
version: | ||
revision: ec9813a5005f4c3e75a5a9f42ce53ae280959085 | ||
channel: master | ||
|
||
project_type: app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Flutter", | ||
"request": "launch", | ||
"type": "dart" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
See the README on the main git repo. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
|
||
|
||
exclude: | ||
- "strings.dart" | ||
|
||
analyzer: | ||
strong-mode: | ||
implicit-dynamic: true | ||
implicit-casts: true | ||
errors: | ||
unused_import: warning | ||
unused_local_variable: warning | ||
dead_code: warning | ||
enable-experiment: | ||
- extension-methods | ||
|
||
# Lint rules and documentation, see http://dart-lang.github.io/linter/lints | ||
linter: | ||
rules: | ||
- annotate_overrides | ||
#- avoid_unused_constructor_parameters | ||
- await_only_futures | ||
- camel_case_types | ||
- cancel_subscriptions | ||
- directives_ordering | ||
- empty_catches | ||
- empty_statements | ||
- hash_and_equals | ||
- iterable_contains_unrelated_type | ||
- list_remove_unrelated_type | ||
- no_adjacent_strings_in_list | ||
- no_duplicate_case_values | ||
#- non_constant_identifier_names | ||
- only_throw_errors | ||
- overridden_fields | ||
- prefer_collection_literals | ||
- prefer_conditional_assignment | ||
- prefer_contains | ||
- prefer_final_fields | ||
#- prefer_final_locals | ||
- prefer_initializing_formals | ||
- prefer_interpolation_to_compose_strings | ||
- prefer_is_empty | ||
- prefer_is_not_empty | ||
- prefer_typing_uninitialized_variables | ||
- recursive_getters | ||
- slash_for_doc_comments | ||
- test_types_in_equals | ||
- throw_in_finally | ||
- type_init_formals | ||
#- unawaited_futures | ||
- unnecessary_brace_in_string_interps | ||
- unnecessary_getters_setters | ||
- unnecessary_lambdas | ||
- unnecessary_new | ||
- unnecessary_null_aware_assignments | ||
- unnecessary_statements | ||
- unnecessary_this | ||
- unrelated_type_equality_checks | ||
- use_rethrow_when_possible | ||
- valid_regexps |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
abstract class AbstractApiKeys { | ||
String get googleClientId; | ||
|
||
String get googleClientSecret; | ||
|
||
String get googleWebClientId; | ||
|
||
String get twitterKey; | ||
|
||
String get twitterSecret; | ||
|
||
String get githubKey; | ||
|
||
String get githubSecret; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
/// An animated sliding container, optimized to hide it's children when closed. | ||
class AnimatedPanel extends StatefulWidget { | ||
final bool isClosed; | ||
final double closedX; | ||
final double closedY; | ||
final double duration; | ||
final Curve curve; | ||
final Widget child; | ||
|
||
const AnimatedPanel({Key key, this.isClosed, this.closedX, this.closedY, this.duration, this.curve, this.child}) | ||
: super(key: key); | ||
|
||
@override | ||
_AnimatedPanelState createState() => _AnimatedPanelState(); | ||
} | ||
|
||
class _AnimatedPanelState extends State<AnimatedPanel> { | ||
bool _isHidden = true; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
Offset closePos = Offset(widget.closedX ?? 0, widget.closedY ?? 0); | ||
double duration = _isHidden && widget.isClosed ? 0 : widget.duration; | ||
return TweenAnimationBuilder( | ||
curve: widget.curve ?? Curves.easeOut, | ||
tween: Tween<Offset>( | ||
begin: !widget.isClosed ? Offset.zero : closePos, | ||
end: !widget.isClosed ? Offset.zero : closePos, | ||
), | ||
duration: Duration(milliseconds: (duration * 1000).round()), | ||
builder: (_, Offset value, Widget c) { | ||
_isHidden = widget.isClosed && value == Offset(widget.closedX, widget.closedY); | ||
return _isHidden ? Container() : Transform.translate(offset: value, child: c); | ||
}, | ||
child: widget.child, | ||
); | ||
} | ||
} | ||
|
||
extension AnimatedPanelExtensions on Widget { | ||
Widget animatedPanelX({double closeX, bool isClosed, double duration = .35, Curve curve}) => | ||
animatedPanel(closePos: Offset(closeX, 0), isClosed: isClosed, curve: curve, duration: duration); | ||
|
||
Widget animatedPanelY({double closeY, bool isClosed, double duration = .35, Curve curve}) => | ||
animatedPanel(closePos: Offset(0, closeY), isClosed: isClosed, curve: curve, duration: duration); | ||
|
||
Widget animatedPanel({Offset closePos, bool isClosed, double duration = .35, Curve curve}) { | ||
return AnimatedPanel( | ||
closedX: closePos.dx, closedY: closePos.dy, child: this, isClosed: isClosed, duration: duration, curve: curve); | ||
} | ||
} |
Oops, something went wrong.