diff --git a/sqflite_darwin/CHANGELOG.md b/sqflite_darwin/CHANGELOG.md index 2c75fe38..b37ad440 100644 --- a/sqflite_darwin/CHANGELOG.md +++ b/sqflite_darwin/CHANGELOG.md @@ -1,3 +1,3 @@ -## 2.4.0+0 +## 2.4.0-0 * Initial implementation from sqflite v2.3.3+2 diff --git a/sqflite_darwin/example/.gitignore b/sqflite_darwin/example/.gitignore new file mode 100644 index 00000000..be2aa021 --- /dev/null +++ b/sqflite_darwin/example/.gitignore @@ -0,0 +1,50 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ +.metadata + +# Web related + +# Exceptions to above rules. +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages + +# Ingore platform files +/web/ +/android/ +/macos/ +/linux/ +/windows/ +/ios/ + +# flutter +.metadata +# Coverage +/coverage diff --git a/sqflite_darwin/example/README.md b/sqflite_darwin/example/README.md new file mode 100644 index 00000000..9d1c7854 --- /dev/null +++ b/sqflite_darwin/example/README.md @@ -0,0 +1,15 @@ +# sqflite_example + +Demonstrates how to use the [sqflite plugin](https://github.com/tekartik/sqflite). + +## Quick test + +Create project +``` +flutter create --platforms=macos,ios . +``` + +Run +``` +flutter run +``` diff --git a/sqflite_darwin/example/analysis_options.yaml b/sqflite_darwin/example/analysis_options.yaml new file mode 100644 index 00000000..b6d92d1e --- /dev/null +++ b/sqflite_darwin/example/analysis_options.yaml @@ -0,0 +1,108 @@ +include: package:flutter_lints/flutter.yaml + +# Until there are meta linter rules, each desired lint must be explicitly enabled. +# See: https://github.com/dart-lang/linter/issues/288 +# +# For a list of lints, see: http://dart-lang.github.io/linter/lints/ +# See the configuration guide for more +# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer +# +# NOTE: Please keep this file in sync with +# https://github.com/flutter/flutter/blob/master/analysis_options.yaml + +analyzer: + language: + strict-casts: true + strict-inference: true + + errors: + # treat missing required parameters as a warning (not a hint) + missing_required_param: warning + # allow having TODOs in the code + todo: ignore + # Ignore errors like + # 'super_goes_last' is a deprecated lint rule and should not be used • included_file_warning + included_file_warning: ignore + +linter: + rules: + - always_declare_return_types + - avoid_dynamic_calls + - avoid_empty_else + - avoid_relative_lib_imports + - avoid_shadowing_type_parameters + - avoid_slow_async_io + - avoid_types_as_parameter_names + - await_only_futures + - camel_case_extensions + - camel_case_types + - cancel_subscriptions + - curly_braces_in_flow_control_structures + - directives_ordering + - empty_catches + - hash_and_equals + - collection_methods_unrelated_type + - no_adjacent_strings_in_list + - no_duplicate_case_values + - non_constant_identifier_names + - omit_local_variable_types + - package_api_docs + - package_prefixed_library_names + - prefer_generic_function_type_aliases + - prefer_is_empty + - prefer_is_not_empty + - prefer_iterable_whereType + - prefer_single_quotes + - prefer_typing_uninitialized_variables + - sort_child_properties_last + - test_types_in_equals + - throw_in_finally + - unawaited_futures + - unnecessary_null_aware_assignments + - unnecessary_statements + - unrelated_type_equality_checks + - unsafe_html + - valid_regexps + + - constant_identifier_names + - control_flow_in_finally + - empty_statements + - implementation_imports + - overridden_fields + - package_names + - prefer_const_constructors + - prefer_initializing_formals + - prefer_void_to_null + # + - annotate_overrides + - avoid_init_to_null + - avoid_null_checks_in_equality_operators + - avoid_return_types_on_setters + - empty_constructor_bodies + - library_names + - library_prefixes + - prefer_adjacent_string_concatenation + - prefer_collection_literals + - prefer_contains + - slash_for_doc_comments + - type_init_formals + - unnecessary_const + - unnecessary_new + - unnecessary_null_in_if_null_operators + - use_rethrow_when_possible + + - dangling_library_doc_comments + - deprecated_member_use_from_same_package + - implicit_reopen + - invalid_case_patterns + - no_literal_bool_comparisons + - no_self_assignments + - no_wildcard_variable_uses + - type_literal_in_constant_pattern + # === doc rules === + - public_member_api_docs + # + # - prefer_final_locals + - sort_constructors_first + - sort_unnamed_constructors_first + diff --git a/sqflite_darwin/example/lib/main.dart b/sqflite_darwin/example/lib/main.dart new file mode 100644 index 00000000..d056c3c0 --- /dev/null +++ b/sqflite_darwin/example/lib/main.dart @@ -0,0 +1,6 @@ +import 'package:sqflite_example_common/main.dart'; + +Future main() async { + supportsCompatMode = true; + mainExampleApp(); +} diff --git a/sqflite_darwin/example/pubspec.yaml b/sqflite_darwin/example/pubspec.yaml new file mode 100644 index 00000000..68143159 --- /dev/null +++ b/sqflite_darwin/example/pubspec.yaml @@ -0,0 +1,48 @@ +name: sqflite_example +description: Demonstrates how to use the sqflite plugin and perform some tests. +publish_to: none +version: '0.4.0' + +environment: + sdk: ^3.5.0 + +dependencies: + path: any + collection: any + flutter: + sdk: flutter + sqflite_darwin: + sqflite_common: + synchronized: + matcher: + meta: + sqflite_example_common: + git: + url: https://github.com/tekartik/sqflite + ref: dart3a + path: packages_flutter/sqflite_example_common +dev_dependencies: + flutter_lints: '>=5.0.0' + flutter_test: + sdk: flutter + integration_test: + sdk: flutter + test: + process_run: '>=1.2.0' + pub_semver: + +dependency_overrides: + sqflite_darwin: + path: ../ +# For information on the generic Dart part of this file, see the +# following page: https://www.dartlang.org/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the Icons class. + uses-material-design: true + + diff --git a/sqflite_darwin/example/test/widget_test.dart b/sqflite_darwin/example/test/widget_test.dart new file mode 100644 index 00000000..3fdb98e9 --- /dev/null +++ b/sqflite_darwin/example/test/widget_test.dart @@ -0,0 +1,6 @@ +import 'package:flutter_test/flutter_test.dart'; + +// Keep a dummy file to avoid it be created again each time +void main() { + testWidgets('dummy', (WidgetTester tester) async {}); +} diff --git a/sqflite_darwin/example/tool/create_ios_macos_project.dart b/sqflite_darwin/example/tool/create_ios_macos_project.dart new file mode 100644 index 00000000..9ec70eef --- /dev/null +++ b/sqflite_darwin/example/tool/create_ios_macos_project.dart @@ -0,0 +1,5 @@ +import 'package:process_run/shell.dart'; + +Future main() async { + await run('flutter create --platforms ios,macos .'); +} diff --git a/sqflite_darwin/pubspec.yaml b/sqflite_darwin/pubspec.yaml index 40dd6e4c..68968d11 100644 --- a/sqflite_darwin/pubspec.yaml +++ b/sqflite_darwin/pubspec.yaml @@ -38,15 +38,15 @@ flutter: dependencies: flutter: sdk: flutter - sqflite_platform_interface: '>=2.0.0 <4.0.0' + sqflite_platform_interface: '>=2.4.0-0 <4.0.0' meta: '>=1.7.0 <3.0.0' - sqflite_common: '>=2.5.0-1 <4.0.0' + sqflite_common: '>=2.5.4+5 <4.0.0' path: '>=1.8.0 <3.0.0' dev_dependencies: - flutter_lints: '>=1.0.0' - process_run: '>=0.12.0' - http: '>=0.13.0' + flutter_lints: '>=5.0.0' + process_run: '>=1.2.0' + http: '>=1.0.0' flutter_test: sdk: flutter test_api: '>=0.2.19'