Skip to content

Commit

Permalink
chore: Update dependencies, docs and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
robmllze committed Aug 15, 2024
1 parent 5301254 commit 101ac3f
Show file tree
Hide file tree
Showing 29 changed files with 118 additions and 128 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/update_changelog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//
// Dart/Flutter (DF) Packages by DevCetra.com & contributors. SSee MIT LICENSE
// file in the root directory.
// file in root directory.
//
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//.title~
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
##.title
## ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
##
## Dart/Flutter (DF) Packages by DevCetra.com & contributors. ee LICENSE file
## in root directory.
## Dart/Flutter (DF) Packages by DevCetra.com & contributors. Use of this
## source code is governed by an MIT-style license that can be found in the
## LICENSE file.
##
## For more about publishing, see: https://dart.dev/tools/pub/automated-publishing
##
Expand Down Expand Up @@ -30,9 +31,6 @@ jobs:
- name: Set up Dart
uses: dart-lang/setup-dart@v1.2

- name: Upgrade dependencies
run: dart pub upgrade --tighten

- name: Format Dart code
run: dart format .

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
##
## Dart/Flutter (DF) Packages by DevCetra.com & contributors. SSee MIT LICENSE
## file in the root directory.
## file in root directory.
##
## A workflow that publishes a Dart package to pub.dev. For more about
## publishing, see: https://dart.dev/tools/pub/automated-publishing
Expand Down
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
##.title
## ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
##
## Dart/Flutter (DF) Packages by DevCetra.com & contributors. See LICENSE file
## in root directory.
## Dart/Flutter (DF) Packages by DevCetra.com & contributors. Use of this
## source code is governed by an MIT-style license that can be found in the
## LICENSE file.
##
## ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
##.title~

**/___generators/
**/.dart_tool/
**/.DS_Store
**/build/
**/pubspec.lock
**/.github/.git
**/.github/.git
**/.metadata
**/.flutter-plugins
**/.flutter-plugins-dependencies
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## [0.1.1]

- Released @ 8/2024 (UTC)
- chore: Update imports in \_index.g.dart
- chore: Update imports in _index.g.dart

## [0.1.0]

Expand Down
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# DF Config

<a href="https://www.buymeacoffee.com/robmllze" target="_blank"><img align="right" src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>

Dart & Flutter Packages by DevCetra.com & contributors.

[![Pub Package](https://img.shields.io/pub/v/df_config.svg)](https://pub.dev/packages/df_config)
Expand All @@ -23,20 +25,40 @@ Use this package as a dependency by adding it to your `pubspec.yaml` file (see [

## Contributing and Discussions

This is an open-source project, and contributions are welcome from everyone, regardless of experience level. Contributing to projects is a great way to learn, share knowledge, and showcase your skills to the community. Join the discussions to ask questions, report bugs, suggest features, share ideas, or find out how you can contribute.
This is an open-source project, and we warmly welcome contributions from everyone, regardless of experience level. Whether you're a seasoned developer or just starting out, contributing to this project is a fantastic way to learn, share your knowledge, and make a meaningful impact on the community.

### Join GitHub Discussions:
### Ways you can contribute:

💬 https://github.com/robmllze/df_config/discussions/
- **Join the discussions and ask questions:** Your curiosity can lead to valuable insights and improvements.
- **Buy me a coffee:** If you'd like to support the project financially, consider [buying me a coffee](https://www.buymeacoffee.com/robmllze). Your support helps cover the costs of development and keeps the project growing.
- **Share your ideas:** Every perspective matters, and your ideas can spark innovation.
- **Report bugs:** Help us identify and fix issues to make the project more robust.
- **Suggest improvements or new features:** Your ideas can help shape the future of the project.
- **Help clarify documentation:** Good documentation is key to accessibility. You can make it easier for others to get started by improving or expanding our documentation.
- **Write articles:** Share your knowledge by writing tutorials, guides, or blog posts about your experiences with the project. It's a great way to contribute and help others learn.

No matter how you choose to contribute, your involvement is greatly appreciated and valued!

---

### Join Reddit Discussions:

💬 https://www.reddit.com/r/df_config/

### Join GitHub Discussions:

💬 https://github.com/robmllze/df_config/discussions/

### Chief Maintainer:

📧 Email _Robert Mollentze_ at robmllze@gmail.com

### Dontations:

If you're enjoying this package and find it valuable, consider showing your appreciation with a small donation. Every bit helps in supporting future development. You can donate here:

https://www.buymeacoffee.com/robmllze

---

## License
Expand Down
25 changes: 18 additions & 7 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
##.title
## ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
##
## Dart/Flutter (DF) Packages by DevCetra.com & contributors. See LICENSE file
## in root directory.
## Dart/Flutter (DF) Packages by DevCetra.com & contributors. Use of this
## source code is governed by an MIT-style license that can be found in the
## LICENSE file.
##
## ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
##.title~
Expand All @@ -13,9 +14,11 @@ include: package:lints/recommended.yaml

linter:
rules:
always_declare_return_types: true
avoid_renaming_method_parameters: false
avoid_web_libraries_in_flutter: true
camel_case_types: false
constant_identifier_names: false
file_names: false
library_private_types_in_public_api: false
non_constant_identifier_names: false
omit_local_variable_types: true
prefer_const_constructors_in_immutables: true
Expand All @@ -24,14 +27,22 @@ linter:
prefer_relative_imports: true
prefer_single_quotes: true
require_trailing_commas: true
unnecessary_this: false
camel_case_types: false
unnecessary_this: true

analyzer:
exclude:
- build/**
#- '**/*.g.dart'

errors:
always_declare_return_types: error
avoid_renaming_method_parameters: error
avoid_type_to_string: error
depend_on_referenced_packages: error
flutter_style_todos: error
invalid_use_of_protected_member: error
no_leading_underscores_for_local_identifiers: error
prefer_final_in_for_each: error
prefer_relative_imports: error
unnecessary_new: error
unrelated_type_equality_checks: error
use_key_in_widget_constructors: error
46 changes: 0 additions & 46 deletions flutter_analysis_options.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion lib/df_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//
// Dart/Flutter (DF) Packages by DevCetra.com & contributors. SSee MIT LICENSE
// file in the root directory.
// file in root directory.
//
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//.title~
Expand Down
2 changes: 1 addition & 1 deletion lib/src/configs/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//
// Dart/Flutter (DF) Packages by DevCetra.com & contributors. SSee MIT LICENSE
// file in the root directory.
// file in root directory.
//
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//.title~
Expand Down
30 changes: 15 additions & 15 deletions lib/src/configs/file_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//
// Dart/Flutter (DF) Packages by DevCetra.com & contributors. SSee MIT LICENSE
// file in the root directory.
// file in root directory.
//
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//.title~
Expand Down Expand Up @@ -45,18 +45,18 @@ class FileConfig extends Config<ConfigFileRef> {

/// Reads and processes the associated file.
Future<bool> readAssociatedFile() async {
switch (this.ref?.type) {
switch (ref?.type) {
case ConfigFileType.JSON:
await this._readJsonFile();
await _readJsonFile();
break;
case ConfigFileType.JSONC:
await this._readJsoncFile();
await _readJsoncFile();
break;
case ConfigFileType.YAML:
await this._readYamlFile();
await _readYamlFile();
break;
case ConfigFileType.CSV:
await this._readCsvFile();
await _readCsvFile();
break;
default:
return false;
Expand All @@ -66,37 +66,37 @@ class FileConfig extends Config<ConfigFileRef> {

/// Processes a JSON file.
Future<void> _readJsonFile() async {
final src = await this.ref?.read?.call();
final src = await ref?.read?.call();
if (src != null) {
final data = jsonToData(src);
this.setFields(data);
setFields(data);
}
}

/// Processes a JSONC file.
Future<void> _readJsoncFile() async {
var src = await this.ref?.read?.call();
var src = await ref?.read?.call();
if (src != null) {
final data = jsoncToData(src);
this.setFields(data);
setFields(data);
}
}

/// Processes a YAML file.
Future<void> _readYamlFile() async {
final src = await this.ref?.read?.call();
final src = await ref?.read?.call();
if (src != null) {
final data = yamlToData(src);
this.setFields(data);
setFields(data);
}
}

/// Processes a CSV file.
Future<void> _readCsvFile() async {
final src = await this.ref?.read?.call();
final src = await ref?.read?.call();
if (src != null) {
final data = csvToData(src, this.settings);
this.setFields(data);
final data = csvToData(src, settings);
setFields(data);
}
}
}
2 changes: 1 addition & 1 deletion lib/src/extensions/cf_on_string_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//
// Dart/Flutter (DF) Packages by DevCetra.com & contributors. SSee MIT LICENSE
// file in the root directory.
// file in root directory.
//
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//.title~
Expand Down
2 changes: 1 addition & 1 deletion lib/src/extensions/tr_on_string_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//
// Dart/Flutter (DF) Packages by DevCetra.com & contributors. SSee MIT LICENSE
// file in the root directory.
// file in root directory.
//
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//.title~
Expand Down
5 changes: 2 additions & 3 deletions lib/src/managers/config_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//
// Dart/Flutter (DF) Packages by DevCetra.com & contributors. SSee MIT LICENSE
// file in the root directory.
// file in root directory.
//
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//.title~
Expand Down Expand Up @@ -34,8 +34,7 @@ class ConfigManager<TConfig extends Config> {
//

void setConfig(TConfig config) async {
final added =
this.configs.firstWhereOrNull((e) => e.ref == config.ref) != null;
final added = this.configs.firstWhereOrNull((e) => e.ref == config.ref) != null;
if (!added) {
this.configs.add(config);
}
Expand Down
7 changes: 3 additions & 4 deletions lib/src/managers/file_config_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//
// Dart/Flutter (DF) Packages by DevCetra.com & contributors. SSee MIT LICENSE
// file in the root directory.
// file in root directory.
//
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//.title~
Expand All @@ -26,10 +26,9 @@ class FileConfigManager extends ConfigManager {
//

Future<void> setFileConfig(FileConfig fileConfig) async {
final added =
this.configs.firstWhereOrNull((e) => e.ref == fileConfig.ref) != null;
final added = configs.firstWhereOrNull((e) => e.ref == fileConfig.ref) != null;
if (!added) {
this.configs.add(fileConfig);
configs.add(fileConfig);
await fileConfig.readAssociatedFile();
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/managers/translation_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//
// Dart/Flutter (DF) Packages by DevCetra.com & contributors. SSee MIT LICENSE
// file in the root directory.
// file in root directory.
//
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//.title~
Expand Down
2 changes: 1 addition & 1 deletion lib/src/refs/config_file_ref.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//
// Dart/Flutter (DF) Packages by DevCetra.com & contributors. SSee MIT LICENSE
// file in the root directory.
// file in root directory.
//
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//.title~
Expand Down
Loading

0 comments on commit 101ac3f

Please sign in to comment.