This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b13298e
Showing
78 changed files
with
2,582 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.DS_Store | ||
.dart_tool/ | ||
|
||
.packages | ||
.pub/ | ||
|
||
build/ | ||
ios/.generated/ | ||
ios/Flutter/Generated.xcconfig | ||
ios/Runner/GeneratedPluginRegistrant.* | ||
|
||
.idea | ||
.vscode | ||
|
||
pubspec.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
## [0.0.1] - 24 August 2018 | ||
Initial release, should be polished |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 Holmusk. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
# Cached network image | ||
|
||
|
||
A flutter library to show images from S3 repository and keep them in the cache directory. | ||
|
||
This package is based from [https://github.com/renefloor/flutter_cached_network_image] | ||
## How to add | ||
|
||
Add this to your package's pubspec.yaml file: | ||
``` | ||
dependencies: | ||
s3_cache_image: "^0.0.1" | ||
``` | ||
Add it to your dart file: | ||
``` | ||
import 'package:s3_cache_image/s3_cache_image.dart'; | ||
``` | ||
|
||
## How to use | ||
The S3ImageCache can be used directly or through the ImageProvider. | ||
|
||
``` | ||
S3CachedImage( | ||
fit: BoxFit.cover, | ||
width: width, | ||
height: width, | ||
onExpired: null, | ||
imageURL: 'INSERT S3 URL HERE', | ||
cacheId: 'INSERT CACHE ID HERE', | ||
errorWidget: Center(child: Text('ERROR')), | ||
placeholder: Center(child: Text('Loading'))) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
analyzer: | ||
language: | ||
enableSuperMixins: true | ||
# strong-mode: true | ||
|
||
errors: | ||
# allow for asset_does_not_exist | ||
unrecognized_error_code: ignore | ||
# ignore this in pubspec.yaml | ||
asset_does_not_exist: ignore | ||
|
||
exclude: | ||
- lib/generated/** | ||
|
||
linter: | ||
rules: | ||
# these rules are documented on and in the same order as | ||
# the Dart Lint rules page to make maintenance easier | ||
# https://github.com/dart-lang/linter/blob/master/example/all.yaml | ||
- always_declare_return_types | ||
- always_put_control_body_on_new_line | ||
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219 | ||
- always_require_non_null_named_parameters | ||
# - always_specify_types | ||
- annotate_overrides | ||
# - avoid_annotating_with_dynamic # conflicts with always_specify_types | ||
- avoid_as | ||
# - avoid_bool_literals_in_conditional_expressions # not yet tested | ||
# - avoid_catches_without_on_clauses # we do this commonly | ||
# - avoid_catching_errors # we do this commonly | ||
# - avoid_classes_with_only_static_members | ||
- avoid_empty_else | ||
# - avoid_function_literals_in_foreach_calls | ||
- avoid_init_to_null | ||
- avoid_null_checks_in_equality_operators | ||
# - avoid_positional_boolean_parameters # not yet tested | ||
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356) | ||
- avoid_relative_lib_imports | ||
- avoid_renaming_method_parameters | ||
- avoid_return_types_on_setters | ||
- avoid_returning_null | ||
# - avoid_returning_this # https://github.com/dart-lang/linter/issues/842 | ||
# - avoid_setters_without_getters # not yet tested | ||
# - avoid_single_cascade_in_expression_statements # not yet tested | ||
- avoid_slow_async_io | ||
# - avoid_types_as_parameter_names # https://github.com/dart-lang/linter/pull/954/files | ||
# - avoid_types_on_closure_parameters # conflicts with always_specify_types | ||
# - avoid_unused_constructor_parameters # https://github.com/dart-lang/linter/pull/847 | ||
- await_only_futures | ||
# - camel_case_types | ||
- cancel_subscriptions | ||
- cascade_invocations # not yet tested | ||
- close_sinks # https://github.com/flutter/flutter/issues/5789 | ||
# - comment_references # blocked on https://github.com/dart-lang/dartdoc/issues/1153 | ||
# - constant_identifier_names # https://github.com/dart-lang/linter/issues/204 | ||
- control_flow_in_finally | ||
- directives_ordering | ||
- empty_catches | ||
- empty_constructor_bodies | ||
- empty_statements | ||
- hash_and_equals | ||
- implementation_imports | ||
# - invariant_booleans # https://github.com/flutter/flutter/issues/5790 | ||
- iterable_contains_unrelated_type | ||
- join_return_with_assignment # not yet tested | ||
- library_names | ||
- library_prefixes | ||
- list_remove_unrelated_type | ||
- literal_only_boolean_expressions # https://github.com/flutter/flutter/issues/5791 | ||
- no_adjacent_strings_in_list | ||
- no_duplicate_case_values | ||
- non_constant_identifier_names | ||
- omit_local_variable_types # opposite of always_specify_types | ||
# - one_member_abstracts # too many false positives | ||
# - only_throw_errors # https://github.com/flutter/flutter/issues/5792 | ||
- overridden_fields | ||
- package_api_docs | ||
- package_names | ||
- package_prefixed_library_names | ||
# - parameter_assignments # we do this commonly | ||
- prefer_adjacent_string_concatenation | ||
- prefer_asserts_in_initializer_lists | ||
- prefer_bool_in_asserts | ||
- prefer_collection_literals | ||
- prefer_conditional_assignment | ||
# - prefer_const_constructors | ||
- prefer_const_constructors_in_immutables | ||
- prefer_const_declarations | ||
# - prefer_const_literals_to_create_immutables | ||
# - prefer_constructors_over_static_methods # not yet tested | ||
- prefer_contains | ||
# - prefer_equal_for_default_values # not yet tested | ||
# - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods | ||
# - prefer_final_fields | ||
# - prefer_final_locals | ||
- prefer_foreach | ||
# - prefer_function_declarations_over_variables # not yet tested | ||
- prefer_initializing_formals | ||
# - prefer_interpolation_to_compose_strings # not yet tested | ||
- prefer_is_empty | ||
- prefer_is_not_empty | ||
- prefer_single_quotes | ||
- prefer_typing_uninitialized_variables | ||
- recursive_getters | ||
- slash_for_doc_comments | ||
- sort_constructors_first | ||
- sort_unnamed_constructors_first | ||
- test_types_in_equals | ||
- throw_in_finally | ||
# - type_annotate_public_apis # subset of always_specify_types | ||
- type_init_formals | ||
# - unawaited_futures # https://github.com/flutter/flutter/issues/5793 | ||
- unnecessary_brace_in_string_interps | ||
- unnecessary_getters_setters | ||
# - unnecessary_lambdas # https://github.com/dart-lang/linter/issues/498 | ||
- unnecessary_null_aware_assignments | ||
- unnecessary_null_in_if_null_operators | ||
- unnecessary_overrides | ||
- unnecessary_parenthesis | ||
- unnecessary_statements # not yet tested | ||
- unnecessary_this | ||
- unrelated_type_equality_checks | ||
- use_rethrow_when_possible | ||
# - use_setters_to_change_properties # not yet tested | ||
# - use_string_buffers # https://github.com/dart-lang/linter/pull/664 | ||
# - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review | ||
- valid_regexps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.DS_Store | ||
.dart_tool/ | ||
|
||
.packages | ||
.pub/ | ||
|
||
build/ | ||
|
||
.flutter-plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# example | ||
|
||
A new Flutter project. | ||
|
||
## Getting Started | ||
|
||
For help getting started with Flutter, view our online | ||
[documentation](https://flutter.io/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*.iml | ||
*.class | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
/build | ||
/captures | ||
GeneratedPluginRegistrant.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>android</name> | ||
<comment>Project android created by Buildship.</comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
connection.project.dir= | ||
eclipse.preferences.version=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/> | ||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>app</name> | ||
<comment>Project app created by Buildship.</comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature> | ||
</natures> | ||
</projectDescription> |
2 changes: 2 additions & 0 deletions
2
example/android/app/.settings/org.eclipse.buildship.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
connection.project.dir=.. | ||
eclipse.preferences.version=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
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" | ||
|
||
android { | ||
compileSdkVersion 27 | ||
|
||
lintOptions { | ||
disable 'InvalidPackage' | ||
} | ||
|
||
defaultConfig { | ||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | ||
applicationId "com.example.example" | ||
minSdkVersion 16 | ||
targetSdkVersion 27 | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
// TODO: Add your own signing config for the release build. | ||
// Signing with the debug keys for now, so `flutter run --release` works. | ||
signingConfig signingConfigs.debug | ||
} | ||
} | ||
} | ||
|
||
flutter { | ||
source '../..' | ||
} | ||
|
||
dependencies { | ||
testImplementation 'junit:junit:4.12' | ||
androidTestImplementation 'com.android.support.test:runner:1.0.1' | ||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.example.example"> | ||
|
||
<!-- The INTERNET permission is required for development. Specifically, | ||
flutter needs it to communicate with the running application | ||
to allow setting breakpoints, to provide hot reload, etc. | ||
--> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
|
||
<!-- io.flutter.app.FlutterApplication is an android.app.Application that | ||
calls FlutterMain.startInitialization(this); in its onCreate method. | ||
In most cases you can leave this as-is, but you if you want to provide | ||
additional functionality it is fine to subclass or reimplement | ||
FlutterApplication and put your custom class here. --> | ||
<application | ||
android:name="io.flutter.app.FlutterApplication" | ||
android:label="example" | ||
android:icon="@mipmap/ic_launcher"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:launchMode="singleTop" | ||
android:theme="@style/LaunchTheme" | ||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density" | ||
android:hardwareAccelerated="true" | ||
android:windowSoftInputMode="adjustResize"> | ||
<!-- This keeps the window background of the activity showing | ||
until Flutter renders its first frame. It can be removed if | ||
there is no splash screen (such as the default splash screen | ||
defined in @style/LaunchTheme). --> | ||
<meta-data | ||
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame" | ||
android:value="true" /> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
</manifest> |
13 changes: 13 additions & 0 deletions
13
example/android/app/src/main/java/com/example/example/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.example.example; | ||
|
||
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); | ||
} | ||
} |
Oops, something went wrong.