Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
fix dart analyze
Browse files Browse the repository at this point in the history
  • Loading branch information
djeddi-yacine committed Jul 15, 2023
1 parent 9d1f80a commit 4a8647d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ fix the new URL

## 0.1.0

recreate all the functions and add new enum for resolution
recreate all the functions and add new enum for resolution

## 0.1.1

fix the dart analyze
8 changes: 4 additions & 4 deletions lib/src/api/run.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ class Run {
/// Decode the body.
final jsonResponse = json.decode(response.body);

/// This [UUID] string is used to store the ID of the generated image.
final String? UUID = jsonResponse['uuid'] as String;
/// This [uuid] string is used to store the ID of the generated image.
final String? uuid = jsonResponse['uuid'] as String;

///return [UUID]
return UUID ?? '';
///return [uuid]
return uuid ?? '';
} else if (response.statusCode != 201 || response.statusCode != 200) {
/// Throw an exception if the response status code is not 200 or 201
throw Exception('run code : ${response.statusCode}');
Expand Down
6 changes: 3 additions & 3 deletions lib/src/data/ai.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ class AI {
);

/// Run first Endpoint
final String UUID = await _run.run(query, style, resolution);
if (UUID.isEmpty) {
final String uuid = await _run.run(query, style, resolution);
if (uuid.isEmpty) {
/// If the [UUID] is empty, an exception is thrown.
throw Exception('Failed To Get The UUID');
}
Expand All @@ -70,7 +70,7 @@ class AI {
Map<String, dynamic> data;

do {
data = await _status.getStatus(UUID);
data = await _status.getStatus(uuid);
status = data['status'];
error = data['error'];
image = data['image'];
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Fusion Brain AI is a new AI art generation tool that can create ama
homepage: https://github.com/dj-yacine-flutter/brain_fusion
repository: https://github.com/dj-yacine-flutter/brain_fusion
issue_tracker: https://github.com/dj-yacine-flutter/brain_fusion/issues
version: 0.1.0
version: 0.1.1

topics:
- ai
Expand Down

0 comments on commit 4a8647d

Please sign in to comment.