mirror of
https://github.com/foss42/apidash.git
synced 2025-12-11 07:41:14 +08:00
Merge branch 'foss42:main' into add-feature-mobile-layout
This commit is contained in:
1
.github/pull_request_template.md
vendored
1
.github/pull_request_template.md
vendored
@@ -16,4 +16,3 @@ _We encourage you to add relevant test cases._
|
|||||||
|
|
||||||
- [ ] Yes
|
- [ ] Yes
|
||||||
- [ ] No, and this is why: _please replace this line with details on why tests have not been included_
|
- [ ] No, and this is why: _please replace this line with details on why tests have not been included_
|
||||||
- [ ] I need help with writing tests
|
|
||||||
|
|||||||
@@ -128,3 +128,23 @@ flutter test test/widgets/codegen_previewer_test.dart
|
|||||||
### How to add a new package to pubspec.yaml?
|
### How to add a new package to pubspec.yaml?
|
||||||
|
|
||||||
Instead of copy pasting from pub.dev, it is recommended that you use `flutter pub add package_name` to add a new package to `pubspec.yaml`. You can read more [here](https://docs.flutter.dev/packages-and-plugins/using-packages#adding-a-package-dependency-to-an-app-using-flutter-pub-add).
|
Instead of copy pasting from pub.dev, it is recommended that you use `flutter pub add package_name` to add a new package to `pubspec.yaml`. You can read more [here](https://docs.flutter.dev/packages-and-plugins/using-packages#adding-a-package-dependency-to-an-app-using-flutter-pub-add).
|
||||||
|
|
||||||
|
## Troubleshooting Common Issues
|
||||||
|
|
||||||
|
### Network Connection Issues on macOS
|
||||||
|
|
||||||
|
If you encounter a network connection error similar to the following while running your Flutter app on macOS:
|
||||||
|
|
||||||
|
```
|
||||||
|
ClientException with SocketException: Connection failed (OS Error: Operation not permitted, errno = 1)
|
||||||
|
```
|
||||||
|
Add below key to `macos/Runner/DebugProfile.entitlements` and `macos/Runner/Release.entitlements`.
|
||||||
|
|
||||||
|
```
|
||||||
|
<key>com.apple.security.network.client</key>
|
||||||
|
<true/>
|
||||||
|
```
|
||||||
|
|
||||||
|
You can read more [here](https://docs.flutter.dev/platform-integration/macos/building#setting-up-entitlements)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
17
README.md
17
README.md
@@ -137,6 +137,7 @@ Here is the complete list of mimetypes that can be directly previewed in API Das
|
|||||||
| File Type | Mimetype | Extension | Comment |
|
| File Type | Mimetype | Extension | Comment |
|
||||||
| --------- | -------------------------- | ----------------- | -------- |
|
| --------- | -------------------------- | ----------------- | -------- |
|
||||||
| PDF | `application/pdf` | `.pdf` | |
|
| PDF | `application/pdf` | `.pdf` | |
|
||||||
|
| CSV | `text/csv` | `.csv` | Can be improved |
|
||||||
| Image | `image/apng` | `.apng` | Animated |
|
| Image | `image/apng` | `.apng` | Animated |
|
||||||
| Image | `image/avif` | `.avif` | |
|
| Image | `image/avif` | `.avif` | |
|
||||||
| Image | `image/bmp` | `.bmp` | |
|
| Image | `image/bmp` | `.bmp` | |
|
||||||
@@ -177,14 +178,14 @@ Here is the complete list of mimetypes that are syntax highlighted in API Dash:
|
|||||||
| ------------------ | --------- | ------------------------------------------------------------------------------------------------------------------ |
|
| ------------------ | --------- | ------------------------------------------------------------------------------------------------------------------ |
|
||||||
| `application/json` | `.json` | Other mimetypes like `application/geo+json`, `application/vcard+json` that are based on `json` are also supported. |
|
| `application/json` | `.json` | Other mimetypes like `application/geo+json`, `application/vcard+json` that are based on `json` are also supported. |
|
||||||
| `application/xml` | `.xml` | Other mimetypes like `application/xhtml+xml`, `application/vcard+xml` that are based on `xml` are also supported. |
|
| `application/xml` | `.xml` | Other mimetypes like `application/xhtml+xml`, `application/vcard+xml` that are based on `xml` are also supported. |
|
||||||
| `text/xml` | `.xml` | |
|
| `text/xml` | `.xml` | |
|
||||||
| `application/yaml` | `.yaml` | Others - `application/x-yaml` or `application/x-yml` |
|
| `application/yaml` | `.yaml` | Others - `application/x-yaml` or `application/x-yml` |
|
||||||
| `text/yaml` | `.yaml` | Others - `text/yml` |
|
| `text/yaml` | `.yaml` | Others - `text/yml` |
|
||||||
| `application/sql` | `.sql` | |
|
| `application/sql` | `.sql` | |
|
||||||
| `text/css` | `.css` | |
|
| `text/css` | `.css` | |
|
||||||
| `text/html` | `.html` | Only syntax highlighting, no web preview. |
|
| `text/html` | `.html` | Only syntax highlighting, no web preview. |
|
||||||
| `text/javascript` | `.js` | |
|
| `text/javascript` | `.js` | |
|
||||||
| `text/markdown` | `.md` | |
|
| `text/markdown` | `.md` | |
|
||||||
|
|
||||||
## What's new in v0.3.0?
|
## What's new in v0.3.0?
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:apidash/widgets/intro_message.dart';
|
import 'package:apidash/widgets/intro_message.dart';
|
||||||
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('Testing Intro Message', (tester) async {
|
testWidgets('Testing Intro Message', (tester) async {
|
||||||
|
PackageInfo.setMockInitialValues(
|
||||||
|
appName: 'API Dash',
|
||||||
|
packageName: 'dev.apidash.apidash',
|
||||||
|
version: '1.0.0',
|
||||||
|
buildNumber: '1',
|
||||||
|
buildSignature: 'buildSignature');
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
const MaterialApp(
|
const MaterialApp(
|
||||||
title: 'Intro Message',
|
title: 'Intro Message',
|
||||||
@@ -13,7 +20,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pumpAndSettle();
|
await tester.pump();
|
||||||
expect(find.text('Welcome to API Dash ⚡️'), findsOneWidget);
|
expect(find.text('Welcome to API Dash ⚡️'), findsOneWidget);
|
||||||
|
|
||||||
expect(find.byType(RichText), findsAtLeastNWidgets(1));
|
expect(find.byType(RichText), findsAtLeastNWidgets(1));
|
||||||
@@ -25,5 +32,5 @@ void main() {
|
|||||||
expect(find.byIcon(Icons.star), findsOneWidget);
|
expect(find.byIcon(Icons.star), findsOneWidget);
|
||||||
expect(find.text('Star on GitHub'), findsOneWidget);
|
expect(find.text('Star on GitHub'), findsOneWidget);
|
||||||
await tester.tap(find.byIcon(Icons.star));
|
await tester.tap(find.byIcon(Icons.star));
|
||||||
}, skip: true);
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user