Skip to content
This repository has been archived by the owner on Oct 12, 2020. It is now read-only.

fix deprecated #29

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .dart_tool/package_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"configVersion": 2,
"packages": [
{
"name": "characters",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/characters-1.1.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "collection",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/collection-1.15.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "flutter",
"rootUri": "file:///C:/flutter/packages/flutter",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "meta",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/meta-1.3.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "sky_engine",
"rootUri": "file:///C:/flutter/bin/cache/pkg/sky_engine",
"packageUri": "lib/",
"languageVersion": "1.11"
},
{
"name": "typed_data",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/typed_data-1.3.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "vector_math",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/vector_math-2.1.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "sms_maintained",
"rootUri": "../",
"packageUri": "lib/",
"languageVersion": "1.19"
}
],
"generated": "2020-10-08T06:24:06.517185Z",
"generator": "pub",
"generatorVersion": "2.10.0"
}
13 changes: 12 additions & 1 deletion android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
connection.project.dir=../example/android
arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.3))
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=C\:/Program Files/Java/jdk-15
jvm.arguments=
offline.mode=false
override.workspace.settings=true
show.console.view=true
show.executions.view=true
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import android.content.Context;
import android.os.Build;

import androidx.annotation.RequiresApi;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

Expand All @@ -21,7 +23,10 @@ public int getSimCount() {
return this.getManager().getPhoneCount();
}

@RequiresApi(api = Build.VERSION_CODES.M)
public String getSimId(int slotId) {


return this.getManager().getDeviceId(slotId);
}

Expand Down
151 changes: 151 additions & 0 deletions example/.dart_tool/package_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
{
"configVersion": 2,
"packages": [
{
"name": "async",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/async-2.5.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "boolean_selector",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/boolean_selector-2.1.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "characters",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/characters-1.1.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "charcode",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/charcode-1.2.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "clock",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/clock-1.1.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "collection",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/collection-1.15.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "cupertino_icons",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "fake_async",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/fake_async-1.2.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "flutter",
"rootUri": "file:///C:/flutter/packages/flutter",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "flutter_test",
"rootUri": "file:///C:/flutter/packages/flutter_test",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "matcher",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/matcher-0.12.10-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "meta",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/meta-1.3.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "path",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/path-1.8.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "sky_engine",
"rootUri": "file:///C:/flutter/bin/cache/pkg/sky_engine",
"packageUri": "lib/",
"languageVersion": "1.11"
},
{
"name": "sms_maintained",
"rootUri": "../../",
"packageUri": "lib/",
"languageVersion": "1.19"
},
{
"name": "source_span",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/source_span-1.8.0-nullsafety.2",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "stack_trace",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/stack_trace-1.10.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "stream_channel",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/stream_channel-2.1.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "string_scanner",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/string_scanner-1.1.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "term_glyph",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/term_glyph-1.2.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "test_api",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/test_api-0.2.19-nullsafety.2",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "typed_data",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/typed_data-1.3.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "vector_math",
"rootUri": "file:///C:/Users/janfr/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/vector_math-2.1.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "sms_example",
"rootUri": "../",
"packageUri": "lib/"
}
],
"generated": "2020-10-08T06:24:10.614122Z",
"generator": "pub",
"generatorVersion": "2.10.0"
}
1 change: 1 addition & 0 deletions example/.flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"sms_maintained","path":"D:\\\\Projects\\\\Github\\\\flutter_sms\\\\","dependencies":[]}],"android":[{"name":"sms_maintained","path":"D:\\\\Projects\\\\Github\\\\flutter_sms\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"sms_maintained","dependencies":[]}],"date_created":"2020-10-08 14:24:10.729812","version":"1.22.0"}
11 changes: 11 additions & 0 deletions example/android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=C\:/Program Files/Java/jdk-15
jvm.arguments=
offline.mode=false
override.workspace.settings=true
show.console.view=true
show.executions.view=true
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.babariviere.smsexample"
minSdkVersion 21
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.android.tools.build:gradle:4.0.2'
}
}

Expand Down
4 changes: 2 additions & 2 deletions example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Aug 07 11:59:14 CEST 2018
#Thu Oct 08 15:17:23 SGT 2020
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
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
15 changes: 15 additions & 0 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=C:\flutter"
export "FLUTTER_APPLICATION_PATH=D:\Projects\Github\flutter_sms\example"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
export "FLUTTER_FRAMEWORK_DIR=C:\flutter\bin\cache\artifacts\engine\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.packages"
2 changes: 1 addition & 1 deletion example/lib/conversation/conversationStore.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ConversationStore extends InheritedWidget {
final SmsThread thread;

static ConversationStore of(BuildContext context) {
return context.inheritFromWidgetOfExactType(ConversationStore)
return context.dependOnInheritedWidgetOfExactType()
as ConversationStore;
}

Expand Down
2 changes: 1 addition & 1 deletion example/lib/sim/sim_bloc_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class SimCardsBlocProvider extends InheritedWidget {
final SimCardsBloc simCardBloc;

static SimCardsBloc of(BuildContext context) {
final provider = context.inheritFromWidgetOfExactType(SimCardsBlocProvider);
final provider = context.dependOnInheritedWidgetOfExactType();
if (provider != null) {
return (provider as SimCardsBlocProvider).simCardBloc;
}
Expand Down