From 7f66476ecaf41f672bca2ab0bd628aeb60c09a7f Mon Sep 17 00:00:00 2001 From: "mr.mojtaba" Date: Sun, 18 May 2025 11:15:28 +0330 Subject: [PATCH] feat : add liveStock package --- packages/livestock/.gitignore | 7 ++++ packages/livestock/CHANGELOG.md | 3 ++ packages/livestock/README.md | 39 +++++++++++++++++++ packages/livestock/analysis_options.yaml | 30 ++++++++++++++ .../livestock/example/livestock_example.dart | 6 +++ packages/livestock/lib/livestock.dart | 8 ++++ .../livestock/lib/src/livestock_base.dart | 6 +++ packages/livestock/pubspec.yaml | 35 +++++++++++++++++ packages/livestock/test/livestock_test.dart | 16 ++++++++ tools/package_builder.sh | 2 +- 10 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 packages/livestock/.gitignore create mode 100644 packages/livestock/CHANGELOG.md create mode 100644 packages/livestock/README.md create mode 100644 packages/livestock/analysis_options.yaml create mode 100644 packages/livestock/example/livestock_example.dart create mode 100644 packages/livestock/lib/livestock.dart create mode 100644 packages/livestock/lib/src/livestock_base.dart create mode 100644 packages/livestock/pubspec.yaml create mode 100644 packages/livestock/test/livestock_test.dart diff --git a/packages/livestock/.gitignore b/packages/livestock/.gitignore new file mode 100644 index 0000000..3cceda5 --- /dev/null +++ b/packages/livestock/.gitignore @@ -0,0 +1,7 @@ +# https://dart.dev/guides/libraries/private-files +# Created by `dart pub` +.dart_tool/ + +# Avoid committing pubspec.lock for library packages; see +# https://dart.dev/guides/libraries/private-files#pubspeclock. +pubspec.lock diff --git a/packages/livestock/CHANGELOG.md b/packages/livestock/CHANGELOG.md new file mode 100644 index 0000000..effe43c --- /dev/null +++ b/packages/livestock/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +- Initial version. diff --git a/packages/livestock/README.md b/packages/livestock/README.md new file mode 100644 index 0000000..8831761 --- /dev/null +++ b/packages/livestock/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/packages/livestock/analysis_options.yaml b/packages/livestock/analysis_options.yaml new file mode 100644 index 0000000..dee8927 --- /dev/null +++ b/packages/livestock/analysis_options.yaml @@ -0,0 +1,30 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/packages/livestock/example/livestock_example.dart b/packages/livestock/example/livestock_example.dart new file mode 100644 index 0000000..45f8441 --- /dev/null +++ b/packages/livestock/example/livestock_example.dart @@ -0,0 +1,6 @@ +import 'package:livestock/livestock.dart'; + +void main() { + var awesome = Awesome(); + print('awesome: ${awesome.isAwesome}'); +} diff --git a/packages/livestock/lib/livestock.dart b/packages/livestock/lib/livestock.dart new file mode 100644 index 0000000..850bfa8 --- /dev/null +++ b/packages/livestock/lib/livestock.dart @@ -0,0 +1,8 @@ +/// Support for doing something awesome. +/// +/// More dartdocs go here. +library; + +export 'src/livestock_base.dart'; + +// TODO: Export any libraries intended for clients of this package. diff --git a/packages/livestock/lib/src/livestock_base.dart b/packages/livestock/lib/src/livestock_base.dart new file mode 100644 index 0000000..e8a6f15 --- /dev/null +++ b/packages/livestock/lib/src/livestock_base.dart @@ -0,0 +1,6 @@ +// TODO: Put public facing types in this file. + +/// Checks if you are awesome. Spoiler: you are. +class Awesome { + bool get isAwesome => true; +} diff --git a/packages/livestock/pubspec.yaml b/packages/livestock/pubspec.yaml new file mode 100644 index 0000000..f591e97 --- /dev/null +++ b/packages/livestock/pubspec.yaml @@ -0,0 +1,35 @@ +name: livestock +description: A starting point for Dart libraries or applications. +version: 1.0.0 +# repository: https://github.com/my_org/my_repo + +environment: + sdk: ^3.7.2 + + +dependencies: +rasadyar_core: + path: ../core + ##code generation + freezed_annotation: ^3.0.0 + json_annotation: ^4.9.0 +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 + lints: ^5.0.0 + test: ^1.24.0 + ##code generation + build_runner: ^2.4.15 + hive_ce_generator: ^1.9.1 + freezed: ^3.0.6 + json_serializable: ^6.9.4 + + ##test + mocktail: ^1.0.4 + get_test: ^4.0.1 + +flutter: + uses-material-design: true + + diff --git a/packages/livestock/test/livestock_test.dart b/packages/livestock/test/livestock_test.dart new file mode 100644 index 0000000..3104e61 --- /dev/null +++ b/packages/livestock/test/livestock_test.dart @@ -0,0 +1,16 @@ +import 'package:livestock/livestock.dart'; +import 'package:test/test.dart'; + +void main() { + group('A group of tests', () { + final awesome = Awesome(); + + setUp(() { + // Additional setup goes here. + }); + + test('First Test', () { + expect(awesome.isAwesome, isTrue); + }); + }); +} diff --git a/tools/package_builder.sh b/tools/package_builder.sh index c1a8bb6..c14cc59 100644 --- a/tools/package_builder.sh +++ b/tools/package_builder.sh @@ -1,2 +1,2 @@ #!/bin/bash -dart create --template=package ../packages/auth \ No newline at end of file +dart create --template=package ../packages/livestock \ No newline at end of file