Repository: MlxChange/BestGithub
Branch: master
Commit: 9a4b90c19c1b
Files: 102
Total size: 377.8 KB
Directory structure:
gitextract_27c5e4gt/
├── .firebaserc
├── .flutter-plugins
├── .flutter-plugins-dependencies
├── .gitignore
├── .metadata
├── .packages
├── LICENSE.md
├── Privacy_Policy.md
├── analysis_options.yaml
├── android/
│ ├── .gitignore
│ ├── app/
│ │ ├── build.gradle
│ │ ├── google-services.json
│ │ ├── keystore/
│ │ │ ├── chatdebug.keystore
│ │ │ └── chatdebug.keystore.save
│ │ ├── proguard-rules.pro
│ │ └── src/
│ │ └── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── dfa/
│ │ │ └── flutterchatdemo/
│ │ │ └── MainActivity.java
│ │ └── res/
│ │ ├── drawable/
│ │ │ └── launch_background.xml
│ │ └── values/
│ │ ├── colors.xml
│ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle/
│ │ └── wrapper/
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradle.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── assets/
│ └── fonts/
│ └── montserrat/
│ └── OFL.txt
├── firebase.json
├── functions/
│ ├── .eslintrc.json
│ ├── .gitignore
│ ├── index.js
│ └── package.json
├── ios/
│ ├── .gitignore
│ ├── Flutter/
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── flutter_export_environment.sh
│ ├── GoogleService-Info.plist
│ ├── Podfile
│ ├── Runner/
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets/
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.imageset/
│ │ │ ├── Contents.json
│ │ │ └── README.md
│ │ ├── Base.lproj/
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── main.m
│ ├── Runner.xcodeproj/
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata/
│ │ └── xcschemes/
│ │ └── Runner.xcscheme
│ └── Runner.xcworkspace/
│ ├── contents.xcworkspacedata
│ └── xcshareddata/
│ ├── IDEWorkspaceChecks.plist
│ └── WorkspaceSettings.xcsettings
├── lib/
│ ├── DataModel.dart
│ ├── E2EE/
│ │ ├── e2ee.dart
│ │ ├── key.dart
│ │ └── x25519.dart
│ ├── GiphyPicker/
│ │ ├── giphy_picker.dart
│ │ └── src/
│ │ ├── model/
│ │ │ ├── giphy_repository.dart
│ │ │ └── repository.dart
│ │ └── widgets/
│ │ ├── giphy_context.dart
│ │ ├── giphy_image.dart
│ │ ├── giphy_overlay.dart
│ │ ├── giphy_preview_page.dart
│ │ ├── giphy_search_page.dart
│ │ ├── giphy_search_view.dart
│ │ ├── giphy_thumbnail.dart
│ │ └── giphy_thumbnail_grid.dart
│ ├── ImagePicker/
│ │ └── image_picker.dart
│ ├── alias.dart
│ ├── bubble.dart
│ ├── chat.dart
│ ├── chat_controller.dart
│ ├── const.dart
│ ├── login.dart
│ ├── main.dart
│ ├── message.dart
│ ├── open_settings.dart
│ ├── photo_view.dart
│ ├── save.dart
│ ├── screens/
│ │ ├── feed_five_page.dart
│ │ ├── home.dart
│ │ ├── main_screen.dart
│ │ └── profile.dart
│ ├── seen_provider.dart
│ ├── seen_state.dart
│ ├── settings.dart
│ ├── util/
│ │ ├── GradientUtil.dart
│ │ ├── SizeUtil.dart
│ │ ├── color_const.dart
│ │ └── const.dart
│ ├── utils.dart
│ └── widgets/
│ ├── chat_bubble.dart
│ ├── chat_item.dart
│ ├── icon_badge.dart
│ ├── post_item.dart
│ ├── signup_apbar.dart
│ └── signup_arrow_button.dart
└── pubspec.yaml
================================================
FILE CONTENTS
================================================
================================================
FILE: .firebaserc
================================================
{
"projects": {
"default": "amitjoki-enigma"
}
}
================================================
FILE: .flutter-plugins
================================================
# This is a generated file; do not edit or check into version control.
cloud_firestore=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\cloud_firestore-0.12.11\\
contacts_service=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\contacts_service-0.2.9\\
file_picker=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\file_picker-1.5.0+2\\
firebase_auth=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\firebase_auth-0.11.1+12\\
firebase_core=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\firebase_core-0.4.4+3\\
firebase_core_web=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\firebase_core_web-0.1.1+2\\
firebase_messaging=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\firebase_messaging-5.1.8\\
firebase_storage=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\firebase_storage-3.1.3\\
flutter_plugin_android_lifecycle=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\flutter_plugin_android_lifecycle-1.0.6\\
flutter_secure_storage=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\flutter_secure_storage-3.3.1+1\\
fluttertoast=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\fluttertoast-3.1.3\\
image_cropper=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\image_cropper-1.2.1\\
image_picker=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\image_picker-0.6.3+4\\
launch_review=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\launch_review-2.0.0\\
local_auth=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\local_auth-0.4.0+1\\
path_provider=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\path_provider-1.6.5\\
path_provider_macos=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\path_provider_macos-0.0.4\\
permission_handler=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\permission_handler-3.3.0\\
share=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\share-0.6.3+6\\
shared_preferences=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\shared_preferences-0.5.6+3\\
shared_preferences_macos=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\shared_preferences_macos-0.0.1+6\\
shared_preferences_web=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\shared_preferences_web-0.1.2+4\\
sqflite=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\sqflite-1.3.0\\
url_launcher=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\url_launcher-5.4.2\\
url_launcher_macos=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\url_launcher_macos-0.0.1+4\\
url_launcher_web=F:\\tools\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\url_launcher_web-0.1.1+1\\
================================================
FILE: .flutter-plugins-dependencies
================================================
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"cloud_firestore","dependencies":["firebase_core"]},{"name":"contacts_service","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"firebase_auth","dependencies":["firebase_core"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_messaging","dependencies":[]},{"name":"firebase_storage","dependencies":["firebase_core"]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":[]},{"name":"fluttertoast","dependencies":[]},{"name":"image_cropper","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"launch_review","dependencies":[]},{"name":"local_auth","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"share","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}]}
================================================
FILE: .gitignore
================================================
# Project exclude paths
/build/
================================================
FILE: .metadata
================================================
# 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: c7ea3ca377e909469c68f2ab878a5bc53d3cf66b
channel: beta
================================================
FILE: .packages
================================================
# Generated by pub on 2020-04-04 23:16:35.612545.
after_layout:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/after_layout-1.0.7+2/lib/
args:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.5.4/lib/
asn1lib:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/asn1lib-0.5.15/lib/
async:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.4.1/lib/
cached_network_image:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/cached_network_image-2.0.0/lib/
charcode:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.3/lib/
clock:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/clock-1.0.1/lib/
cloud_firestore:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/cloud_firestore-0.12.11/lib/
collection:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.11/lib/
common_utils:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/common_utils-1.1.3/lib/
contacts_service:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/contacts_service-0.2.9/lib/
convert:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.1.1/lib/
crypto:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.1.4/lib/
cupertino_icons:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/cupertino_icons-0.1.3/lib/
decimal:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/decimal-0.3.5/lib/
diacritic:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/diacritic-0.1.1/lib/
dio:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/dio-3.0.9/lib/
encrypt:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/encrypt-3.3.1/lib/
file_picker:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/file_picker-1.5.0+2/lib/
firebase:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/firebase-7.2.1/lib/
firebase_auth:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/firebase_auth-0.11.1+12/lib/
firebase_core:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/firebase_core-0.4.4+3/lib/
firebase_core_platform_interface:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/firebase_core_platform_interface-1.0.4/lib/
firebase_core_web:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/firebase_core_web-0.1.1+2/lib/
firebase_messaging:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/firebase_messaging-5.1.8/lib/
firebase_storage:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/firebase_storage-3.1.3/lib/
flustars:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/flustars-0.2.6+1/lib/
flutter:file:///F:/tools/flutter/packages/flutter/lib/
flutter_cache_manager:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_cache_manager-1.1.3/lib/
flutter_plugin_android_lifecycle:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-1.0.6/lib/
flutter_secure_storage:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_secure_storage-3.3.1+1/lib/
flutter_spinkit:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_spinkit-4.1.2+1/lib/
flutter_web_plugins:file:///F:/tools/flutter/packages/flutter_web_plugins/lib/
fluttertoast:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-3.1.3/lib/
giphy_client:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/giphy_client-0.2.0/lib/
http:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/http-0.12.0+4/lib/
http_parser:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.3/lib/
image_cropper:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_cropper-1.2.1/lib/
image_picker:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.3+4/lib/
intl:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/intl-0.15.8/lib/
js:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.1+1/lib/
launch_review:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/launch_review-2.0.0/lib/
local_auth:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/local_auth-0.4.0+1/lib/
localstorage:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/localstorage-3.0.1+4/lib/
marquee:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/marquee-1.3.1/lib/
matcher:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.6/lib/
meta:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.8/lib/
mime:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/mime-0.9.6+3/lib/
ntp:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/ntp-1.0.5/lib/
path:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.4/lib/
path_provider:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.5/lib/
path_provider_macos:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4/lib/
path_provider_platform_interface:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_platform_interface-1.0.1/lib/
pedantic:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.9.0/lib/
permission_handler:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/permission_handler-3.3.0/lib/
photo_view:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/photo_view-0.4.2/lib/
platform:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/platform-2.2.1/lib/
plugin_platform_interface:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/plugin_platform_interface-1.0.2/lib/
pointycastle:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/pointycastle-1.0.2/lib/
quiver:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.1.3/lib/
rational:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/rational-0.3.8/lib/
rxdart:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/rxdart-0.23.1/lib/
scoped_model:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/scoped_model-1.0.1/lib/
sentry:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/sentry-2.3.1/lib/
share:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/share-0.6.3+6/lib/
shared_preferences:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.6+3/lib/
shared_preferences_macos:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+6/lib/
shared_preferences_platform_interface:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_platform_interface-1.0.3/lib/
shared_preferences_web:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+4/lib/
sky_engine:file:///F:/tools/flutter/bin/cache/pkg/sky_engine/lib/
source_span:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.6.0/lib/
sqflite:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.0/lib/
sqflite_common:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite_common-1.0.0+1/lib/
stack_trace:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3/lib/
string_scanner:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.5/lib/
synchronized:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/synchronized-2.2.0/lib/
term_glyph:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0/lib/
typed_data:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6/lib/
url_launcher:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.4.2/lib/
url_launcher_macos:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+4/lib/
url_launcher_platform_interface:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_platform_interface-1.0.6/lib/
url_launcher_web:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.1+1/lib/
usage:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/usage-3.4.1/lib/
uuid:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/uuid-2.0.4/lib/
vector_math:file:///F:/tools/flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8/lib/
Enigma:lib/
================================================
FILE: LICENSE.md
================================================
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
.
================================================
FILE: Privacy_Policy.md
================================================
# Privacy Policy
Effective date: April 18, 2019
Enigma ("us", "we", or "our") operates the Enigma mobile application (the "Service").
This page informs you of our policies regarding the collection, use, and disclosure of personal data when you use our Service and the choices you have associated with that data.
We use your data to provide and improve the Service. By using the Service, you agree to the collection and use of information in accordance with this policy. Unless otherwise defined in this Privacy Policy, terms used in this Privacy Policy have the same meanings as in our Terms and Conditions.
## Information Collection And Use
We collect several different types of information for various purposes to provide and improve our Service to you.
### Types of Data Collected
While using our Service, we may ask you to provide us with certain personally identifiable information that can be used to contact or identify you ("Personal Data"). Personally identifiable information may include, but is not limited to:
* Your account information
* Your contacts
* Your messages
* Cookies and Usage Data
### Your account information
You provide us your phone number for authentication purpose as well as to help other people connect to you. You may also add additional information to identify yourself across our Services such as your name, status, profile picture.
### Your contacts
Similar to how others can connect to you with your provided phone number, you can connect to others for which you provide the contacts in your mobile address book. These information will solely be used to identify prospective connections that you may make through our Services.
### Your messages
Your messages may include, but is not limited to:
* Text Messages
* Similies or Emoticons
* Photos
The above information provided by you will be solely used to commmunicate with your connections. The security of these information is maintained during uploading and storing of the data by encryption provided by the Firebase service.
You are in complete control of your messages and can delete your messages at any point of time. Messages once deleted are deleted permanently with no other copies anywhere on the server.
### Usage Data
When you access the Service by or through a mobile device, we may collect certain information automatically, including, but not limited to, the type of mobile device you use, your mobile device unique ID, the IP address of your mobile device, your mobile operating system, the type of mobile Internet browser you use, unique device identifiers and other diagnostic data ("Usage Data").
### Tracking & Cookies Data
We use cookies and similar tracking technologies to track the activity on our Service and hold certain information.
Cookies are files with small amount of data which may include an anonymous unique identifier. Cookies are sent to your browser from a website and stored on your device. Tracking technologies also used are beacons, tags, and scripts to collect and track information and to improve and analyze our Service.
You can instruct your browser to refuse all cookies or to indicate when a cookie is being sent. However, if you do not accept cookies, you may not be able to use some portions of our Service.
Examples of Cookies we use:
* **Session Cookies.** We use Session Cookies to operate our Service.
* **Preference Cookies.** We use Preference Cookies to remember your preferences and various settings.
* **Security Cookies.** We use Security Cookies for security purposes.
## Use of Data
Enigma uses the collected data for various purposes:
* To provide and maintain the Service
* To notify you about changes to our Service
* To allow you to participate in interactive features of our Service when you choose to do so
* To provide customer care and support
* To provide analysis or valuable information so that we can improve the Service
* To monitor the usage of the Service
* To detect, prevent and address technical issues
## Transfer Of Data
Your information, including Personal Data, may be transferred to — and maintained on — computers located outside of your state, province, country or other governmental jurisdiction where the data protection laws may differ than those from your jurisdiction.
If you are located outside India and choose to provide information to us, please note that we transfer the data, including Personal Data, to India and process it there.
Your consent to this Privacy Policy followed by your submission of such information represents your agreement to that transfer.
Enigma will take all steps reasonably necessary to ensure that your data is treated securely and in accordance with this Privacy Policy and no transfer of your Personal Data will take place to an organization or a country unless there are adequate controls in place including the security of your data and other personal information.
## Disclosure Of Data
### Legal Requirements
Enigma may disclose your Personal Data in the good faith belief that such action is necessary to:
* To comply with a legal obligation
* To protect and defend the rights or property of Enigma
* To prevent or investigate possible wrongdoing in connection with the Service
* To protect the personal safety of users of the Service or the public
* To protect against legal liability
## Security Of Data
The security of your data is important to us, but remember that no method of transmission over the Internet, or method of electronic storage is 100% secure. While we strive to use commercially acceptable means to protect your Personal Data, we cannot guarantee its absolute security.
## Service Providers
We may employ third party companies and individuals to facilitate our Service ("Service Providers"), to provide the Service on our behalf, to perform Service-related services or to assist us in analyzing how our Service is used.
These third parties have access to your Personal Data only to perform these tasks on our behalf and are obligated not to disclose or use it for any other purpose.
### Analytics
We may use third-party Service Providers to monitor and analyze the use of our Service.
#### Google Analytics
Google Analytics is a web analytics service offered by Google that tracks and reports website traffic. Google uses the data collected to track and monitor the use of our Service. This data is shared with other Google services. Google may use the collected data to contextualize and personalize the ads of its own advertising network.
You may opt-out of certain Google Analytics features through your mobile device settings, such as your device advertising settings or by following the instructions provided by Google in their Privacy Policy: [https://policies.google.com/privacy?hl=en](https://policies.google.com/privacy?hl=en)
For more information on the privacy practices of Google, please visit the Google Privacy & Terms web page: [https://policies.google.com/privacy?hl=en](https://policies.google.com/privacy?hl=en)
#### Firebase
Firebase is analytics service provided by Google Inc.
You may opt-out of certain Firebase features through your mobile device settings, such as your device advertising settings or by following the instructions provided by Google in their Privacy Policy: [https://policies.google.com/privacy?hl=en](https://policies.google.com/privacy?hl=en)
We also encourage you to review the Google's policy for safeguarding your data: [https://support.google.com/analytics/answer/6004245](https://support.google.com/analytics/answer/6004245). For more information on what type of information Firebase collects, please visit please visit the Google Privacy & Terms web page: [https://policies.google.com/privacy?hl=en](https://policies.google.com/privacy?hl=en)
## Links To Other Sites
Our Service may contain links to other sites that are not operated by us. If you click on a third party link, you will be directed to that third party's site. We strongly advise you to review the Privacy Policy of every site you visit.
We have no control over and assume no responsibility for the content, privacy policies or practices of any third party sites or services.
## Age Privacy
Our Service does not address anyone under the age of 13.
We do not knowingly collect personally identifiable information from anyone under the age of 13 (or such greater age required in your country for you to be authorized to use our Services without parental approval). If you are a parent or guardian and you are aware that your children has provided us with Personal Data, please contact us. If we become aware that we have collected Personal Data from children without verification of parental consent, we take steps to remove that information from our servers.
## Changes To This Privacy Policy
We may update our Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page.
We will let you know via email and/or a prominent notice on our Service, prior to the change becoming effective and update the "effective date" at the top of this Privacy Policy.
You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page.
## Contact Us
If you have any questions about this Privacy Policy, please contact us:
* By email: amitjoki@gmail.com
* By visiting this page on our website: https://amitjoki.github.io/Enigma/Privacy_Policy
================================================
FILE: analysis_options.yaml
================================================
linter:
rules:
- avoid_empty_else
- avoid_init_to_null
- avoid_relative_lib_imports
- avoid_return_types_on_setters
- avoid_shadowing_type_parameters
- avoid_types_as_parameter_names
- empty_constructor_bodies
- no_duplicate_case_values
- null_closures
- prefer_contains
- prefer_equal_for_default_values
- prefer_is_empty
- prefer_is_not_empty
- recursive_getters
- slash_for_doc_comments
- unawaited_futures
- unrelated_type_equality_checks
- use_rethrow_when_possible
- valid_regexps
================================================
FILE: android/.gitignore
================================================
*.iml
*.class
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
GeneratedPluginRegistrant.java
================================================
FILE: android/app/build.gradle
================================================
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false
}
defaultConfig {
applicationId "com.mlx.ZH"
minSdkVersion 18
targetSdkVersion 28
versionCode 13
versionName "2.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true //Insert this line
}
signingConfigs {
debug {
}
release {
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'com.google.firebase:firebase-auth:17.0.0'
implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0'
implementation 'com.google.firebase:firebase-messaging:18.0.0'
implementation 'com.google.firebase:firebase-core:16.0.9'
}
apply plugin: 'com.google.gms.google-services'
================================================
FILE: android/app/google-services.json
================================================
{
"project_info": {
"project_number": "380383165909",
"firebase_url": "https://wechat-af1e1.firebaseio.com",
"project_id": "wechat-af1e1",
"storage_bucket": "wechat-af1e1.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:380383165909:android:7a8c2f1621bd632310915c",
"android_client_info": {
"package_name": "com.blackhole.chat_app"
}
},
"oauth_client": [
{
"client_id": "380383165909-12o7mhi72tsvg28ij81nkndt50nrfepp.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.blackhole.chat_app",
"certificate_hash": "7984477e445cf4999eb2474f2c537f090dd62ee9"
}
},
{
"client_id": "380383165909-s8k7v2umgj3tarl4k0p57clma82qmihi.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDiqnr3_kgI6iofU7187VNLoAAcTEyU1bo"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "380383165909-s8k7v2umgj3tarl4k0p57clma82qmihi.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:380383165909:android:b559e6ef499cb1ce10915c",
"android_client_info": {
"package_name": "com.enigma.amitjoki"
}
},
"oauth_client": [
{
"client_id": "380383165909-qaihn47rhqch6cn8fa8cs1ibcqonemub.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.enigma.amitjoki",
"certificate_hash": "7984477e445cf4999eb2474f2c537f090dd62ee9"
}
},
{
"client_id": "380383165909-s8k7v2umgj3tarl4k0p57clma82qmihi.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDiqnr3_kgI6iofU7187VNLoAAcTEyU1bo"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "380383165909-s8k7v2umgj3tarl4k0p57clma82qmihi.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:380383165909:android:4d9db80f3c6a713410915c",
"android_client_info": {
"package_name": "com.mlx.ZH"
}
},
"oauth_client": [
{
"client_id": "380383165909-vcbgpnibdo97538imamg91cl9ve0voa6.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.mlx.ZH",
"certificate_hash": "7984477e445cf4999eb2474f2c537f090dd62ee9"
}
},
{
"client_id": "380383165909-s8k7v2umgj3tarl4k0p57clma82qmihi.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDiqnr3_kgI6iofU7187VNLoAAcTEyU1bo"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "380383165909-s8k7v2umgj3tarl4k0p57clma82qmihi.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:380383165909:android:0f6aa2b1d01a955910915c",
"android_client_info": {
"package_name": "com.mlx.memechat"
}
},
"oauth_client": [
{
"client_id": "380383165909-guhd14pf9kff354nsappcki1jhj29jn8.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.mlx.memechat",
"certificate_hash": "3d832e7cdc5817ccea06c41563180431703e3c11"
}
},
{
"client_id": "380383165909-s8k7v2umgj3tarl4k0p57clma82qmihi.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDiqnr3_kgI6iofU7187VNLoAAcTEyU1bo"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "380383165909-s8k7v2umgj3tarl4k0p57clma82qmihi.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
================================================
FILE: android/app/proguard-rules.pro
================================================
#Flutter Wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }
================================================
FILE: android/app/src/main/AndroidManifest.xml
================================================
================================================
FILE: android/app/src/main/java/com/dfa/flutterchatdemo/MainActivity.java
================================================
package com.mlx.ZH;
import android.os.Bundle;
import io.flutter.app.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneratedPluginRegistrant.registerWith(this);
}
}
================================================
FILE: android/app/src/main/res/drawable/launch_background.xml
================================================
-
================================================
FILE: android/app/src/main/res/values/colors.xml
================================================
#1e1e1e
================================================
FILE: android/app/src/main/res/values/styles.xml
================================================
================================================
FILE: android/build.gradle
================================================
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.androidx'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "26.1.0"
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
================================================
FILE: android/gradle/wrapper/gradle-wrapper.properties
================================================
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
================================================
FILE: android/gradle.properties
================================================
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableR8=true
================================================
FILE: android/gradlew
================================================
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
================================================
FILE: android/gradlew.bat
================================================
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
================================================
FILE: android/settings.gradle
================================================
include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}
================================================
FILE: assets/fonts/montserrat/OFL.txt
================================================
Copyright 2011 The Montserrat Project Authors (https://github.com/JulietaUla/Montserrat)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
================================================
FILE: firebase.json
================================================
{
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint"
]
}
}
================================================
FILE: functions/.eslintrc.json
================================================
{
"parserOptions": {
// Required for certain syntax usages
"ecmaVersion": 2017
},
"plugins": [
"promise"
],
"extends": "eslint:recommended",
"rules": {
// Removed rule "disallow the use of console" from recommended eslint rules
"no-console": "off",
// Removed rule "disallow multiple spaces in regular expressions" from recommended eslint rules
"no-regex-spaces": "off",
// Removed rule "disallow the use of debugger" from recommended eslint rules
"no-debugger": "off",
// Removed rule "disallow unused variables" from recommended eslint rules
"no-unused-vars": "off",
// Removed rule "disallow mixed spaces and tabs for indentation" from recommended eslint rules
"no-mixed-spaces-and-tabs": "off",
// Removed rule "disallow the use of undeclared variables unless mentioned in /*global */ comments" from recommended eslint rules
"no-undef": "off",
// Warn against template literal placeholder syntax in regular strings
"no-template-curly-in-string": 1,
// Warn if return statements do not either always or never specify values
"consistent-return": 1,
// Warn if no return statements in callbacks of array methods
"array-callback-return": 1,
// Require the use of === and !==
"eqeqeq": 2,
// Disallow the use of alert, confirm, and prompt
"no-alert": 2,
// Disallow the use of arguments.caller or arguments.callee
"no-caller": 2,
// Disallow null comparisons without type-checking operators
"no-eq-null": 2,
// Disallow the use of eval()
"no-eval": 2,
// Warn against extending native types
"no-extend-native": 1,
// Warn against unnecessary calls to .bind()
"no-extra-bind": 1,
// Warn against unnecessary labels
"no-extra-label": 1,
// Disallow leading or trailing decimal points in numeric literals
"no-floating-decimal": 2,
// Warn against shorthand type conversions
"no-implicit-coercion": 1,
// Warn against function declarations and expressions inside loop statements
"no-loop-func": 1,
// Disallow new operators with the Function object
"no-new-func": 2,
// Warn against new operators with the String, Number, and Boolean objects
"no-new-wrappers": 1,
// Disallow throwing literals as exceptions
"no-throw-literal": 2,
// Require using Error objects as Promise rejection reasons
"prefer-promise-reject-errors": 2,
// Enforce “for” loop update clause moving the counter in the right direction
"for-direction": 2,
// Enforce return statements in getters
"getter-return": 2,
// Disallow await inside of loops
"no-await-in-loop": 2,
// Disallow comparing against -0
"no-compare-neg-zero": 2,
// Warn against catch clause parameters from shadowing variables in the outer scope
"no-catch-shadow": 1,
// Disallow identifiers from shadowing restricted names
"no-shadow-restricted-names": 2,
// Enforce return statements in callbacks of array methods
"callback-return": 2,
// Require error handling in callbacks
"handle-callback-err": 2,
// Warn against string concatenation with __dirname and __filename
"no-path-concat": 1,
// Prefer using arrow functions for callbacks
"prefer-arrow-callback": 1,
// Return inside each then() to create readable and reusable Promise chains.
// Forces developers to return console logs and http calls in promises.
"promise/always-return": 2,
//Enforces the use of catch() on un-returned promises
"promise/catch-or-return": 2,
// Warn against nested then() or catch() statements
"promise/no-nesting": 1
}
}
================================================
FILE: functions/.gitignore
================================================
node_modules/
================================================
FILE: functions/index.js
================================================
'use strict';
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
/**
* Sends a notification to the recipient when a message is sent to.
*/
exports.sendNewMessageNotification = functions.firestore.document('/messages/{chatId}/{chat_id}/{timestamp}')
.onCreate(async (snap, context) => {
const message = snap.data();
// Get the list of device notification tokens.
const getRecipientPromise = admin.firestore().collection('users').doc(message.to).get();
// The snapshot to the user's tokens.
let recipient;
// The array containing all the user's tokens.
let tokens;
const results = await Promise.all([getRecipientPromise]);
recipient = results[0];
tokens = recipient.data().notificationTokens || [];
// Check if there are any device tokens.
if (tokens.length === 0) {
return console.log('There are no notification tokens to send to.');
}
// Notification details.
const payload = {
notification: {
title: 'You have new message(s).',
body: 'Tap to view the message(s).',
click_action: 'FLUTTER_NOTIFICATION_CLICK'
}
};
// Send notifications to all tokens.
const response = await admin.messaging().sendToDevice(tokens, payload);
// For each message check if there was an error.
const tokensToRemove = [];
response.results.forEach((result, index) => {
const error = result.error;
if (error) {
console.error('Failure sending notification to', tokens[index], error);
// Cleanup the tokens who are not registered anymore.
if (error.code === 'messaging/invalid-registration-token' ||
error.code === 'messaging/registration-token-not-registered') {
tokensToRemove.push(tokens[index]);
}
}
});
return recipient.ref.update({
notificationTokens: tokens.filter((token) => !tokensToRemove.includes(token))
});
});
================================================
FILE: functions/package.json
================================================
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"lint": "eslint .",
"serve": "firebase serve --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "8"
},
"dependencies": {
"firebase-admin": "~7.0.0",
"firebase-functions": "^2.3.0"
},
"devDependencies": {
"eslint": "^5.12.0",
"eslint-plugin-promise": "^4.0.1",
"firebase-functions-test": "^0.1.6"
},
"private": true
}
================================================
FILE: ios/.gitignore
================================================
.idea/
.vagrant/
.sconsign.dblite
.svn/
.DS_Store
*.swp
profile
DerivedData/
build/
GeneratedPluginRegistrant.h
GeneratedPluginRegistrant.m
.generated/
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3
xcuserdata
*.moved-aside
*.pyc
*sync/
Icon?
.tags*
/Flutter/app.flx
/Flutter/app.zip
/Flutter/flutter_assets/
/Flutter/App.framework
/Flutter/Flutter.framework
/Flutter/Generated.xcconfig
/ServiceDefinitions.json
Pods/
.symlinks/
================================================
FILE: ios/Flutter/AppFrameworkInfo.plist
================================================
CFBundleDevelopmentRegion
en
CFBundleExecutable
App
CFBundleIdentifier
io.flutter.flutter.app
CFBundleInfoDictionaryVersion
6.0
CFBundleName
App
CFBundlePackageType
FMWK
CFBundleShortVersionString
1.0
CFBundleSignature
????
CFBundleVersion
1.0
MinimumOSVersion
8.0
================================================
FILE: ios/Flutter/Debug.xcconfig
================================================
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
================================================
FILE: ios/Flutter/Release.xcconfig
================================================
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
================================================
FILE: ios/Flutter/flutter_export_environment.sh
================================================
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=F:\tools\flutter"
export "FLUTTER_APPLICATION_PATH=E:\github\flutter\Enigma"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "FLUTTER_FRAMEWORK_DIR=F:\tools\flutter\bin\cache\artifacts\engine\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
================================================
FILE: ios/GoogleService-Info.plist
================================================
AD_UNIT_ID_FOR_BANNER_TEST
ca-app-pub-3940256099942544/2934735716
AD_UNIT_ID_FOR_INTERSTITIAL_TEST
ca-app-pub-3940256099942544/4411468910
CLIENT_ID
347976604232-13h782ee23otgsaaiidgeb43jnp1jepd.apps.googleusercontent.com
REVERSED_CLIENT_ID
com.googleusercontent.apps.347976604232-13h782ee23otgsaaiidgeb43jnp1jepd
API_KEY
AIzaSyAdn3U0F35xhx2zUFfz6XPOcNm50erGZS0
GCM_SENDER_ID
347976604232
PLIST_VERSION
1
BUNDLE_ID
com.enigma.amitjoki
PROJECT_ID
flutterchatdemo
STORAGE_BUCKET
flutterchatdemo.appspot.com
IS_ADS_ENABLED
IS_ANALYTICS_ENABLED
IS_APPINVITE_ENABLED
IS_GCM_ENABLED
IS_SIGNIN_ENABLED
GOOGLE_APP_ID
1:347976604232:ios:f43eb2afc88737b9
DATABASE_URL
https://flutterchatdemo.firebaseio.com
================================================
FILE: ios/Podfile
================================================
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
end
target 'Runner' do
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
================================================
FILE: ios/Runner/AppDelegate.h
================================================
#import
#import
#import
@interface AppDelegate : FlutterAppDelegate
@end
================================================
FILE: ios/Runner/AppDelegate.m
================================================
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end
================================================
FILE: ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
================================================
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
================================================
FILE: ios/Runner/Base.lproj/LaunchScreen.storyboard
================================================
================================================
FILE: ios/Runner/Base.lproj/Main.storyboard
================================================
================================================
FILE: ios/Runner/Info.plist
================================================
NSContactsUsageDescription
This app requires contacts access to function properly.
CFBundleDevelopmentRegion
en
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
Enigma
CFBundlePackageType
APPL
CFBundleShortVersionString
1.0
CFBundleSignature
????
CFBundleVersion
1
LSRequiresIPhoneOS
UILaunchStoryboardName
LaunchScreen
UIMainStoryboardFile
Main
CFBundleURLTypes
CFBundleTypeRole
Editor
CFBundleURLSchemes
com.googleusercontent.apps.347976604232-13h782ee23otgsaaiidgeb43jnp1jepd
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UIViewControllerBasedStatusBarAppearance
================================================
FILE: ios/Runner/main.m
================================================
#import
#import
#import "AppDelegate.h"
int main(int argc, char* argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
================================================
FILE: ios/Runner.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
03E80A4E2123CF78000CBC08 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 03E80A4D2123CF78000CBC08 /* GoogleService-Info.plist */; };
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
31FEF151F1859E1D774F983A /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F87C65FAE473F13774A7A898 /* libPods-Runner.a */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
03E80A4D2123CF78000CBC08 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = SOURCE_ROOT; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
F87C65FAE473F13774A7A898 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
31FEF151F1859E1D774F983A /* libPods-Runner.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
49464365B5D8D6A216DE2434 /* Pods */ = {
isa = PBXGroup;
children = (
);
name = Pods;
sourceTree = "";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEBA1CF902C7004384FC /* Flutter.framework */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
49464365B5D8D6A216DE2434 /* Pods */,
C6BE70C6066498C18751121C /* Frameworks */,
);
sourceTree = "";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
);
name = Products;
sourceTree = "";
};
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
03E80A4D2123CF78000CBC08 /* GoogleService-Info.plist */,
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
97C146F11CF9000F007C117D /* Supporting Files */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
);
path = Runner;
sourceTree = "";
};
97C146F11CF9000F007C117D /* Supporting Files */ = {
isa = PBXGroup;
children = (
97C146F21CF9000F007C117D /* main.m */,
);
name = "Supporting Files";
sourceTree = "";
};
C6BE70C6066498C18751121C /* Frameworks */ = {
isa = PBXGroup;
children = (
F87C65FAE473F13774A7A898 /* libPods-Runner.a */,
);
name = Frameworks;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
981C6FBC28196C6E8D1CFC1C /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
32D609ECAAA2436A5C1CA65E /* [CP] Embed Pods Frameworks */,
D96270B7CCE0D3CF08DD9950 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0910;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
03E80A4E2123CF78000CBC08 /* GoogleService-Info.plist in Resources */,
9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
32D609ECAAA2436A5C1CA65E /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
981C6FBC28196C6E8D1CFC1C /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
D96270B7CCE0D3CF08DD9950 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh",
"${PODS_ROOT}/GTMOAuth2/Source/Touch/GTMOAuth2ViewTouch.xib",
"${PODS_ROOT}/GoogleSignIn/Resources/GoogleSignIn.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/gRPC/gRPCCertificates.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GTMOAuth2ViewTouch.nib",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleSignIn.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
97C146F31CF9000F007C117D /* main.m in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
);
name = Main.storyboard;
sourceTree = "";
};
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
97C147061CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.enigma.amitjoki;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
97C147071CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.enigma.amitjoki;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
97C147041CF9000F007C117D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
97C147071CF9000F007C117D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
================================================
FILE: ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
================================================
================================================
FILE: ios/Runner.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
================================================
BuildSystemType
Original
================================================
FILE: lib/DataModel.dart
================================================
import 'dart:core';
import 'dart:async';
import 'dart:io';
import 'package:Enigma/const.dart';
import 'package:Enigma/utils.dart';
import 'package:async/async.dart' show StreamGroup;
import 'package:path_provider/path_provider.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:localstorage/localstorage.dart';
//数据模型类
class DataModel extends Model {
//用户的数据以键值对形式存放
Map> userData =
new Map>();
Map _messageStatus = new Map();
_getMessageKey(String peerNo, int timestamp) => '$peerNo$timestamp';
getMessageStatus(String peerNo, int timestamp) {
final key = _getMessageKey(peerNo, timestamp);
return _messageStatus[key] ?? true;
}
bool _loaded = false;
LocalStorage _storage = LocalStorage('model');
//添加消息
addMessage(String peerNo, int timestamp, Future future) {
final key = _getMessageKey(peerNo, timestamp);
future.then((_) {
_messageStatus.remove(key);
});
_messageStatus[key] = future;
}
//添加用户
addUser(DocumentSnapshot user) {
userData[user.data[PHONE]] = user.data;
notifyListeners();
}
//添加壁纸
setWallpaper(String phone, File image) async {
if (image != null) {
final dir = await getDir();
int now = DateTime.now().millisecondsSinceEpoch;
String path = '${dir.path}/WALLPAPER-$phone-$now';
await image.copy(path);
userData[phone][WALLPAPER] = path;
updateItem(phone, {WALLPAPER: path});
notifyListeners();
}
}
//移出壁纸
removeWallpaper(String phone) {
userData[phone][WALLPAPER] = null;
String path = userData[phone][ALIAS_AVATAR];
if (path != null) {
File(path).delete();
userData[phone][WALLPAPER] = null;
}
updateItem(phone, {WALLPAPER: null});
notifyListeners();
}
getDir() async {
return await getApplicationDocumentsDirectory();
}
//更新条目
updateItem(String key, Map value) {
Map old = _storage.getItem(key) ?? Map();
;
old.addAll(value);
_storage.setItem(key, old);
}
//设置备注
setAlias(String aliasName, File image, String phone) async {
userData[phone][ALIAS_NAME] = aliasName ?? null;
if (image != null) {
final dir = await getDir();
int now = DateTime.now().millisecondsSinceEpoch;
String path = '${dir.path}/$phone-$now';
await image.copy(path);
userData[phone][ALIAS_AVATAR] = path;
}
updateItem(phone, {
ALIAS_NAME: userData[phone][ALIAS_NAME],
ALIAS_AVATAR: userData[phone][ALIAS_AVATAR],
});
notifyListeners();
}
//移除备注
removeAlias(String phone) {
userData[phone][ALIAS_NAME] = null;
String path = userData[phone][ALIAS_AVATAR];
if (path != null) {
File(path).delete();
userData[phone][ALIAS_AVATAR] = null;
}
updateItem(phone, {ALIAS_NAME: null, ALIAS_AVATAR: null});
notifyListeners();
}
bool get loaded => _loaded;
Map get currentUser => _currentUser;
Map _currentUser;
Map get lastSpokenAt => _lastSpokenAt;
Map _lastSpokenAt = {};
//获取聊天的顺序
getChatOrder(List chatsWith, String currentUserNo) {
List> messages = List>();
chatsWith.forEach((otherNo) {
String chatId = Enigma.getChatId(currentUserNo, otherNo);
messages.add(Firestore.instance
.collection(MESSAGES)
.document(chatId)
.collection(chatId)
.snapshots());
});
StreamGroup.merge(messages).listen((snapshot) {
if (snapshot.documents.isNotEmpty) {
DocumentSnapshot message = snapshot.documents.last;
_lastSpokenAt[message[FROM] == currentUserNo
? message[TO]
: message[FROM]] = message[TIMESTAMP];
notifyListeners();
}
});
}
//根据传入的当前用户的手机号获取当前用户的最新数据
DataModel(String currentUserNo) {
//从firebase实时数据库中同步数据
Firestore.instance
.collection(USERS)
.document(currentUserNo)
.snapshots()
.listen((user) {
_currentUser = user.data;
notifyListeners();
});
//缓存数据
_storage.ready.then((ready) {
if (ready) {
//监听聊天的数据变化
Firestore.instance
.collection(USERS)
.document(currentUserNo)
.collection(CHATS_WITH)
.document(CHATS_WITH)
.snapshots()
.listen((_chatsWith) {
if (_chatsWith?.data != null) {
List> users =
new List>();
List peers = [];
_chatsWith.data.entries.forEach((_data) {
peers.add(_data.key);
users.add(Firestore.instance
.collection(USERS)
.document(_data.key)
.snapshots());
if (userData[_data.key] != null) {
userData[_data.key][CHAT_STATUS] = _chatsWith[_data.key];
}
});
getChatOrder(peers, currentUserNo);
notifyListeners();
Map> newData =
Map>();
StreamGroup.merge(users).listen((user) {
if (user.data != null) {
newData[user[PHONE]] = user.data;
newData[user[PHONE]][CHAT_STATUS] = _chatsWith[user[PHONE]];
Map _stored = _storage.getItem(user[PHONE]);
if (_stored != null) {
newData[user[PHONE]].addAll(_stored);
}
}
userData = Map.from(newData);
notifyListeners();
});
}
if (!_loaded) {
_loaded = true;
notifyListeners();
}
});
}
});
}
}
================================================
FILE: lib/E2EE/e2ee.dart
================================================
library e2ee;
export 'key.dart';
export 'x25519.dart';
================================================
FILE: lib/E2EE/key.dart
================================================
// Copyright 2019 Gohilla.com team.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import 'dart:convert';
import 'dart:typed_data';
class Key {
final Uint8List bytes;
final bool isPublic;
Key(this.bytes) : this.isPublic = false;
Key.withPublicBytes(this.bytes) : this.isPublic = true;
@override
int get hashCode => bytes.length;
@override
operator ==(other) {
if (other is Key) {
return _byteListEqual(bytes, other.bytes);
}
return false;
}
/// Returns string representation of the key.
///
/// If [isPublic] is true, returns the result of [toBase64].
///
/// Otherwise a static string so developers don't accidentally print secrets
/// keys.
@override
String toString() {
if (isPublic) {
return "Key('${toBase64()}')";
}
return "Key('some bytes')";
}
/// Returns a Key from the base64 representation
static Key fromBase64(String encoded, bool isPublic) {
final bytes = base64.decode(encoded);
if (isPublic) return Key.withPublicBytes(bytes);
return Key(bytes);
}
/// Returns a base64 representation of the bytes.
String toBase64() {
return base64.encode(this.bytes);
}
static bool _byteListEqual(List left, List right) {
if (left.length != right.length) {
return false;
}
var result = true;
for (var i = 0; i < left.length; i++) {
if (left[i] != right[i]) {
result = false;
}
}
return result;
}
}
/// Holds a secret key and a public key.
class AsymmetricKeyPair {
final Key publicKey;
final Key secretKey;
AsymmetricKeyPair({this.secretKey, this.publicKey})
: assert(secretKey != null),
assert(publicKey != null);
@override
int get hashCode => publicKey.hashCode;
@override
operator ==(other) =>
other is AsymmetricKeyPair &&
secretKey == other.secretKey &&
publicKey == other.publicKey;
}
================================================
FILE: lib/E2EE/x25519.dart
================================================
// Copyright 2019 Gohilla.com team.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import 'dart:async';
import 'dart:math';
import 'dart:typed_data';
import 'key.dart';
const x25519 = X25519();
/// Implements X25519 key exchange ([RFC 7748](https://tools.ietf.org/html/rfc7748)).
class X25519 {
/// Constant [9, 0, ..., 0] is used when calculating shared secret.
static final Uint8List _constant9 = () {
final result = Uint8List(32);
result[0] = 9;
return result;
}();
/// Constant [0xdb41, 1, 0, ..., 0].
static final Int32List _constant121665 = () {
final result = Int32List(16);
result[0] = 0xdb41;
result[1] = 1;
return result;
}();
/// A secure random number generator.
static final Random _random = Random.secure();
const X25519();
/// Calculates the shared secret asynchronously.
/// The method is asynchronous, which enables implementers to use
/// platform-specific APIs and isolates.
///
/// The synchronous version is [calculateSharedSecretSync].
Future calculateSharedSecret(Key secretKey, Key publicKey) async {
return calculateSharedSecretSync(secretKey, publicKey);
}
/// Calculates the shared secret synchronously.
///
/// The asynchronous version is [calculateSharedSecret].
Key calculateSharedSecretSync(Key secretKey, Key publicKey) {
final secretKeyTransformed = Uint8List.fromList(secretKey.bytes);
replaceSeedWithSecretKey(secretKeyTransformed);
final result = Uint8List(32);
_scalarMultiply(result, secretKeyTransformed, publicKey.bytes);
return Key(result);
}
/// Generates a random Curve25519 keypair.
/// The method is asynchronous, which enables implementers to use
/// platform-specific APIs and isolates.
///
/// If you need to perform the operation synchronously, use
/// [generateKeyPairSync].
Future generateKeyPair({Uint8List seed}) async {
return generateKeyPairSync(seed: seed);
}
/// Generates a random Curve25519 keypair synchronously.
/// You can optionally give a seed, which is any 32-octet Uint8List.
///
/// The use asynchronous version is [generateKeyPair].
AsymmetricKeyPair generateKeyPairSync({Uint8List seed}) {
if (seed == null) {
// Generate 32 random bytes using a secure random number generator
final random = X25519._random;
seed = Uint8List(32);
for (var i = 0; i < seed.length; i++) {
seed[i] = random.nextInt(256);
}
} else {
if (seed.length != 32) {
throw ArgumentError("Seed must have 32 bytes");
}
// Create a copy of the seed
seed = Uint8List.fromList(seed);
}
// Create a secret key
replaceSeedWithSecretKey(seed);
final secretKey = Key(seed);
// Calculate public key
final publicKeyBytes = Uint8List(32);
_scalarMultiply(publicKeyBytes, seed, _constant9);
// Return a keypair
final publicKey = Key.withPublicBytes(publicKeyBytes);
return AsymmetricKeyPair(secretKey: secretKey, publicKey: publicKey);
}
/// Modifies certain bits of seed so that the result is a valid secret key.
static void replaceSeedWithSecretKey(Uint8List seed) {
// First 3 bits should be 0
seed[0] &= 0xf8;
// Bit 254 should be 1
seed[31] |= 0x40;
// Bit 255 should be 0
seed[31] &= 0x7f;
}
/// X25519 multiplication of two 32-octet scalar.
///
/// Used by [generateKeyPairSync] and [calculateSharedSecretSync].
static void _scalarMultiply(
Uint8List result,
Uint8List secretKey,
Uint8List publicKey,
) {
// Allocate temporary arrays
final unpacked = Int32List(16);
// -------------------------------------------------------------------------
// Unpack public key into the internal Int32List
// -------------------------------------------------------------------------
for (var i = 0; i < 16; i++) {
unpacked[i] = publicKey[2 * i] | (publicKey[2 * i + 1] << 8);
}
// Clear the last bit
unpacked[15] &= 0x7FFF;
// -------------------------------------------------------------------------
// Calculate
// -------------------------------------------------------------------------
// Allocate temporary arrays
final a = Int32List(16),
b = Int32List(16),
c = Int32List(16),
d = Int32List(16),
e = Int32List(16),
f = Int32List(16);
// Initialize 'b'
for (var i = 0; i < 16; i++) {
b[i] = unpacked[i];
}
// Initialize 'a' and 'd'
a[0] = 1;
d[0] = 1;
// For each bit in 'secretKey'
for (var i = 254; i >= 0; i--) {
// Get the bit
final bit = 1 & (secretKey[i >> 3] >> (7 & i));
// if bit == 1:
// swap(a, b)
// swap(c, d)
_conditionalSwap(a, b, bit);
_conditionalSwap(c, d, bit);
// e = a + c
// a = a + c
// c = b + d
// b = b - d
for (var i = 0; i < 16; i++) {
final ai = a[i];
final bi = b[i];
final ci = c[i];
final di = d[i];
e[i] = ai + ci;
a[i] = ai - ci;
c[i] = bi + di;
b[i] = bi - di;
}
// d = e^2
// f = a^2
// a = c * a
// c = b * e
_multiply(d, e, e);
_multiply(f, a, a);
_multiply(a, c, a);
_multiply(c, b, e);
// e = a + c
// a = a - c
// c = d - f
for (var i = 0; i < 16; i++) {
final ai = a[i];
final ci = c[i];
e[i] = ai + ci;
a[i] = ai - ci;
c[i] = d[i] - f[i];
}
// b = a^2
_multiply(b, a, a);
// a = c * _constant121665 + d
_multiply(a, c, _constant121665);
for (var i = 0; i < 16; i++) {
a[i] += d[i];
}
// c = c * a
// a = d * f
// d = b * unpacked
// b = e^2
_multiply(c, c, a);
_multiply(a, d, f);
_multiply(d, b, unpacked);
_multiply(b, e, e);
// if bit == 1:
// swap(a, b)
// swap(c, d)
_conditionalSwap(a, b, bit);
_conditionalSwap(c, d, bit);
}
// Copy 'c' to 'd'
for (var i = 0; i < 16; i++) {
d[i] = c[i];
}
// 254 times
for (var i = 253; i >= 0; i--) {
// c = c^2
_multiply(c, c, c);
if (i != 2 && i != 4) {
// c = c * d
_multiply(c, c, d);
}
}
// a = a * c
_multiply(a, a, c);
// 3 times
for (var i = 0; i < 3; i++) {
var x = 1;
for (var i = 0; i < 16; i++) {
final v = 0xFFFF + a[i] + x;
x = v ~/ 0x10000;
a[i] = v - 0x10000 * x;
}
a[0] += 38 * (x - 1);
}
// 2 times
for (var i = 0; i < 2; i++) {
// The first element
var previous = a[0] - 0xFFED;
b[0] = 0xFFFF & previous;
// Subsequent elements
for (var j = 1; j < 15; j++) {
final current = a[j] - 0xFFFF - (1 & (previous >> 16));
b[j] = 0xFFFF & current;
previous = current;
}
// The last element
b[15] = a[15] - 0x7FFF - (1 & (previous >> 16));
// if isSwap == 1:
// swap(a, m)
final isSwap = 1 - (1 & (b[15] >> 16));
_conditionalSwap(a, b, isSwap);
}
// -------------------------------------------------------------------------
// Pack the internal Int32List into result bytes
// -------------------------------------------------------------------------
for (var i = 0; i < 16; i++) {
result[2 * i] = 0xFF & a[i];
result[2 * i + 1] = a[i] >> 8;
}
}
/// Constant-time conditional swap.
///
/// If b is 0, the function does nothing.
/// If b is 1, elements of the arrays will be swapped.
static void _conditionalSwap(Int32List p, Int32List q, int b) {
final c = ~(b - 1);
for (var i = 0; i < 16; i++) {
final t = c & (p[i] ^ q[i]);
p[i] ^= t;
q[i] ^= t;
}
}
/// Constant-time multiplication of the two arguments.
static void _multiply(Int32List result, Int32List a, Int32List b) {
var t0 = 0,
t1 = 0,
t2 = 0,
t3 = 0,
t4 = 0,
t5 = 0,
t6 = 0,
t7 = 0,
t8 = 0,
t9 = 0,
t10 = 0,
t11 = 0,
t12 = 0,
t13 = 0,
t14 = 0,
t15 = 0,
t16 = 0,
t17 = 0,
t18 = 0,
t19 = 0,
t20 = 0,
t21 = 0,
t22 = 0,
t23 = 0,
t24 = 0,
t25 = 0,
t26 = 0,
t27 = 0,
t28 = 0,
t29 = 0,
t30 = 0,
b0 = b[0],
b1 = b[1],
b2 = b[2],
b3 = b[3],
b4 = b[4],
b5 = b[5],
b6 = b[6],
b7 = b[7],
b8 = b[8],
b9 = b[9],
b10 = b[10],
b11 = b[11],
b12 = b[12],
b13 = b[13],
b14 = b[14],
b15 = b[15];
var v = a[0];
t0 += v * b0;
t1 += v * b1;
t2 += v * b2;
t3 += v * b3;
t4 += v * b4;
t5 += v * b5;
t6 += v * b6;
t7 += v * b7;
t8 += v * b8;
t9 += v * b9;
t10 += v * b10;
t11 += v * b11;
t12 += v * b12;
t13 += v * b13;
t14 += v * b14;
t15 += v * b15;
v = a[1];
t1 += v * b0;
t2 += v * b1;
t3 += v * b2;
t4 += v * b3;
t5 += v * b4;
t6 += v * b5;
t7 += v * b6;
t8 += v * b7;
t9 += v * b8;
t10 += v * b9;
t11 += v * b10;
t12 += v * b11;
t13 += v * b12;
t14 += v * b13;
t15 += v * b14;
t16 += v * b15;
v = a[2];
t2 += v * b0;
t3 += v * b1;
t4 += v * b2;
t5 += v * b3;
t6 += v * b4;
t7 += v * b5;
t8 += v * b6;
t9 += v * b7;
t10 += v * b8;
t11 += v * b9;
t12 += v * b10;
t13 += v * b11;
t14 += v * b12;
t15 += v * b13;
t16 += v * b14;
t17 += v * b15;
v = a[3];
t3 += v * b0;
t4 += v * b1;
t5 += v * b2;
t6 += v * b3;
t7 += v * b4;
t8 += v * b5;
t9 += v * b6;
t10 += v * b7;
t11 += v * b8;
t12 += v * b9;
t13 += v * b10;
t14 += v * b11;
t15 += v * b12;
t16 += v * b13;
t17 += v * b14;
t18 += v * b15;
v = a[4];
t4 += v * b0;
t5 += v * b1;
t6 += v * b2;
t7 += v * b3;
t8 += v * b4;
t9 += v * b5;
t10 += v * b6;
t11 += v * b7;
t12 += v * b8;
t13 += v * b9;
t14 += v * b10;
t15 += v * b11;
t16 += v * b12;
t17 += v * b13;
t18 += v * b14;
t19 += v * b15;
v = a[5];
t5 += v * b0;
t6 += v * b1;
t7 += v * b2;
t8 += v * b3;
t9 += v * b4;
t10 += v * b5;
t11 += v * b6;
t12 += v * b7;
t13 += v * b8;
t14 += v * b9;
t15 += v * b10;
t16 += v * b11;
t17 += v * b12;
t18 += v * b13;
t19 += v * b14;
t20 += v * b15;
v = a[6];
t6 += v * b0;
t7 += v * b1;
t8 += v * b2;
t9 += v * b3;
t10 += v * b4;
t11 += v * b5;
t12 += v * b6;
t13 += v * b7;
t14 += v * b8;
t15 += v * b9;
t16 += v * b10;
t17 += v * b11;
t18 += v * b12;
t19 += v * b13;
t20 += v * b14;
t21 += v * b15;
v = a[7];
t7 += v * b0;
t8 += v * b1;
t9 += v * b2;
t10 += v * b3;
t11 += v * b4;
t12 += v * b5;
t13 += v * b6;
t14 += v * b7;
t15 += v * b8;
t16 += v * b9;
t17 += v * b10;
t18 += v * b11;
t19 += v * b12;
t20 += v * b13;
t21 += v * b14;
t22 += v * b15;
v = a[8];
t8 += v * b0;
t9 += v * b1;
t10 += v * b2;
t11 += v * b3;
t12 += v * b4;
t13 += v * b5;
t14 += v * b6;
t15 += v * b7;
t16 += v * b8;
t17 += v * b9;
t18 += v * b10;
t19 += v * b11;
t20 += v * b12;
t21 += v * b13;
t22 += v * b14;
t23 += v * b15;
v = a[9];
t9 += v * b0;
t10 += v * b1;
t11 += v * b2;
t12 += v * b3;
t13 += v * b4;
t14 += v * b5;
t15 += v * b6;
t16 += v * b7;
t17 += v * b8;
t18 += v * b9;
t19 += v * b10;
t20 += v * b11;
t21 += v * b12;
t22 += v * b13;
t23 += v * b14;
t24 += v * b15;
v = a[10];
t10 += v * b0;
t11 += v * b1;
t12 += v * b2;
t13 += v * b3;
t14 += v * b4;
t15 += v * b5;
t16 += v * b6;
t17 += v * b7;
t18 += v * b8;
t19 += v * b9;
t20 += v * b10;
t21 += v * b11;
t22 += v * b12;
t23 += v * b13;
t24 += v * b14;
t25 += v * b15;
v = a[11];
t11 += v * b0;
t12 += v * b1;
t13 += v * b2;
t14 += v * b3;
t15 += v * b4;
t16 += v * b5;
t17 += v * b6;
t18 += v * b7;
t19 += v * b8;
t20 += v * b9;
t21 += v * b10;
t22 += v * b11;
t23 += v * b12;
t24 += v * b13;
t25 += v * b14;
t26 += v * b15;
v = a[12];
t12 += v * b0;
t13 += v * b1;
t14 += v * b2;
t15 += v * b3;
t16 += v * b4;
t17 += v * b5;
t18 += v * b6;
t19 += v * b7;
t20 += v * b8;
t21 += v * b9;
t22 += v * b10;
t23 += v * b11;
t24 += v * b12;
t25 += v * b13;
t26 += v * b14;
t27 += v * b15;
v = a[13];
t13 += v * b0;
t14 += v * b1;
t15 += v * b2;
t16 += v * b3;
t17 += v * b4;
t18 += v * b5;
t19 += v * b6;
t20 += v * b7;
t21 += v * b8;
t22 += v * b9;
t23 += v * b10;
t24 += v * b11;
t25 += v * b12;
t26 += v * b13;
t27 += v * b14;
t28 += v * b15;
v = a[14];
t14 += v * b0;
t15 += v * b1;
t16 += v * b2;
t17 += v * b3;
t18 += v * b4;
t19 += v * b5;
t20 += v * b6;
t21 += v * b7;
t22 += v * b8;
t23 += v * b9;
t24 += v * b10;
t25 += v * b11;
t26 += v * b12;
t27 += v * b13;
t28 += v * b14;
t29 += v * b15;
v = a[15];
t15 += v * b0;
t16 += v * b1;
t17 += v * b2;
t18 += v * b3;
t19 += v * b4;
t20 += v * b5;
t21 += v * b6;
t22 += v * b7;
t23 += v * b8;
t24 += v * b9;
t25 += v * b10;
t26 += v * b11;
t27 += v * b12;
t28 += v * b13;
t29 += v * b14;
t30 += v * b15;
t0 += 38 * t16;
t1 += 38 * t17;
t2 += 38 * t18;
t3 += 38 * t19;
t4 += 38 * t20;
t5 += 38 * t21;
t6 += 38 * t22;
t7 += 38 * t23;
t8 += 38 * t24;
t9 += 38 * t25;
t10 += 38 * t26;
t11 += 38 * t27;
t12 += 38 * t28;
t13 += 38 * t29;
t14 += 38 * t30;
var c = 1;
v = t0 + c + 0xFFFF;
c = v ~/ 0x10000;
t0 = v - c * 0x10000;
v = t1 + c + 0xFFFF;
c = v ~/ 0x10000;
t1 = v - c * 0x10000;
v = t2 + c + 0xFFFF;
c = v ~/ 0x10000;
t2 = v - c * 0x10000;
v = t3 + c + 0xFFFF;
c = v ~/ 0x10000;
t3 = v - c * 0x10000;
v = t4 + c + 0xFFFF;
c = v ~/ 0x10000;
t4 = v - c * 0x10000;
v = t5 + c + 0xFFFF;
c = v ~/ 0x10000;
t5 = v - c * 0x10000;
v = t6 + c + 0xFFFF;
c = v ~/ 0x10000;
t6 = v - c * 0x10000;
v = t7 + c + 0xFFFF;
c = v ~/ 0x10000;
t7 = v - c * 0x10000;
v = t8 + c + 0xFFFF;
c = v ~/ 0x10000;
t8 = v - c * 0x10000;
v = t9 + c + 0xFFFF;
c = v ~/ 0x10000;
t9 = v - c * 0x10000;
v = t10 + c + 0xFFFF;
c = v ~/ 0x10000;
t10 = v - c * 0x10000;
v = t11 + c + 0xFFFF;
c = v ~/ 0x10000;
t11 = v - c * 0x10000;
v = t12 + c + 0xFFFF;
c = v ~/ 0x10000;
t12 = v - c * 0x10000;
v = t13 + c + 0xFFFF;
c = v ~/ 0x10000;
t13 = v - c * 0x10000;
v = t14 + c + 0xFFFF;
c = v ~/ 0x10000;
t14 = v - c * 0x10000;
v = t15 + c + 0xFFFF;
c = v ~/ 0x10000;
t15 = v - c * 0x10000;
t0 += c - 1 + 37 * (c - 1);
c = 1;
v = t0 + c + 0xFFFF;
c = v ~/ 0x10000;
t0 = v - c * 0x10000;
v = t1 + c + 0xFFFF;
c = v ~/ 0x10000;
t1 = v - c * 0x10000;
v = t2 + c + 0xFFFF;
c = v ~/ 0x10000;
t2 = v - c * 0x10000;
v = t3 + c + 0xFFFF;
c = v ~/ 0x10000;
t3 = v - c * 0x10000;
v = t4 + c + 0xFFFF;
c = v ~/ 0x10000;
t4 = v - c * 0x10000;
v = t5 + c + 0xFFFF;
c = v ~/ 0x10000;
t5 = v - c * 0x10000;
v = t6 + c + 0xFFFF;
c = v ~/ 0x10000;
t6 = v - c * 0x10000;
v = t7 + c + 0xFFFF;
c = v ~/ 0x10000;
t7 = v - c * 0x10000;
v = t8 + c + 0xFFFF;
c = v ~/ 0x10000;
t8 = v - c * 0x10000;
v = t9 + c + 0xFFFF;
c = v ~/ 0x10000;
t9 = v - c * 0x10000;
v = t10 + c + 0xFFFF;
c = v ~/ 0x10000;
t10 = v - c * 0x10000;
v = t11 + c + 0xFFFF;
c = v ~/ 0x10000;
t11 = v - c * 0x10000;
v = t12 + c + 0xFFFF;
c = v ~/ 0x10000;
t12 = v - c * 0x10000;
v = t13 + c + 0xFFFF;
c = v ~/ 0x10000;
t13 = v - c * 0x10000;
v = t14 + c + 0xFFFF;
c = v ~/ 0x10000;
t14 = v - c * 0x10000;
v = t15 + c + 0xFFFF;
c = v ~/ 0x10000;
t15 = v - c * 0x10000;
t0 += c - 1 + 37 * (c - 1);
result[0] = t0;
result[1] = t1;
result[2] = t2;
result[3] = t3;
result[4] = t4;
result[5] = t5;
result[6] = t6;
result[7] = t7;
result[8] = t8;
result[9] = t9;
result[10] = t10;
result[11] = t11;
result[12] = t12;
result[13] = t13;
result[14] = t14;
result[15] = t15;
}
}
================================================
FILE: lib/GiphyPicker/giphy_picker.dart
================================================
import 'dart:async';
import 'package:Enigma/GiphyPicker/src/widgets/giphy_context.dart';
import 'package:Enigma/GiphyPicker/src/widgets/giphy_search_page.dart';
import 'package:flutter/material.dart';
import 'package:giphy_client/giphy_client.dart';
typedef ErrorListener = void Function(dynamic error);
/// Provides Giphy picker functionality.
class GiphyPicker {
/// Renders a full screen modal dialog for searching, and selecting a Giphy image.
static Future pickGif(
{@required BuildContext context,
@required String apiKey,
String rating = GiphyRating.g,
String lang = GiphyLanguage.english,
Widget title,
ErrorListener onError}) async {
GiphyGif result;
await Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) => GiphyContext(
child: GiphySearchPage(),
apiKey: apiKey,
rating: rating,
language: lang,
onError: onError ?? (error) => _showErrorDialog(context, error),
onSelected: (gif) {
result = gif;
Navigator.pop(context);
}),
fullscreenDialog: true));
return result;
}
static void _showErrorDialog(BuildContext context, dynamic error) {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: new Text('Giphy error'),
content: new Text('An error occurred. $error'),
actions: [
new FlatButton(
child: new Text("Close"),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
);
}
}
================================================
FILE: lib/GiphyPicker/src/model/giphy_repository.dart
================================================
import 'dart:async';
import 'dart:collection';
import 'dart:typed_data';
import 'package:Enigma/GiphyPicker/src/widgets/giphy_image.dart';
import 'package:flutter/foundation.dart';
import 'package:Enigma/GiphyPicker/src/model/repository.dart';
import 'package:Enigma/GiphyPicker/giphy_picker.dart';
import 'package:giphy_client/giphy_client.dart';
import 'package:http/http.dart' as http;
typedef Future GetCollection(
GiphyClient client, int offset, int limit);
/// Retrieves and caches gif collections from Giphy.
class GiphyRepository extends Repository {
final _client = http.Client();
final _previewCompleters = HashMap>();
final _previewQueue = Queue();
final GetCollection getCollection;
final int maxConcurrentPreviewLoad;
GiphyClient _giphyClient;
int _previewLoad = 0;
GiphyRepository(
{@required String apiKey,
@required this.getCollection,
this.maxConcurrentPreviewLoad = 4,
int pageSize = 25,
ErrorListener onError})
: super(pageSize: pageSize, onError: onError) {
assert(getCollection != null);
assert(maxConcurrentPreviewLoad != null);
_giphyClient = GiphyClient(apiKey: apiKey, client: _client);
}
/// Retrieves specified page of gif data from Giphy.
Future> getPage(int page) async {
final offset = page * pageSize;
final collection = await getCollection(_giphyClient, offset, pageSize);
return Page(collection.data, page, collection.pagination.totalCount);
}
/// Retrieves a preview Gif image at specified index.
Future getPreview(int index) async {
assert(index != null);
var completer = _previewCompleters[index];
if (completer == null) {
completer = Completer();
_previewCompleters[index] = completer;
_previewQueue.add(index);
// initiate next load
_loadNextPreview();
}
return completer.future;
}
/// Cancels retrieving specified preview image, by removing it from the queue.
void cancelGetPreview(int index) {
assert(index != null);
final completer = _previewCompleters.remove(index);
if (completer != null) {
// remove from queue
_previewQueue.remove(index);
// and complete with null
completer.complete(null);
}
}
void _loadNextPreview() {
if (_previewLoad < maxConcurrentPreviewLoad && _previewQueue.isNotEmpty) {
_previewLoad++;
final index = _previewQueue.removeLast();
final completer = _previewCompleters.remove(index);
if (completer != null) {
get(index).then(_loadPreviewImage).then((bytes) {
if (!completer.isCompleted) {
completer.complete(bytes);
}
}).whenComplete(() {
_previewLoad--;
_loadNextPreview();
});
} else {
_previewLoad--;
}
_loadNextPreview();
}
}
Future _loadPreviewImage(GiphyGif gif) async {
// fallback to still image if preview is empty
final url =
gif.images.previewGif.url ?? gif.images.fixedWidthSmallStill.url;
if (url != null) {
return await GiphyImage.load(url, client: _client);
}
return null;
}
/// The repository of trending gif images.
static Future trending(
{@required String apiKey,
String rating = GiphyRating.g,
ErrorListener onError}) async {
final repo = GiphyRepository(
apiKey: apiKey,
getCollection: (client, offset, limit) =>
client.trending(offset: offset, limit: limit, rating: rating),
onError: onError);
// retrieve first page
await repo.get(0);
return repo;
}
/// A repository of images for given search query.
static Future search(
{@required String apiKey,
@required String query,
String rating = GiphyRating.g,
String lang = GiphyLanguage.english,
ErrorListener onError}) async {
final repo = GiphyRepository(
apiKey: apiKey,
getCollection: (client, offset, limit) => client.search(query,
offset: offset, limit: limit, rating: rating, lang: lang),
onError: onError);
// retrieve first page
await repo.get(0);
return repo;
}
}
================================================
FILE: lib/GiphyPicker/src/model/repository.dart
================================================
import 'dart:async';
import 'dart:collection';
import 'package:Enigma/GiphyPicker/giphy_picker.dart';
/// A general-purpose repository with support for on-demand paged retrieval and caching of values of type T.
abstract class Repository {
final HashMap _cache = HashMap();
final Set _pagesLoading = Set();
final HashMap> _completers = HashMap>();
final int pageSize;
final ErrorListener onError;
int _totalCount;
Repository({this.pageSize, this.onError}) {
assert(pageSize != null);
assert(onError != null);
}
/// The total number of values available.
int get totalCount => _totalCount;
/// Asynchronously retrieves the value at specified index. When not available in local cache
/// the page containing the value is retrieved.
Future get(int index) {
assert(index != null);
// index must within bounds, or 0 if totalCount is null
assert(
_totalCount == null && index == 0 || index >= 0 && index < _totalCount);
final value = _cache[index];
// value is availableÍ
if (value != null) {
return Future.value(value);
}
final page = index ~/ pageSize;
// value is not available, retrieve page
if (!_pagesLoading.contains(page)) {
_pagesLoading.add(page);
final future = getPage(page);
future.then((page) => _onGetPage(page)).catchError(onError);
}
// value is being retrieved
var completer = _completers[index];
if (completer == null) {
completer = Completer();
_completers[index] = completer;
}
return completer.future;
}
void _onGetPage(Page page) {
_pagesLoading.remove(page);
_totalCount = page.totalCount;
if (_totalCount == 0) {
// complete all with null
_completers.values.forEach((c) => c.complete(null));
_completers.clear();
} else {
for (var i = 0; i < page.values.length; i++) {
// store value
final index = page.page * pageSize + i;
final value = page.values[i];
_cache[index] = value;
// complete optional completer
final completer = _completers.remove(index);
completer?.complete(value);
}
}
}
Future> getPage(int page);
}
/// Represents a page of values.
class Page {
final List values;
final int page;
final int totalCount;
const Page(this.values, this.page, this.totalCount);
}
================================================
FILE: lib/GiphyPicker/src/widgets/giphy_context.dart
================================================
import 'package:flutter/material.dart';
import 'package:giphy_client/giphy_client.dart';
import 'package:Enigma/GiphyPicker/giphy_picker.dart';
/// Provides the context for a Giphy search operation, and makes its data available to its widget sub-tree.
class GiphyContext extends InheritedWidget {
final String apiKey;
final String rating;
final String language;
final ValueChanged onSelected;
final ErrorListener onError;
const GiphyContext(
{Key key,
@required Widget child,
@required this.apiKey,
this.rating = GiphyRating.g,
this.language = GiphyLanguage.english,
this.onSelected,
this.onError})
: super(key: key, child: child);
void select(GiphyGif gif) {
if (onSelected != null) {
onSelected(gif);
}
}
void error(dynamic error) {
if (onError != null) {
onError(error);
}
}
@override
bool updateShouldNotify(InheritedWidget oldWidget) => false;
static GiphyContext of(BuildContext context) {
final settings = context
.ancestorInheritedElementForWidgetOfExactType(GiphyContext)
?.widget as GiphyContext;
if (settings == null) {
throw 'Required GiphyContext widget not found. Make sure to wrap your widget with GiphyContext.';
}
return settings;
}
}
================================================
FILE: lib/GiphyPicker/src/widgets/giphy_image.dart
================================================
import 'dart:typed_data';
import 'package:Enigma/GiphyPicker/src/widgets/giphy_overlay.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:giphy_client/giphy_client.dart';
/// Loads and renders a Giphy image.
class GiphyImage extends StatefulWidget {
final String url;
final Widget placeholder;
final double width;
final double height;
final BoxFit fit;
final bool renderGiphyOverlay;
/// Loads an image from given url.
const GiphyImage(
{Key key,
@required this.url,
this.placeholder,
this.width,
this.height,
this.fit,
this.renderGiphyOverlay = true})
: super(key: key);
/// Loads the original image for given Giphy gif.
GiphyImage.original(
{Key key,
@required GiphyGif gif,
this.placeholder,
this.width,
this.height,
this.fit,
this.renderGiphyOverlay = true})
: url = gif.images.original.url,
super(key: key ?? Key(gif.id));
/// Loads the original still image for given Giphy gif.
GiphyImage.originalStill(
{Key key,
@required GiphyGif gif,
this.placeholder,
this.width,
this.height,
this.fit,
this.renderGiphyOverlay = true})
: url = gif.images.originalStill.url,
super(key: key ?? Key(gif.id));
@override
_GiphyImageState createState() => _GiphyImageState();
/// Loads the images bytes for given url from Giphy.
static Future load(String url, {Client client}) async {
assert(url != null);
final response =
await (client ?? Client()).get(url, headers: {'accept': 'image/*'});
if (response.statusCode == 200) {
return response.bodyBytes;
}
return null;
}
}
class _GiphyImageState extends State {
Future _loadImage;
@override
void initState() {
_loadImage = GiphyImage.load(widget.url);
super.initState();
}
@override
Widget build(BuildContext context) => FutureBuilder(
future: _loadImage,
builder: (BuildContext context, AsyncSnapshot snapshot) {
if (snapshot.hasData) {
final image = Image.memory(snapshot.data,
width: widget.width, height: widget.height, fit: widget.fit);
if (widget.renderGiphyOverlay) {
return GiphyOverlay(child: image);
}
return image;
}
return widget.placeholder ?? Center(child: CircularProgressIndicator());
});
}
================================================
FILE: lib/GiphyPicker/src/widgets/giphy_overlay.dart
================================================
import 'package:flutter/material.dart';
/// Renders a 'Powered by GIPHY' overlay image over its content
class GiphyOverlay extends StatelessWidget {
final Widget child;
const GiphyOverlay({this.child});
@override
Widget build(BuildContext context) {
return Stack(children: [
child,
Positioned(
left: 0,
right: 0,
bottom: 0,
height: 16,
child: IgnorePointer(
child: Container(
alignment: Alignment.centerLeft,
color: Colors.black45,
padding: EdgeInsets.symmetric(vertical: 2),
child: Image.asset(
'assets/giphy.png',
height: 14))))
]);
}
}
================================================
FILE: lib/GiphyPicker/src/widgets/giphy_preview_page.dart
================================================
import 'package:Enigma/GiphyPicker/src/widgets/giphy_image.dart';
import 'package:flutter/material.dart';
import 'package:giphy_client/giphy_client.dart';
import 'package:Enigma/const.dart';
/// Presents a Giphy preview image.
class GiphyPreviewPage extends StatelessWidget {
final GiphyGif gif;
final Widget title;
final ValueChanged onSelected;
const GiphyPreviewPage(
{@required this.gif, @required this.onSelected, this.title});
@override
Widget build(BuildContext context) {
return Theme(
data: EnigmaTheme,
child: Scaffold(
appBar: AppBar(title: title, actions: [
IconButton(
icon: Icon(Icons.check), onPressed: () {
onSelected(gif);
Navigator.pop(context);
})
]),
body: SafeArea(
child: Center(child: GiphyImage.original(gif: gif)),
bottom: false)));
}
}
================================================
FILE: lib/GiphyPicker/src/widgets/giphy_search_page.dart
================================================
import 'package:Enigma/GiphyPicker/src/widgets/giphy_search_view.dart';
import 'package:Enigma/const.dart';
import 'package:flutter/material.dart';
class GiphySearchPage extends StatelessWidget {
final Widget title;
const GiphySearchPage({this.title});
@override
Widget build(BuildContext context) {
return Theme(
data: EnigmaTheme,
child: Scaffold(
appBar: AppBar(title: Image.asset('assets/giphy.png')),
body: SafeArea(child: GiphySearchView(), bottom: false)));
}
}
================================================
FILE: lib/GiphyPicker/src/widgets/giphy_search_view.dart
================================================
import 'dart:async';
import 'package:Enigma/GiphyPicker/src/model/giphy_repository.dart';
import 'package:Enigma/GiphyPicker/src/widgets/giphy_context.dart';
import 'package:Enigma/GiphyPicker/src/widgets/giphy_thumbnail_grid.dart';
import 'package:flutter/material.dart';
/// Provides the UI for searching Giphy gif images.
class GiphySearchView extends StatefulWidget {
@override
_GiphySearchViewState createState() => _GiphySearchViewState();
}
class _GiphySearchViewState extends State {
final _textController = TextEditingController();
final _scrollController = ScrollController();
final _repoController = StreamController();
@override
void initState() {
// initiate search on next frame (we need context)
Future.delayed(Duration.zero, () {
final giphy = GiphyContext.of(context);
_search(giphy);
});
super.initState();
}
@override
void dispose() {
_repoController.close();
super.dispose();
}
@override
Widget build(BuildContext context) {
final giphy = GiphyContext.of(context);
return Column(children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 10),
child: TextField(
controller: _textController,
decoration: InputDecoration(hintText: 'Search Giphy'),
onChanged: (value) => _delayedSearch(giphy, value))),
Expanded(
child: StreamBuilder(
stream: _repoController.stream,
builder: (BuildContext context,
AsyncSnapshot snapshot) {
if (snapshot.hasData) {
return snapshot.data.totalCount > 0
? NotificationListener(
child: RefreshIndicator(
child: GiphyThumbnailGrid(
key: Key('${snapshot.data.hashCode}'),
repo: snapshot.data,
scrollController: _scrollController),
onRefresh: () =>
_search(giphy, term: _textController.text)),
onNotification: (n) {
// hide keyboard when scrolling
if (n is UserScrollNotification) {
FocusScope.of(context).requestFocus(FocusNode());
}
return false;
},
)
: Center(child: Text('No results'));
}
return Center(child: CircularProgressIndicator());
}))
]);
}
void _delayedSearch(GiphyContext giphy, String term) => Future.delayed(
Duration(milliseconds: 500), () => _search(giphy, term: term));
Future _search(GiphyContext giphy, {String term = ''}) async {
// skip search if term does not match current search text
if (term != _textController.text) {
return;
}
try {
// search, or trending when term is empty
final repo = await (term.isEmpty
? GiphyRepository.trending(
apiKey: giphy.apiKey,
rating: giphy.rating,
onError: giphy.onError)
: GiphyRepository.search(
apiKey: giphy.apiKey,
query: term,
rating: giphy.rating,
lang: giphy.language,
onError: giphy.onError));
// scroll up
if (_scrollController.hasClients) {
_scrollController.jumpTo(0);
}
_repoController.add(repo);
} catch (error) {
giphy.onError(error);
}
}
}
================================================
FILE: lib/GiphyPicker/src/widgets/giphy_thumbnail.dart
================================================
import 'dart:typed_data';
import 'package:Enigma/GiphyPicker/src/model/giphy_repository.dart';
import 'package:flutter/material.dart';
/// Loads and renders a gif thumbnail image using a GiphyRepostory and an index.
class GiphyThumbnail extends StatefulWidget {
final GiphyRepository repo;
final int index;
final Widget placeholder;
const GiphyThumbnail(
{Key key, @required this.repo, @required this.index, this.placeholder})
: super(key: key);
@override
_GiphyThumbnailState createState() => _GiphyThumbnailState();
}
class _GiphyThumbnailState extends State {
Future _loadPreview;
@override
void initState() {
_loadPreview = widget.repo.getPreview(widget.index);
super.initState();
}
@override
void dispose() {
widget.repo.cancelGetPreview(widget.index);
super.dispose();
}
@override
Widget build(BuildContext context) => FutureBuilder(
future: _loadPreview,
builder: (BuildContext context, AsyncSnapshot snapshot) {
if (!snapshot.hasData) {
return widget.placeholder ?? Container(color: Colors.grey.shade200);
}
return Image.memory(snapshot.data, fit: BoxFit.cover);
});
}
================================================
FILE: lib/GiphyPicker/src/widgets/giphy_thumbnail_grid.dart
================================================
import 'package:Enigma/GiphyPicker/src/model/giphy_repository.dart';
import 'package:Enigma/GiphyPicker/src/widgets/giphy_context.dart';
import 'package:Enigma/GiphyPicker/src/widgets/giphy_preview_page.dart';
import 'package:Enigma/GiphyPicker/src/widgets/giphy_thumbnail.dart';
import 'package:Enigma/const.dart';
import 'package:flutter/material.dart';
/// A selectable grid view of gif thumbnails.
class GiphyThumbnailGrid extends StatelessWidget {
final GiphyRepository repo;
final ScrollController scrollController;
const GiphyThumbnailGrid(
{Key key, @required this.repo, this.scrollController})
: super(key: key);
@override
Widget build(BuildContext context) {
return GridView.builder(
padding: EdgeInsets.all(10),
controller: scrollController,
itemCount: repo.totalCount,
itemBuilder: (BuildContext context, int index) => GestureDetector(
child: GiphyThumbnail(key: Key('$index'), repo: repo, index: index),
onTap: () async {
// display preview page
final giphy = GiphyContext.of(context);
final gif = await repo.get(index);
unawaited(Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) => GiphyPreviewPage(
gif: gif, onSelected: giphy.onSelected))));
}),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount:
MediaQuery.of(context).orientation == Orientation.portrait
? 2
: 3,
childAspectRatio: 1.6,
crossAxisSpacing: 5,
mainAxisSpacing: 5));
}
}
================================================
FILE: lib/ImagePicker/image_picker.dart
================================================
import 'dart:io';
import 'package:Enigma/open_settings.dart';
import 'package:Enigma/utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:image_picker/image_picker.dart';
import 'package:image_cropper/image_cropper.dart';
import 'package:Enigma/const.dart';
import 'package:permission_handler/permission_handler.dart';
//图片选择界面
class HybridImagePicker extends StatefulWidget {
HybridImagePicker(
{Key key,
@required this.title,
@required this.callback,
this.profile = false})
: super(key: key);
//页面标题
final String title;
//回调
final Function callback;
//
final bool profile;
@override
_HybridImagePickerState createState() => new _HybridImagePickerState();
}
class _HybridImagePickerState extends State {
//选择到的图片文件
File _imageFile;
//是否加载进度条
bool isLoading = false;
@override
void initState() {
//状态栏透明
SystemUiOverlayStyle systemUiOverlayStyle =
SystemUiOverlayStyle(statusBarColor: Colors.transparent);
SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
super.initState();
}
//将选择到的图片文件设置到属性中
void captureImage(ImageSource captureMode) async {
try {
var imageFile = await ImagePicker.pickImage(source: captureMode);
setState(() {
_imageFile = imageFile;
});
} catch (e) {}
}
//返回image组件
Widget _buildImage() {
if (_imageFile != null) {
return new Image.file(_imageFile);
} else {
return new Text('Take an image to start',
style: new TextStyle(fontSize: 18.0, color: enigmaWhite));
}
}
//裁剪图片
Future _cropImage() async {
double x, y;
if (widget.profile) {
x = 1.0;
y = 1.0;
}
//选择裁剪后的图片
File croppedFile = await ImageCropper.cropImage(
sourcePath: _imageFile.path);
setState(() {
if (croppedFile != null) _imageFile = croppedFile;
});
}
@override
Widget build(BuildContext context) {
return Enigma.getNTPWrappedWidget(WillPopScope(
child: Scaffold(
backgroundColor: enigmaBlack,//背景颜色
appBar: new AppBar( //app的标题栏
title: new Text(widget.title),//标题文字
backgroundColor: Colors.blueAccent,//背景颜色
actions: _imageFile != null//如果图片文件不为空的话就显示两个图标按钮,一个裁剪,一个确定
? [
IconButton(
icon: Icon(Icons.edit, color: Colors.black),
disabledColor: Colors.transparent,
onPressed: () {
//裁剪按钮的点击事件
_cropImage();
}),
IconButton(
icon: Icon(Icons.check, color: Colors.black),
onPressed: () {
//确定按钮的点击事件
setState(() {
isLoading = true;
});
//调用传来的回调,把文件传过去,让调用者自己处理
widget.callback(_imageFile).then((imageUrl) {
Navigator.pop(context, imageUrl);
});
}),
SizedBox(
width: 8.0,
)
]
: []),
body: Stack(children: [//绝对布局
new Column(children: [//一列
new Expanded(child: new Center(child: _buildImage())),
_buildButtons()
]),
Positioned( //进度条
child: isLoading //如果正在家在的话就显示进度条,如果没有的话就什么都不显示
? Container(
child: Center(
child: CircularProgressIndicator(
valueColor:
AlwaysStoppedAnimation(enigmaBlue)),
),
color: enigmaBlack.withOpacity(0.8),
)
: Container(),
)
]),
),
onWillPop: () => Future.value(!isLoading),
));
}
//构建按钮
Widget _buildButtons() {
//一个约束盒子
return new ConstrainedBox(
//高度60
constraints: BoxConstraints.expand(height: 60.0),
//新的一行
child: new Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
//左下角选择图片按钮
_buildActionButton(new Key('retake'), Icons.photo_library, () {
//检查权限
Enigma.checkAndRequestPermission(PermissionGroup.storage)
.then((res) {
if (res) {
captureImage(ImageSource.gallery);
} else {
Enigma.showRationale(
'Permission to access gallery needed to send photos to your friends.');
Navigator.pushReplacement(
context,
new MaterialPageRoute(
builder: (context) => OpenSettings()));
}
});
}),
//右下角选择拍照按钮
_buildActionButton(new Key('upload'), Icons.photo_camera, () {
//检查权限
Enigma.checkAndRequestPermission(PermissionGroup.camera)
.then((res) {
if (res) {
captureImage(ImageSource.camera);
} else {
Enigma.showRationale(
'Permission to access camera needed to take photos to share with your friends.');
Navigator.pushReplacement(
context,
new MaterialPageRoute(
builder: (context) => OpenSettings()));
}
});
}),
]));
}
Widget _buildActionButton(Key key, IconData icon, Function onPressed) {
return new Expanded(
child: new RaisedButton(
key: key,
child: Icon(icon, size: 30.0),
shape: new RoundedRectangleBorder(),
color: Colors.blueAccent,
textColor: Colors.white,
onPressed: onPressed),
);
}
}
================================================
FILE: lib/alias.dart
================================================
import 'dart:io';
import 'package:Enigma/DataModel.dart';
import 'package:Enigma/const.dart';
import 'package:Enigma/util/const.dart';
import 'package:Enigma/utils.dart';
import 'package:flutter/material.dart';
import 'package:Enigma/ImagePicker/image_picker.dart';
//修改备注的弹出框
class AliasForm extends StatefulWidget {
final Map user;//用户信息
final DataModel model;//数据模型
AliasForm(this.user, this.model);
@override
_AliasFormState createState() => _AliasFormState();
}
class _AliasFormState extends State {
//文本控制器,用于获得备注
TextEditingController _alias;
//头像文件
File _imageFile;
@override
void initState() {
super.initState();
_alias = new TextEditingController(text: Enigma.getNickname(widget.user));
}
//获得图片
Future getImage(File image) {
setState(() {
_imageFile = image;
});
return Future.value(false);
}
@override
Widget build(BuildContext context) {
String name = Enigma.getNickname(widget.user);
return Theme(
child: AlertDialog(
actions: [
//两个按钮,一个是添加备注,一个是删除备注
FlatButton(
child: Text(
'删除备注',
style: TextStyle(fontWeight: FontWeight.bold),
),
onPressed: widget.user[ALIAS_NAME] != null ||
widget.user[ALIAS_AVATAR] != null
? () {
//删除备注
widget.model.removeAlias(widget.user[PHONE]);
Navigator.pop(context);
}
: null),
FlatButton(
child: Text(
'添加备注',
style: TextStyle(fontWeight: FontWeight.bold),
),
onPressed: () {
if (_alias.text.isNotEmpty) {
if (_alias.text != name || _imageFile != null) {
//添加备注
widget.model.setAlias(
_alias.text, _imageFile, widget.user[PHONE]);
}
Navigator.pop(context);
}
})
],
contentPadding: EdgeInsets.all(20),
content: SingleChildScrollView(
child: Column(mainAxisSize: MainAxisSize.min, children: [
Container(
width: 120,
height: 120,
child: Stack(children: [
Center( //头像
child: Enigma.avatar(widget.user,
image: _imageFile, radius: 50)),
Positioned(//修改按钮
bottom: 0,
right: 0,
child: FloatingActionButton(
mini: true,
child: Icon(Icons.edit),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => HybridImagePicker(
title: 'Pick an image',
callback: getImage,
profile: true,
)));
},
)),
])),
TextFormField( //备注文本的输入框
autovalidate: true,
controller: _alias,
decoration: InputDecoration(hintText: '备注'),
validator: (val) {
if (val.trim().isEmpty) return '备注不能为空!';
return null;
},
)
]),
),
),
data: Constants.lightTheme);
}
}
================================================
FILE: lib/bubble.dart
================================================
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'const.dart';
import 'seen_provider.dart';
//聊天的信息框
class Bubble extends StatelessWidget {
const Bubble(
{@required this.child,
@required this.timestamp,
@required this.delivered,
@required this.isMe,
@required this.isContinuing});
final int timestamp;//聊天的时间
final Widget child;//子组件
final dynamic delivered;//分割线
final bool isMe, isContinuing;//是否是我,是否继续
//时间格式
humanReadableTime() => DateFormat('hh:mm')
.format(DateTime.fromMillisecondsSinceEpoch(timestamp));
//获取最近的状态
getSeenStatus(seen) {
if (seen is bool) return true;
if (seen is String) return true;
return timestamp <= seen;
}
//构建界面
@override
Widget build(BuildContext context) {
//获取最近的状态以及时间
final bool seen = getSeenStatus(SeenProvider.of(context).value);
final bg = isMe ? Theme.of(context).accentColor : Colors.grey[200];
final align = isMe ? CrossAxisAlignment.end : CrossAxisAlignment.start;
dynamic icon = delivered is bool && delivered
? (seen ? Icons.done_all : Icons.done)
: Icons.access_time;
final color = isMe ? Colors.white : Colors.black;
icon = Icon(icon, size: 13.0, color: seen ? Colors.greenAccent : color);
if (delivered is Future) {
icon = FutureBuilder(
future: delivered,
builder: (context, res) {
switch (res.connectionState) {
case ConnectionState.done:
return Icon((seen ? Icons.done_all : Icons.done),
size: 13.0, color: seen ? Colors.greenAccent : color);
case ConnectionState.none:
case ConnectionState.active:
case ConnectionState.waiting:
default:
return Icon(Icons.access_time,
size: 13.0, color: seen ? Colors.greenAccent : color);
}
});
}
dynamic radius = isMe
? BorderRadius.only(
topLeft: Radius.circular(5.0),
bottomLeft: Radius.circular(5.0),
bottomRight: Radius.circular(10.0),
)
: BorderRadius.only(
topRight: Radius.circular(5.0),
bottomLeft: Radius.circular(10.0),
bottomRight: Radius.circular(5.0),
);
dynamic margin = const EdgeInsets.only(top: 20.0, bottom: 1.5);
if (isContinuing) {
radius = BorderRadius.all(Radius.circular(5.0));
margin = const EdgeInsets.all(1.5);
}
return SingleChildScrollView(
child: Column(
crossAxisAlignment: align,
children: [
Container(
margin: margin,
padding: const EdgeInsets.all(8.0),
constraints: BoxConstraints(
maxWidth: MediaQuery.of(context).size.width * 0.75),
decoration: BoxDecoration(
color: bg,
borderRadius: radius,
),
child: Stack(
children: [
Padding(
padding: child is Container
? EdgeInsets.all(0.0)
: EdgeInsets.only(right: isMe ? 10.0 : 15.0),
child: child),
],
),
),
Padding(
padding: isMe
? EdgeInsets.only(
right: 0,
bottom: 10.0,
)
: EdgeInsets.only(
left: 10,
bottom: 10.0,
),
child: Text(
humanReadableTime().toString() + (isMe ? ' ' : ''),
style: TextStyle(
color: Colors.black,
fontSize: 10.0,
),
),
)
],
));
}
}
================================================
FILE: lib/chat.dart
================================================
import 'dart:async';
import 'dart:io';
import 'package:Enigma/photo_view.dart';
import 'package:Enigma/screens/profile.dart';
import 'package:dio/dio.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:path/path.dart' as path;
import 'package:Enigma/util/const.dart';
import 'package:collection/collection.dart';
import 'package:file_picker/file_picker.dart';
import 'package:intl/intl.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_storage/firebase_storage.dart';
import 'package:flutter/material.dart';
import 'package:Enigma/const.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:Enigma/ImagePicker/image_picker.dart';
import 'package:Enigma/bubble.dart';
import 'package:Enigma/E2EE/e2ee.dart' as e2ee;
import 'package:Enigma/seen_provider.dart';
import 'package:Enigma/seen_state.dart';
import 'package:Enigma/message.dart';
import 'package:Enigma/utils.dart';
import 'package:Enigma/chat_controller.dart';
import 'package:Enigma/DataModel.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:Enigma/save.dart';
import 'package:flutter/services.dart';
import 'package:encrypt/encrypt.dart' as encrypt;
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
//聊天界面
class ChatScreen extends StatefulWidget {
//对方用户,当前用户
final String peerNo, currentUserNo;
//数据模型
final DataModel model;
//未读消息数量
final int unread;
ChatScreen(
{Key key,
@required this.currentUserNo,
@required this.peerNo,
@required this.model,
@required this.unread});
@override
State createState() =>
new _ChatScreenState(currentUserNo: currentUserNo, peerNo: peerNo);
}
class _ChatScreenState extends State with WidgetsBindingObserver {
//
GlobalKey _scaffold = new GlobalKey();
//对方的头像,手机号,当前用户的手机号,私钥,分享密钥
String peerAvatar, peerNo, currentUserNo, privateKey, sharedSecret;
//对方用户信息和当前用户信息
Map peer, currentUser;
//聊天状态和未读消息
int chatStatus, unread;
_ChatScreenState({@required this.peerNo, @required this.currentUserNo});
//会话id
String chatId;
SharedPreferences prefs;//存储
bool typing = false;
File imageFile;//图片文件
bool isLoading;//是否加载状态
String imageUrl;//图片地址
SeenState seenState;//最近的状态
List messages = new List();//聊天消息
//保存的聊天消息
List