diff --git a/contact/.gitignore b/contact/.gitignore new file mode 100644 index 000000000..186cccd7e --- /dev/null +++ b/contact/.gitignore @@ -0,0 +1,32 @@ +# 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 +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.packages +build/ + +#generated file +*.g.dart diff --git a/contact/.metadata b/contact/.metadata new file mode 100644 index 000000000..f95fcfd8d --- /dev/null +++ b/contact/.metadata @@ -0,0 +1,10 @@ +# 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: db747aa1331bd95bc9b3874c842261ca2d302cd5 + channel: stable + +project_type: package diff --git a/contact/CHANGELOG.md b/contact/CHANGELOG.md new file mode 100644 index 000000000..41cc7d819 --- /dev/null +++ b/contact/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/contact/LICENSE b/contact/LICENSE new file mode 100644 index 000000000..ba75c69f7 --- /dev/null +++ b/contact/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/contact/README.md b/contact/README.md new file mode 100644 index 000000000..8b55e735b --- /dev/null +++ b/contact/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/contact/analysis_options.yaml b/contact/analysis_options.yaml new file mode 100644 index 000000000..a5744c1cf --- /dev/null +++ b/contact/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/contact/lib/core/method/request/autocomplete_method.dart b/contact/lib/core/method/request/autocomplete_method.dart new file mode 100644 index 000000000..993802ad1 --- /dev/null +++ b/contact/lib/core/method/request/autocomplete_method.dart @@ -0,0 +1,12 @@ +import 'package:jmap_dart_client/jmap/account_id.dart'; +import 'package:jmap_dart_client/jmap/core/filter/filter.dart'; +import 'package:jmap_dart_client/jmap/core/method/method.dart'; +import 'package:jmap_dart_client/jmap/core/method/request/query_method.dart'; + +abstract class AutoCompleteMethod extends MethodRequiringAccountId + with OptionalLimit { + + final Filter filter; + + AutoCompleteMethod(AccountId accountId, this.filter) : super(accountId); +} \ No newline at end of file diff --git a/contact/lib/core/method/response/autocomplete_response.dart b/contact/lib/core/method/response/autocomplete_response.dart new file mode 100644 index 000000000..dfbd1097f --- /dev/null +++ b/contact/lib/core/method/response/autocomplete_response.dart @@ -0,0 +1,14 @@ +import 'package:jmap_dart_client/jmap/account_id.dart'; +import 'package:jmap_dart_client/jmap/core/method/method_response.dart'; +import 'package:jmap_dart_client/jmap/core/unsigned_int.dart'; + +abstract class AutoCompleteResponse extends ResponseRequiringAccountId { + final List list; + final UnsignedInt? limit; + + AutoCompleteResponse( + AccountId accountId, + this.list, + this.limit, + ) : super(accountId); +} \ No newline at end of file diff --git a/contact/pubspec.yaml b/contact/pubspec.yaml new file mode 100644 index 000000000..b4ffd42eb --- /dev/null +++ b/contact/pubspec.yaml @@ -0,0 +1,68 @@ +name: contact +description: A module implement request +publish_to: 'none' +version: 0.0.1 + +environment: + sdk: ">=2.16.1 <3.0.0" + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + + equatable: 2.0.3 + + json_annotation: 4.4.0 + + jmap_dart_client: + git: + url: https://github.com/linagora/jmap-dart-client.git + ref: master + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^1.0.0 + + build_runner: 2.1.7 + + json_serializable: 6.1.4 + + http_mock_adapter: 0.3.2 +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/assets-and-images/#from-packages + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # To add custom fonts to your package, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts in packages, see + # https://flutter.dev/custom-fonts/#from-packages