Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add null safety #258

Open
wants to merge 1 commit 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
296 changes: 163 additions & 133 deletions .dart_tool/package_config.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,7 @@ fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
fastlane/readme.md

.dart_tool/
.packages
118 changes: 64 additions & 54 deletions .packages
Original file line number Diff line number Diff line change
@@ -1,57 +1,67 @@
# Generated by pub on 2021-01-26 16:47:21.044882.
analyzer:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.37.0/lib/
args:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.5.2/lib/
async:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.3.0/lib/
boolean_selector:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.5/lib/
characters:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/characters-1.1.0-nullsafety.3/lib/
charcode:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.2/lib/
collection:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.15.0-nullsafety.3/lib/
convert:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.1.1/lib/
crypto:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.0.6/lib/
csslib:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/csslib-0.16.1/lib/
# This file is deprecated. Tools should instead consume
# `.dart_tools/package_config.json`.
#
# For more info see: https://dart.dev/go/dot-packages-deprecation
#
# Generated by pub on 2021-04-06 22:56:35.095745.
_fe_analyzer_shared:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/_fe_analyzer_shared-19.0.0/lib/
analyzer:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-1.3.0/lib/
args:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/args-2.0.0/lib/
async:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.5.0/lib/
boolean_selector:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-2.1.0/lib/
build:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/build-2.0.0/lib/
built_collection:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/built_collection-5.0.0/lib/
built_value:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/built_value-8.0.4/lib/
characters:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/characters-1.1.0/lib/
charcode:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.2.0/lib/
cli_util:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/cli_util-0.3.0/lib/
code_builder:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/code_builder-3.7.0/lib/
collection:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.15.0/lib/
convert:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-3.0.0/lib/
coverage:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/coverage-1.0.2/lib/
crypto:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-3.0.1/lib/
dart_style:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/dart_style-2.0.0/lib/
file:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/file-6.1.0/lib/
fixnum:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/fixnum-1.0.0/lib/
flutter:file:///Applications/flutter/packages/flutter/lib/
front_end:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/front_end-0.1.20/lib/
glob:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/glob-1.1.7/lib/
html:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/html-0.14.0+2/lib/
http:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/http-0.12.0+2/lib/
http_multi_server:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_multi_server-2.1.0/lib/
http_parser:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.3/lib/
io:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/io-0.3.3/lib/
js:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.1+1/lib/
kernel:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/kernel-0.3.20/lib/
matcher:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.5/lib/
meta:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.3.0-nullsafety.3/lib/
mime:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/mime-0.9.6+3/lib/
mockito:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/mockito-3.0.2/lib/
multi_server_socket:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/multi_server_socket-1.0.2/lib/
node_preamble:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/node_preamble-1.4.5/lib/
package_config:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_config-1.0.5/lib/
package_resolver:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_resolver-1.0.10/lib/
path:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.2/lib/
pedantic:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.8.0+1/lib/
platform:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/platform-2.2.0/lib/
pool:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/pool-1.4.0/lib/
pub_semver:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-1.4.2/lib/
shelf:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf-0.7.5/lib/
shelf_packages_handler:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_packages_handler-1.0.4/lib/
shelf_static:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_static-0.2.8/lib/
shelf_web_socket:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_web_socket-0.2.3/lib/
glob:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/glob-2.0.1/lib/
http_multi_server:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_multi_server-3.0.0/lib/
http_parser:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-4.0.0/lib/
io:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/io-1.0.0/lib/
js:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.3/lib/
logging:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/logging-1.0.1/lib/
matcher:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.10/lib/
meta:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.3.0/lib/
mime:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/mime-1.0.0/lib/
mockito:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/mockito-5.0.3/lib/
node_preamble:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/node_preamble-2.0.0/lib/
package_config:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_config-2.0.0/lib/
path:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.8.0/lib/
pedantic:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.11.0/lib/
platform:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/platform-3.0.0/lib/
pool:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/pool-1.5.0/lib/
pub_semver:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-2.0.0/lib/
shelf:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf-1.1.0/lib/
shelf_packages_handler:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_packages_handler-3.0.0/lib/
shelf_static:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_static-1.0.0/lib/
shelf_web_socket:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_web_socket-1.0.1/lib/
sky_engine:file:///Applications/flutter/bin/cache/pkg/sky_engine/lib/
source_map_stack_trace:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_map_stack_trace-1.1.5/lib/
source_maps:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_maps-0.10.8/lib/
source_span:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.5.5/lib/
stack_trace:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3/lib/
stream_channel:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-2.0.0/lib/
stream_transform:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_transform-0.0.19/lib/
string_scanner:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.4/lib/
term_glyph:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0/lib/
test:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/test-1.6.5/lib/
test_api:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.6/lib/
test_core:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_core-0.2.7/lib/
typed_data:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.3.0-nullsafety.3/lib/
vector_math:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.1.0-nullsafety.3/lib/
vm_service_lib:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/vm_service_lib-3.22.2/lib/
watcher:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/watcher-0.9.7+12/lib/
web_socket_channel:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-1.0.14/lib/
yaml:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/yaml-2.1.16/lib/
source_gen:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_gen-1.0.0/lib/
source_map_stack_trace:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_map_stack_trace-2.1.0/lib/
source_maps:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_maps-0.10.10/lib/
source_span:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.8.1/lib/
stack_trace:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.10.0/lib/
stream_channel:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-2.1.0/lib/
string_scanner:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.1.0/lib/
term_glyph:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.2.0/lib/
test:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/test-1.16.8/lib/
test_api:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.3.0/lib/
test_core:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_core-0.3.19/lib/
typed_data:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.3.0/lib/
vector_math:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.1.0/lib/
vm_service:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/vm_service-6.2.0/lib/
watcher:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/watcher-1.0.0/lib/
web_socket_channel:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-2.0.0/lib/
webkit_inspection_protocol:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/webkit_inspection_protocol-1.0.0/lib/
yaml:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/yaml-3.1.0/lib/
jpush_flutter:lib/
2 changes: 1 addition & 1 deletion example/.flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"jpush_flutter","path":"/Users/raoxudong/JPush/jpush-github/jpush-flutter-plugin/","dependencies":[]}],"android":[{"name":"jpush_flutter","path":"/Users/raoxudong/JPush/jpush-github/jpush-flutter-plugin/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"jpush_flutter","dependencies":[]}],"date_created":"2021-01-26 16:47:22.148262","version":"1.22.5"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"jpush_flutter","path":"/Users/jianye/Documents/flutter-workspace/jpush-flutter-plugin/","dependencies":[]}],"android":[{"name":"jpush_flutter","path":"/Users/jianye/Documents/flutter-workspace/jpush-flutter-plugin/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"jpush_flutter","dependencies":[]}],"date_created":"2021-04-06 22:56:35.813491","version":"2.0.4"}
10 changes: 4 additions & 6 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Applications/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/raoxudong/JPush/jpush-github/jpush-flutter-plugin/example"
export "FLUTTER_TARGET=/Users/raoxudong/JPush/jpush-github/jpush-flutter-plugin/example/lib/main.dart"
export "FLUTTER_ROOT=/Users/jianye/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/jianye/Documents/flutter-workspace/jpush-flutter-plugin/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=/Applications/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=true"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.packages"
6 changes: 3 additions & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MyApp extends StatefulWidget {
}

class _MyAppState extends State<MyApp> {
String debugLable = 'Unknown';
String? debugLable = 'Unknown';
final JPush jpush = new JPush();

@override
Expand All @@ -23,7 +23,7 @@ class _MyAppState extends State<MyApp> {

// Platform messages are asynchronous, so we initialize in an async method.
Future<void> initPlatformState() async {
String platformVersion;
String? platformVersion;

try {
jpush.addEventHandler(
Expand Down Expand Up @@ -332,7 +332,7 @@ class CustomButton extends StatelessWidget {
final VoidCallback onPressed;
final String title;

const CustomButton({@required this.onPressed, @required this.title});
const CustomButton({required this.onPressed, required this.title});

@override
Widget build(BuildContext context) {
Expand Down
Loading