Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/landamessenger/credits-builder

A simple package to generate a credit page of your dependencies. The best way to thank and appreciate the work of third party libraries.
https://github.com/landamessenger/credits-builder

builder credits dependencies flutter yml

Last synced: 25 days ago
JSON representation

A simple package to generate a credit page of your dependencies. The best way to thank and appreciate the work of third party libraries.

Awesome Lists containing this project

README

        

# Credits builder

A simple package to generate a credit page of your dependencies. The best way to thank and appreciate the work of third party libraries.

## Configuration

Setup the dependency:

```yaml
dependencies:
credits_builder: ^0.0.3 # android ios linux macos web windows

credits_builder:
outputFile: "assets/dependencies.json" # default value
```

## Usage

### Generate the dependencies file

By running this command you will create/update your dependencies file in the assets folder (`assets/dependencies.json`):

```bash
dart run credits_builder:start
```

### Runtime side

Basic way to retrieve dependencies at runtime:

```dart
Future> getDependencies(BuildContext context) =>
CreditsBuilder().config().get(context);
```

If you defined a dependency file name different from the default you can retrieve the information like this:

```dart
Future> getDependencies(BuildContext context) =>
CreditsBuilder()
.config(
path: 'assets/other_file_name.json',
)
.get(context);
```

If you want to preprocess the file information before using it (for example to deobfuscate the file with [Stringcare](https://github.com/StringCare/stringcare)) you can do it like this:

```dart
Future> getDependencies(BuildContext context) =>
CreditsBuilder()
.config(
process: (data) async => Stringcare().revealData(data) ?? data,
)
.get(context);
```

## Sample

Checkout this sample: [https://landamessenger.com/credits](https://landamessenger.com/credits)