Skip to content

Commit d0ad1c6

Browse files
committed
flutter analyze, contributing & update of metadata
1 parent 4accbd5 commit d0ad1c6

39 files changed

+200
-179
lines changed

.githooks/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exec flutter analyze

CONTRIBUTING.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Contributing to Splitr
2+
3+
Thank you for considering contributing to Splitr! :heart: We welcome contributions from the community to help improve and enhance the app. To ensure a smooth and consistent contribution process, please follow the guidelines outlined below.
4+
5+
If you like the project, but just don't have time to contribute, there are other easy ways to support the project and show your appreciation, which we would also be very happy about:
6+
- Use the application
7+
- Star the project
8+
- Mention the project to your surroundings
9+
10+
## I have an issue
11+
12+
Before asking a question or submitting a new bug report, it is best to search for existing [Issues](https://github.com/BhasherBEL/Splitr/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write in this issue.
13+
14+
If you then still feel the need to ask a question and need clarification, we recommend the following:
15+
16+
- Make sure that you use the latest version of the application.
17+
- Open an [Issue](https://github.com/BhasherBEL/Splitr/issues/new).
18+
- Provide as much context as you can about what you're running into.
19+
- Provide project and platform versions, depending on what seems relevant.
20+
21+
## I want to contribute
22+
23+
### Legal notice
24+
25+
When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
26+
27+
### Code Style
28+
29+
Please ensure that your code follows the existing code style conventions. We use the Dart language and follow the effective Dart guidelines. To maintain code consistency, consider using the Dart formatter to format your code automatically.
30+
31+
Some hooks are also provided. To use them automatically, run
32+
```sh
33+
chmod +x .githooks/*
34+
git config core.hooksPath .githooks
35+
```
36+
37+
### Submitting changes
38+
39+
Here are the recommands steps to follow to submit your changes.
40+
41+
1. Fork the splitr repository on GitHub.
42+
2. Create a new branch from the `master` branch with a descriptive name for your changes.
43+
3. Ensure to follow the current guidelines.
44+
4. Open a pull request (PR) against the `master` branch.
45+
5. Provide a detailed description of your changes in the PR, including any relevant information or context.
46+
47+
Thank you for your contribution! We appreciate your effort in making Splitr better.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This is currently a beta version. To get the app, you have to build it yourself
1414

1515
| | | |
1616
|:-------------------------:|:-------------------------:|:-------------------------:|
17-
![Project](https://raw.githubusercontent.com/BhasherBEL/Splitr/master/metadata/en-US/images/phoneScreenshots/1.png) | ![Refund](https://raw.githubusercontent.com/BhasherBEL/Splitr/master/metadata/en-US/images/phoneScreenshots/2.png) | ![New project](https://raw.githubusercontent.com/BhasherBEL/Splitr/master/metadata/en-US/images/phoneScreenshots/3.png) |
17+
![Project](metadata/en-US/images/phoneScreenshots/1.png) | ![Refund](metadata/en-US/images/phoneScreenshots/2.png) | ![New project](metadata/en-US/images/phoneScreenshots/3.png) |
1818

1919
## Features
2020

analysis_options.yaml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,6 @@
1-
# This file configures the analyzer, which statically analyzes Dart code to
2-
# check for errors, warnings, and lints.
3-
#
4-
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5-
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6-
# invoked from the command line by running `flutter analyze`.
7-
8-
# The following line activates a set of recommended lints for Flutter apps,
9-
# packages, and plugins designed to encourage good coding practices.
101
include: package:flutter_lints/flutter.yaml
112

123
linter:
13-
# The lint rules applied to this project can be customized in the
14-
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15-
# included above or to enable additional rules. A list of all available lints
16-
# and their documentation is published at
17-
# https://dart-lang.github.io/linter/lints/index.html.
18-
#
19-
# Instead of disabling a lint rule for the entire project in the
20-
# section below, it can also be suppressed for a single line of code
21-
# or a specific dart file by using the `// ignore: name_of_lint` and
22-
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23-
# producing the lint.
244
rules:
25-
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26-
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27-
28-
# Additional information about this file can be found at
29-
# https://dart.dev/guides/language/analysis-options
5+
prefer_single_quotes: true
6+

lib/data/local/item.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class LocalItem extends LocalGeneric {
1717
item.itemParts = (await AppData.db.query(
1818
tableItemParts,
1919
columns: ItemPartFields.values,
20-
where: "${ItemPartFields.itemId} = ?",
20+
where: '${ItemPartFields.itemId} = ?',
2121
whereArgs: [item.localId],
2222
))
2323
.map((e) => ItemPart.fromJson(e, item))

lib/data/pocketbase/item.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import '../../models/project.dart';
1010
import 'item_part.dart';
1111

1212
class PocketBaseItemsFields {
13-
static const String id = "id";
14-
static const String title = "title";
15-
static const String emitterId = "emitter_id";
16-
static const String projectId = "project_id";
17-
static const String amount = "amount";
18-
static const String date = "date";
19-
static const String deleted = "deleted";
13+
static const String id = 'id';
14+
static const String title = 'title';
15+
static const String emitterId = 'emitter_id';
16+
static const String projectId = 'project_id';
17+
static const String amount = 'amount';
18+
static const String date = 'date';
19+
static const String deleted = 'deleted';
2020
}
2121

2222
class PocketBaseItem {
@@ -70,7 +70,7 @@ class PocketBaseItem {
7070
}
7171

7272
static Future<bool> sync(PocketBase pb, Project project) async {
73-
RecordService collection = pb.collection("items");
73+
RecordService collection = pb.collection('items');
7474

7575
// Get new dist records
7676
List<RecordModel> records = await collection.getFullList(

lib/data/pocketbase/item_part.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import '../../models/item_part.dart';
99
import '../../models/participant.dart';
1010

1111
class PocketBaseItemPartsFields {
12-
static const String id = "id";
13-
static const String itemId = "item_id";
14-
static const String participantId = "participant_id";
15-
static const String rate = "rate";
16-
static const String amount = "amount";
17-
static const String deleted = "deleted";
12+
static const String id = 'id';
13+
static const String itemId = 'item_id';
14+
static const String participantId = 'participant_id';
15+
static const String rate = 'rate';
16+
static const String amount = 'amount';
17+
static const String deleted = 'deleted';
1818
}
1919

2020
class PocketBaseItemPart {
@@ -62,7 +62,7 @@ class PocketBaseItemPart {
6262
}
6363

6464
static Future<bool> sync(PocketBase pb, Item item) async {
65-
RecordService collection = pb.collection("itemParts");
65+
RecordService collection = pb.collection('itemParts');
6666

6767
// Get new dist records
6868
List<RecordModel> records = await collection.getFullList(

lib/data/pocketbase/participant.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import '../../models/participant.dart';
88
import '../../models/project.dart';
99

1010
class PocketBaseParticipantFields {
11-
static const String id = "id";
12-
static const String pseudo = "pseudo";
13-
static const String projectId = "project_id";
14-
static const String deleted = "deleted";
11+
static const String id = 'id';
12+
static const String pseudo = 'pseudo';
13+
static const String projectId = 'project_id';
14+
static const String deleted = 'deleted';
1515
}
1616

1717
class PocketBaseParticipant {
@@ -51,7 +51,7 @@ class PocketBaseParticipant {
5151
}
5252

5353
static Future<bool> sync(PocketBase pb, Project project) async {
54-
RecordService collection = pb.collection("participants");
54+
RecordService collection = pb.collection('participants');
5555

5656
// Get new dist records
5757
List<RecordModel> records = await collection.getFullList(

lib/data/pocketbase/project.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import 'package:splitr/utils/ext/record_service.dart';
55
import '../../models/project.dart';
66

77
class PocketBaseProjectFields {
8-
static const String name = "name";
9-
static const String code = "code";
10-
static const String deleted = "deleted";
8+
static const String name = 'name';
9+
static const String code = 'code';
10+
static const String deleted = 'deleted';
1111
}
1212

1313
class PocketBaseProject {
1414
static Future<bool> sync(PocketBase pb, Project project) async {
15-
RecordService collection = pb.collection("projects");
15+
RecordService collection = pb.collection('projects');
1616

1717
if (project.remoteId != null) {
1818
RecordModel record = await collection.getOne(project.remoteId!);
@@ -49,9 +49,9 @@ class PocketBaseProject {
4949
}
5050

5151
static Future<bool> join(PocketBase pb, Project project) async {
52-
RecordService collection = pb.collection("projects");
52+
RecordService collection = pb.collection('projects');
5353
RecordModel record =
54-
await collection.getFirstListItem("code = \"${project.name}\"");
54+
await collection.getFirstListItem('code = "${project.name}"');
5555
project.code = project.name;
5656
project.name = record.getStringValue(PocketBaseProjectFields.name);
5757
project.remoteId = record.id;

lib/data/pocketbase/provider.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import 'package:pocketbase/pocketbase.dart';
33

44
import '../../models/instance.dart';
55
import '../../models/item.dart';
6-
import '../../models/item_part.dart';
76
import '../../models/project.dart';
87
import '../provider.dart';
98
import 'item.dart';

0 commit comments

Comments
 (0)