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

Commit

Permalink
make it for both flutter and dart
Browse files Browse the repository at this point in the history
  • Loading branch information
Yacine committed Apr 24, 2023
1 parent c658779 commit e8c0d67
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 56 deletions.
4 changes: 0 additions & 4 deletions analysis_options.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.5"
version: "0.0.6"
characters:
dependency: transitive
description:
Expand Down Expand Up @@ -209,4 +209,3 @@ packages:
version: "2.1.4"
sdks:
dart: ">=2.19.5 <3.0.0"
flutter: ">=1.17.0"
43 changes: 1 addition & 42 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,10 @@ homepage: https://github.com/dj-yacine-flutter/brain_fusion

environment:
sdk: '>=2.19.5 <3.0.0'
flutter: ">=1.17.0"

dependencies:
flutter:
sdk: flutter
http: ^0.13.5

dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.1
test: ^1.24.2

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
flutter:

# To add assets to your package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
#
# For details regarding assets in packages, see
# https://flutter.dev/assets-and-images/#from-packages
#
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware

# To add custom fonts to your package, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts in packages, see
# https://flutter.dev/custom-fonts/#from-packages
13 changes: 5 additions & 8 deletions test/brain_fusion_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/// Import the necessary packages for the test
import 'dart:typed_data';

import 'package:brain_fusion/brain_fusion.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:test/scaffolding.dart';

/// The main function that runs the test
void main() {
Expand All @@ -19,14 +20,10 @@ void main() {
Uint8List image = await ai.runAI(query, style);

/// Use the returned image data as needed
if (kDebugMode) {
print(image);
}
print(image);
} catch (e) {
/// Handle any exceptions that may occur during AI processing
if (kDebugMode) {
print('Error from AI package: $e');
}
print('Error from AI package: $e');
}
});
}
Expand Down

0 comments on commit e8c0d67

Please sign in to comment.