Skip to content

Commit

Permalink
Feature/november changes (jhomlala#97)
Browse files Browse the repository at this point in the history
* Added showShareButton parameter, general refactor

* Updated flutter_local_notifications dependency to support Android 12 (jhomlala#95)

Co-authored-by: Jakub <jhomlala@gmail.com>

* Updated changelog

* Android 12 update

* * Fixed issue with saving logs to file on Android.

* Fixed lint

* Disabled analysis options

Co-authored-by: Igor Kurek <ikurek@users.noreply.github.com>
  • Loading branch information
jhomlala and ikurek authored Nov 7, 2021
1 parent 1d33888 commit 42c97ae
Show file tree
Hide file tree
Showing 27 changed files with 570 additions and 325 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 0.2.5
* Added showShareButton in Alice constructor.
* Added support for Android 12 (by Igor Kurek https://github.com/ikurek )
* Updated dependencies.
* Updated color scheme of Alice widgets.
* Fixed issue with saving logs to file on Android.
* Fixed lint

## 0.2.4
* Updated dependencies

Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Alice is an HTTP Inspector tool for Flutter which helps debugging http requests.

```yaml
dependencies:
alice: ^0.2.4
alice: ^0.2.5
```
2. Install it
Expand Down Expand Up @@ -151,11 +151,16 @@ If you want to limit max numbers of HTTP calls saved in memory, you may use `max
Alice alice = Alice(..., maxCallsCount: 1000));
```


If you want to change the Directionality of Alice, you can use the `directionality` parameter. If the parameter is set to null, the Directionality of the app will be used.
```dart
Alice alice = Alice(..., directionality: TextDirection.ltr);
```

If you want to hide share button, you can use `showShareButton` parameter.
```dart
Alice alice = Alice(..., showShareButton: false);
```

### HTTP Client configuration
If you're using Dio, you just need to add interceptor.

Expand Down
5 changes: 4 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ linter:
sort_unnamed_constructors_first: false
sized_box_for_whitespace: false
invalid_dependency: false
sort_pub_dependencies: false
sort_pub_dependencies: false
directives_ordering: false
noop_primitive_operations: false
use_build_context_synchronously: false
6 changes: 4 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -40,7 +40,8 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.jhomlala.alice_example"
minSdkVersion 19
targetSdkVersion 29
multiDexEnabled = true
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -61,6 +62,7 @@ flutter {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.multidex:multidex:2.0.1"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
Expand Down
1 change: 1 addition & 0 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
Expand Down
4 changes: 2 additions & 2 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.5.31'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
11 changes: 6 additions & 5 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ class _MyAppState extends State<MyApp> {
@override
void initState() {
_alice = Alice(
showNotification: true,
showInspectorOnShake: true,
darkTheme: false,
maxCallsCount: 1000);
showNotification: true,
showInspectorOnShake: true,
darkTheme: false,
maxCallsCount: 1000,
);
_dio = Dio(BaseOptions(
followRedirects: false,
));
Expand All @@ -54,7 +55,7 @@ class _MyAppState extends State<MyApp> {
return MaterialApp(
theme: ThemeData(
primaryColor: _primaryColor,
accentColor: _accentColor,
colorScheme: ColorScheme.light(secondary: _accentColor),
),
navigatorKey: _alice.getNavigatorKey(),
debugShowCheckedModeBanner: false,
Expand Down
77 changes: 49 additions & 28 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.2.3+1"
version: "0.2.5"
analyzer:
dependency: transitive
description:
Expand All @@ -28,7 +28,7 @@ packages:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.0"
version: "2.3.0"
async:
dependency: transitive
description:
Expand All @@ -42,7 +42,7 @@ packages:
name: better_player
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.72"
version: "0.0.79"
build:
dependency: transitive
description:
Expand Down Expand Up @@ -126,7 +126,7 @@ packages:
name: chopper
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.1"
version: "4.0.3"
chopper_generator:
dependency: "direct dev"
description:
Expand All @@ -141,6 +141,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
code_builder:
dependency: transitive
description:
Expand Down Expand Up @@ -190,13 +197,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
dbus:
dependency: transitive
description:
name: dbus
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.4"
dio:
dependency: transitive
description:
name: dio
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
version: "4.0.1"
ffi:
dependency: transitive
description:
Expand Down Expand Up @@ -229,14 +243,21 @@ packages:
name: flutter_local_notifications
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.0"
version: "9.0.1"
flutter_local_notifications_linux:
dependency: transitive
description:
name: flutter_local_notifications_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
flutter_local_notifications_platform_interface:
dependency: transitive
description:
name: flutter_local_notifications_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
version: "5.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
Expand All @@ -248,7 +269,7 @@ packages:
name: flutter_widget_from_html_core
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.1+3"
version: "0.7.0"
glob:
dependency: transitive
description:
Expand Down Expand Up @@ -276,7 +297,7 @@ packages:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.3"
version: "0.13.4"
http_multi_server:
dependency: transitive
description:
Expand Down Expand Up @@ -332,7 +353,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.7.0"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -360,7 +381,7 @@ packages:
name: package_info_plus
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
version: "1.3.0"
package_info_plus_linux:
dependency: transitive
description:
Expand All @@ -374,7 +395,7 @@ packages:
name: package_info_plus_macos
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
version: "1.3.0"
package_info_plus_platform_interface:
dependency: transitive
description:
Expand All @@ -388,14 +409,14 @@ packages:
name: package_info_plus_web
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
version: "1.0.4"
package_info_plus_windows:
dependency: transitive
description:
name: package_info_plus_windows
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
version: "1.0.4"
path:
dependency: transitive
description:
Expand All @@ -409,7 +430,7 @@ packages:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
version: "2.0.6"
path_provider_linux:
dependency: transitive
description:
Expand Down Expand Up @@ -451,21 +472,21 @@ packages:
name: permission_handler
url: "https://pub.dartlang.org"
source: hosted
version: "8.1.2"
version: "8.2.6"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "3.6.0"
version: "3.7.0"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.0"
version: "4.4.0"
platform:
dependency: transitive
description:
Expand Down Expand Up @@ -514,7 +535,7 @@ packages:
name: rxdart
url: "https://pub.dartlang.org"
source: hosted
version: "0.27.1"
version: "0.27.2"
sensors:
dependency: transitive
description:
Expand Down Expand Up @@ -603,7 +624,7 @@ packages:
name: timezone
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.0"
version: "0.8.0"
timing:
dependency: transitive
description:
Expand Down Expand Up @@ -638,35 +659,35 @@ packages:
name: wakelock
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.2"
version: "0.5.6"
wakelock_macos:
dependency: transitive
description:
name: wakelock_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0+1"
version: "0.4.0"
wakelock_platform_interface:
dependency: transitive
description:
name: wakelock_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.1+1"
version: "0.3.0"
wakelock_web:
dependency: transitive
description:
name: wakelock_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0+1"
version: "0.4.0"
wakelock_windows:
dependency: transitive
description:
name: wakelock_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
version: "0.2.0"
watcher:
dependency: transitive
description:
Expand Down Expand Up @@ -701,7 +722,7 @@ packages:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "5.1.2"
version: "5.3.1"
yaml:
dependency: transitive
description:
Expand All @@ -710,5 +731,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
flutter: ">=2.2.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=2.5.0"
Loading

0 comments on commit 42c97ae

Please sign in to comment.