-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update package topics * fix: pubspec description length * fix: package metadata * fix: docs * feat: proper web support * chore: disable publish workflow
- Loading branch information
Showing
12 changed files
with
90 additions
and
66 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export 'platform/interface.dart' | ||
if (dart.library.html) 'platform/html.dart' | ||
if (dart.library.io) 'platform/io.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import '../version.dart'; | ||
|
||
abstract class BasePlatformInfo { | ||
String get userAgent; | ||
|
||
String get userAgentHeader; | ||
} | ||
|
||
const userAgentPrefix = 'fal.ai/dart-client@${packageVersion}'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import 'dart:html'; | ||
|
||
import './base.dart'; | ||
|
||
class PlatformInfo extends BasePlatformInfo { | ||
String? _memoizedUserAgent; | ||
|
||
@override | ||
String get userAgent { | ||
if (_memoizedUserAgent == null) { | ||
_memoizedUserAgent = '$userAgentPrefix - ${window.navigator.userAgent}'; | ||
} | ||
return _memoizedUserAgent!; | ||
} | ||
|
||
@override | ||
String get userAgentHeader => "X-Fal-User-Agent"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import './base.dart'; | ||
|
||
class PlatformInfo extends BasePlatformInfo { | ||
@override | ||
String get userAgent => throw UnimplementedError(); | ||
|
||
@override | ||
String get userAgentHeader => throw UnimplementedError(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import 'dart:io'; | ||
|
||
import './base.dart'; | ||
|
||
class PlatformInfo extends BasePlatformInfo { | ||
String? _memoizedUserAgent; | ||
|
||
@override | ||
String get userAgent { | ||
if (_memoizedUserAgent == null) { | ||
_memoizedUserAgent = | ||
'$userAgentPrefix - ${Platform.operatingSystem} ${Platform.operatingSystemVersion}'; | ||
} | ||
return _memoizedUserAgent!; | ||
} | ||
|
||
@override | ||
String get userAgentHeader => "User-Agent"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
const packageVersion = '0.2.0'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
name: fal_client | ||
description: A client library for fal.ai ML APIs | ||
version: 0.1.0 | ||
description: > | ||
The Dart client library for fal.ai model APIs. | ||
You can use it to call multiple AI models on your Dart and Flutter apps. | ||
version: 0.2.0 | ||
homepage: https://fal.ai | ||
repository: https://github.com/fal-ai/serverless-client-dart | ||
issue_tracker: https://github.com/fal-ai/serverless-client-dart/issues?q=is%3Aissue+is%3Aopen | ||
topics: | ||
- machine learning | ||
- artificial intelligence | ||
- ml | ||
- ai | ||
- fal | ||
- stable-diffusion | ||
- sdxl | ||
- whisper | ||
- text-to-image | ||
- image-to-text | ||
- speech-to-text | ||
|
||
environment: | ||
sdk: '>=3.1.5 <4.0.0' | ||
|
||
dependencies: | ||
cross_file: ^0.3.3+6 | ||
http: ^1.1.0 | ||
platform: ^3.1.3 | ||
|
||
dev_dependencies: |