Merge branch 'foss42:main' into resolve-issue-remove-add-buttons

This commit is contained in:
Ragul Raj
2024-03-18 01:18:09 +05:30
committed by GitHub
14 changed files with 270 additions and 149 deletions

View File

@ -9,6 +9,7 @@ _Add your description_
### Checklist
- [ ] I have gone through the [contributing guide](https://github.com/foss42/apidash/blob/main/CONTRIBUTING.md)
- [ ] I have updated my branch and synced it with project `main` branch before making this PR
- [ ] I have run the tests (`flutter test`) and all tests are passing
## Added/updated tests?

View File

@ -129,21 +129,28 @@ flutter test test/widgets/codegen_previewer_test.dart
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
## Platform-specific Additional Instructions
### Network Connection Issues on macOS
### macOS
If you encounter a network connection error similar to the following while running your Flutter app on macOS:
Add below keys to `macos/Runner/DebugProfile.entitlements` and `macos/Runner/Release.entitlements`.
```
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
```
If not added, you can 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)

View File

@ -58,7 +58,7 @@ class cURLCodeGen {
} else if (requestModel.hasFormData) {
for (var formData in requestModel.formDataList) {
var templateFormData = jj.Template(kTemplateFormData);
if (formData.name.isNotEmpty && formData.value.isNotEmpty) {
if (formData.name.isNotEmpty) {
result += templateFormData.render({
"name": formData.name,
"value":

View File

@ -80,10 +80,10 @@ class RequestModel {
bool get hasFormData =>
kMethodsWithBody.contains(method) &&
hasFormDataContentType &&
(requestFormDataList ?? <FormDataModel>[]).isNotEmpty;
formDataMapList.isNotEmpty;
List<FormDataModel> get formDataList =>
requestFormDataList ?? <FormDataModel>[];
List<Map<String, dynamic>> get formDataMapList =>
List<Map<String, String>> get formDataMapList =>
rowsToFormDataMapList(requestFormDataList) ?? [];
bool get hasFileInFormData => formDataList
.map((e) => e.type == FormDataType.file)
@ -94,12 +94,13 @@ class RequestModel {
RequestModel duplicate({
required String id,
String? name,
}) {
return RequestModel(
id: id,
method: method,
url: url,
name: "$name (copy)",
name: name ?? "${this.name} (copy)",
description: description,
requestHeaders: requestHeaders != null ? [...requestHeaders!] : null,
requestParams: requestParams != null ? [...requestParams!] : null,
@ -137,6 +138,7 @@ class RequestModel {
var params = requestParams ?? this.requestParams;
var enabledHeaders = isHeaderEnabledList ?? this.isHeaderEnabledList;
var enabledParams = isParamEnabledList ?? this.isParamEnabledList;
var formDataList = requestFormDataList ?? this.requestFormDataList;
return RequestModel(
id: id ?? this.id,
method: method ?? this.method,
@ -151,7 +153,7 @@ class RequestModel {
requestBodyContentType:
requestBodyContentType ?? this.requestBodyContentType,
requestBody: requestBody ?? this.requestBody,
requestFormDataList: requestFormDataList ?? this.requestFormDataList,
requestFormDataList: formDataList != null ? [...formDataList] : null,
responseStatus: responseStatus ?? this.responseStatus,
message: message ?? this.message,
responseModel: responseModel ?? this.responseModel,

View File

@ -96,6 +96,18 @@ class CollectionStateNotifier
state = map;
}
void clearResponse(String? id) {
if (id == null || state?[id] == null) return;
var currentModel = state![id]!;
final newModel = currentModel.duplicate(
id: id,
name: currentModel.name,
);
var map = {...state!};
map[id] = newModel;
state = map;
}
void duplicate(String id) {
final newId = getNewUuid();
@ -134,21 +146,22 @@ class CollectionStateNotifier
ResponseModel? responseModel,
}) {
final newModel = state![id]!.copyWith(
method: method,
url: url,
name: name,
description: description,
requestTabIndex: requestTabIndex,
requestHeaders: requestHeaders,
requestParams: requestParams,
isHeaderEnabledList: isHeaderEnabledList,
isParamEnabledList: isParamEnabledList,
requestBodyContentType: requestBodyContentType,
requestBody: requestBody,
requestFormDataList: requestFormDataList,
responseStatus: responseStatus,
message: message,
responseModel: responseModel);
method: method,
url: url,
name: name,
description: description,
requestTabIndex: requestTabIndex,
requestHeaders: requestHeaders,
requestParams: requestParams,
isHeaderEnabledList: isHeaderEnabledList,
isParamEnabledList: isParamEnabledList,
requestBodyContentType: requestBodyContentType,
requestBody: requestBody,
requestFormDataList: requestFormDataList,
responseStatus: responseStatus,
message: message,
responseModel: responseModel,
);
//print(newModel);
var map = {...state!};
map[id] = newModel;

View File

@ -34,6 +34,7 @@ class ResponseDetails extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
var sm = ScaffoldMessenger.of(context);
final responseStatus = ref.watch(
selectedRequestModelProvider.select((value) => value?.responseStatus));
final message = ref
@ -46,6 +47,14 @@ class ResponseDetails extends ConsumerWidget {
responseStatus: responseStatus,
message: message,
time: responseModel?.time,
onClearResponse: () {
final selectedRequest = ref.read(selectedRequestModelProvider);
ref
.read(collectionStateNotifierProvider.notifier)
.clearResponse(selectedRequest?.id);
sm.hideCurrentSnackBar();
sm.showSnackBar(getSnackBar('Response cleared'));
},
),
const Expanded(
child: ResponseTabs(),

View File

@ -66,39 +66,68 @@ class SettingsPage extends ConsumerWidget {
title: const Text('Default URI Scheme'),
subtitle: Text(
'$kDefaultUri${settings.defaultUriScheme}://$kDefaultUri'),
trailing: DropdownMenu(
onSelected: (value) {
ref
.read(settingsProvider.notifier)
.update(defaultUriScheme: value);
},
initialSelection: settings.defaultUriScheme,
dropdownMenuEntries: kSupportedUriSchemes
.map<DropdownMenuEntry<String>>((value) {
return DropdownMenuEntry<String>(
value: value,
label: value,
);
}).toList()),
trailing: Container(
decoration: BoxDecoration(
border: Border.all(
color: Theme.of(context).colorScheme.onSurface,
),
borderRadius: kBorderRadius8,
),
child: DropdownButtonHideUnderline(
child: DropdownButton<String>(
borderRadius: kBorderRadius8,
onChanged: (value) {
ref
.read(settingsProvider.notifier)
.update(defaultUriScheme: value);
},
value: settings.defaultUriScheme,
items: kSupportedUriSchemes
.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Padding(
padding: kP10,
child: Text(value),
),
);
}).toList(),
),
),
),
),
ListTile(
contentPadding: kPb10,
hoverColor: kColorTransparent,
title: const Text('Default Code Generator'),
trailing: DropdownMenu(
onSelected: (value) {
ref
.read(settingsProvider.notifier)
.update(defaultCodeGenLang: value);
},
initialSelection: settings.defaultCodeGenLang,
dropdownMenuEntries: CodegenLanguage.values
.map<DropdownMenuEntry<CodegenLanguage>>((value) {
return DropdownMenuEntry<CodegenLanguage>(
value: value,
label: value.label,
);
}).toList()),
trailing: Container(
decoration: BoxDecoration(
border: Border.all(
color: Theme.of(context).colorScheme.onSurface,
),
borderRadius: kBorderRadius8,
),
child: DropdownButtonHideUnderline(
child: DropdownButton<CodegenLanguage>(
borderRadius: kBorderRadius8,
value: settings.defaultCodeGenLang,
onChanged: (value) {
ref
.read(settingsProvider.notifier)
.update(defaultCodeGenLang: value);
},
items: CodegenLanguage.values.map((value) {
return DropdownMenuItem<CodegenLanguage>(
value: value,
child: Padding(
padding: kP10,
child: Text(value.label),
),
);
}).toList(),
),
),
),
),
CheckboxListTile(
contentPadding: EdgeInsets.zero,

View File

@ -1,5 +1,6 @@
import 'dart:typed_data';
import 'dart:convert';
import 'package:collection/collection.dart';
import '../models/models.dart';
import '../consts.dart';
import 'package:http/http.dart' as http;
@ -90,18 +91,22 @@ List<NameValueModel>? mapToRows(Map<String, String>? kvMap) {
return finalRows;
}
List<Map<String, dynamic>>? rowsToFormDataMapList(
List<Map<String, String>>? rowsToFormDataMapList(
List<FormDataModel>? kvRows,
) {
if (kvRows == null) {
return null;
}
List<Map<String, dynamic>> finalMap = kvRows
.map((FormDataModel formData) => {
"name": formData.name,
"value": formData.value,
"type": formData.type.name,
})
List<Map<String, String>> finalMap = kvRows
.map((FormDataModel formData) =>
(formData.name.trim().isEmpty && formData.value.trim().isEmpty)
? null
: {
"name": formData.name,
"value": formData.value,
"type": formData.type.name,
})
.whereNotNull()
.toList();
return finalMap;
}

View File

@ -50,7 +50,7 @@ String getShortPath(String path) {
String getFilenameFromPath(String path) {
var f = p.split(path);
return f.last;
return f.lastOrNull ?? "";
}
String getTempFileName() {

View File

@ -235,3 +235,27 @@ class SaveButton extends StatelessWidget {
);
}
}
class ClearResponseButton extends StatelessWidget {
const ClearResponseButton({
super.key,
this.onPressed,
});
final VoidCallback? onPressed;
@override
Widget build(BuildContext context) {
return Tooltip(
message: 'Clear response',
child: TextButton(
style: TextButton.styleFrom(minimumSize: const Size(40, 40)),
onPressed: onPressed,
child: const Icon(
Icons.delete,
size: 20,
),
),
);
}
}

View File

@ -55,11 +55,13 @@ class ResponsePaneHeader extends StatelessWidget {
this.responseStatus,
this.message,
this.time,
this.onClearResponse,
});
final int? responseStatus;
final String? message;
final Duration? time;
final VoidCallback? onClearResponse;
@override
Widget build(BuildContext context) {
@ -116,6 +118,10 @@ class ResponsePaneHeader extends StatelessWidget {
color: Theme.of(context).colorScheme.secondary,
),
),
kHSpacer10,
ClearResponseButton(
onPressed: onClearResponse,
)
],
),
),

View File

@ -117,10 +117,10 @@ packages:
dependency: "direct dev"
description:
name: build_runner
sha256: "67d591d602906ef9201caf93452495ad1812bea2074f04e25dbd7c133785821b"
sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21"
url: "https://pub.dev"
source: hosted
version: "2.4.7"
version: "2.4.8"
build_runner_core:
dependency: transitive
description:
@ -181,10 +181,10 @@ packages:
dependency: "direct main"
description:
name: code_builder
sha256: feee43a5c05e7b3199bb375a86430b8ada1b04104f2923d0e03cc01ca87b6d84
sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37
url: "https://pub.dev"
source: hosted
version: "4.9.0"
version: "4.10.0"
collection:
dependency: "direct main"
description:
@ -221,18 +221,18 @@ packages:
dependency: "direct main"
description:
name: csv
sha256: "63ed2871dd6471193dffc52c0e6c76fb86269c00244d244297abbb355c84a86e"
sha256: c6aa2679b2a18cb57652920f674488d89712efaf4d3fdf2e537215b35fc19d6c
url: "https://pub.dev"
source: hosted
version: "5.1.1"
version: "6.0.0"
dart_style:
dependency: "direct main"
description:
name: dart_style
sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368"
sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9"
url: "https://pub.dev"
source: hosted
version: "2.3.4"
version: "2.3.6"
davi:
dependency: "direct main"
description:
@ -293,10 +293,10 @@ packages:
dependency: "direct main"
description:
name: file_picker
sha256: "4e42aacde3b993c5947467ab640882c56947d9d27342a5b6f2895b23956954a6"
sha256: caa6bc229eab3e32eb2f37b53a5f9d22a6981474afd210c512a7546c1e1a04f6
url: "https://pub.dev"
source: hosted
version: "6.1.1"
version: "6.2.0"
fixnum:
dependency: transitive
description:
@ -378,10 +378,10 @@ packages:
dependency: "direct main"
description:
name: flutter_markdown
sha256: "35108526a233cc0755664d445f8a6b4b61e6f8fe993b3658b80b4a26827fc196"
sha256: cb44f7831b23a6bdd0f501718b0d2e8045cbc625a15f668af37ddb80314821db
url: "https://pub.dev"
source: hosted
version: "0.6.18+2"
version: "0.6.21"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
@ -394,18 +394,18 @@ packages:
dependency: "direct main"
description:
name: flutter_riverpod
sha256: da9591d1f8d5881628ccd5c25c40e74fc3eef50ba45e40c3905a06e1712412d5
sha256: "0f1974eff5bbe774bf1d870e406fc6f29e3d6f1c46bd9c58e7172ff68a785d7d"
url: "https://pub.dev"
source: hosted
version: "2.4.9"
version: "2.5.1"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c
sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2"
url: "https://pub.dev"
source: hosted
version: "2.0.9"
version: "2.0.10+1"
flutter_test:
dependency: "direct dev"
description: flutter
@ -428,10 +428,10 @@ packages:
dependency: "direct dev"
description:
name: freezed
sha256: "6c5031daae12c7072b3a87eff98983076434b4889ef2a44384d0cae3f82372ba"
sha256: "57247f692f35f068cae297549a46a9a097100685c6780fe67177503eea5ed4e5"
url: "https://pub.dev"
source: hosted
version: "2.4.6"
version: "2.4.7"
freezed_annotation:
dependency: "direct main"
description:
@ -460,10 +460,10 @@ packages:
dependency: "direct main"
description:
name: google_fonts
sha256: f0b8d115a13ecf827013ec9fc883390ccc0e87a96ed5347a3114cac177ef18e8
sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82
url: "https://pub.dev"
source: hosted
version: "6.1.0"
version: "6.2.1"
graphs:
dependency: transitive
description:
@ -572,8 +572,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: "9fa58d7b51e65174ab11cbcae17bba88a4194dde"
resolved-ref: "9fa58d7b51e65174ab11cbcae17bba88a4194dde"
ref: b7dde2f85dff4f482eed7eda4ef2a71344ef8b3a
resolved-ref: b7dde2f85dff4f482eed7eda4ef2a71344ef8b3a
url: "https://github.com/foss42/json_data_explorer.git"
source: git
version: "0.1.2"
@ -677,18 +677,18 @@ packages:
dependency: "direct main"
description:
name: lottie
sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216
sha256: ce2bb2605753915080e4ee47f036a64228c88dc7f56f7bc1dbe912d75b55b1e2
url: "https://pub.dev"
source: hosted
version: "2.7.0"
version: "3.1.0"
markdown:
dependency: "direct main"
description:
name: markdown
sha256: acf35edccc0463a9d7384e437c015a3535772e09714cf60e07eeef3a15870dcd
sha256: ef2a1298144e3f985cc736b22e0ccdaf188b5b3970648f2d9dc13efd1d9df051
url: "https://pub.dev"
source: hosted
version: "7.1.1"
version: "7.2.2"
matcher:
dependency: transitive
description:
@ -773,10 +773,10 @@ packages:
dependency: "direct main"
description:
name: package_info_plus
sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017"
sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79"
url: "https://pub.dev"
source: hosted
version: "4.2.0"
version: "5.0.1"
package_info_plus_platform_interface:
dependency: transitive
description:
@ -805,10 +805,10 @@ packages:
dependency: "direct main"
description:
name: path_provider
sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa
sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
path_provider_android:
dependency: transitive
description:
@ -857,6 +857,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.10.7"
pdf_widget_wrapper:
dependency: transitive
description:
name: pdf_widget_wrapper
sha256: "9c3ca36e5000c9682d52bbdc486867ba7c5ee4403d1a5d6d03ed72157753377b"
url: "https://pub.dev"
source: hosted
version: "1.0.3"
petitparser:
dependency: transitive
description:
@ -909,10 +917,10 @@ packages:
dependency: transitive
description:
name: pointer_interceptor_web
sha256: a6237528b46c411d8d55cdfad8fcb3269fc4cbb26060b14bff94879165887d1e
sha256: "9386e064097fd16419e935c23f08f35b58e6aaec155dd39bd6a003b88f9c14b4"
url: "https://pub.dev"
source: hosted
version: "0.10.2"
version: "0.10.1+2"
pointycastle:
dependency: transitive
description:
@ -933,18 +941,18 @@ packages:
dependency: "direct main"
description:
name: printing
sha256: ad39a42a5f83125952457dfd94f395c8cf0eb1f7759583dadb769be5c7f99d24
sha256: "1c99cab90ebcc1fff65831d264627d5b529359d563e53f33ab9b8117f2d280bc"
url: "https://pub.dev"
source: hosted
version: "5.11.1"
version: "5.12.0"
provider:
dependency: "direct main"
description:
name: provider
sha256: "9a96a0a19b594dbc5bf0f1f27d2bc67d5f95957359b461cd9feb44ed6ae75096"
sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c
url: "https://pub.dev"
source: hosted
version: "6.1.1"
version: "6.1.2"
pub_semver:
dependency: transitive
description:
@ -970,13 +978,13 @@ packages:
source: hosted
version: "3.0.1"
riverpod:
dependency: transitive
dependency: "direct main"
description:
name: riverpod
sha256: "942999ee48b899f8a46a860f1e13cee36f2f77609eb54c5b7a669bb20d550b11"
sha256: f21b32ffd26a36555e501b04f4a5dca43ed59e16343f1a30c13632b2351dfa4d
url: "https://pub.dev"
source: hosted
version: "2.4.9"
version: "2.5.1"
rxdart:
dependency: transitive
description:
@ -997,10 +1005,10 @@ packages:
dependency: "direct main"
description:
name: scrollable_positioned_list
sha256: "9566352ab9ba05794ee6c8864f154afba5d36c5637d0e3e32c615ba4ceb92772"
sha256: "1b54d5f1329a1e263269abc9e2543d90806131aa14fe7c6062a8054d57249287"
url: "https://pub.dev"
source: hosted
version: "0.2.3"
version: "0.3.8"
shelf:
dependency: transitive
description:
@ -1186,10 +1194,10 @@ packages:
dependency: "direct main"
description:
name: url_launcher
sha256: e9aa5ea75c84cf46b3db4eea212523591211c3cf2e13099ee4ec147f54201c86
sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e"
url: "https://pub.dev"
source: hosted
version: "6.2.2"
version: "6.2.5"
url_launcher_android:
dependency: transitive
description:
@ -1234,10 +1242,10 @@ packages:
dependency: transitive
description:
name: url_launcher_web
sha256: "3692a459204a33e04bc94f5fb91158faf4f2c8903281ddd82915adecdb1a901d"
sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b
url: "https://pub.dev"
source: hosted
version: "2.3.0"
version: "2.2.3"
url_launcher_windows:
dependency: transitive
description:
@ -1250,34 +1258,34 @@ packages:
dependency: "direct main"
description:
name: uuid
sha256: "22c94e5ad1e75f9934b766b53c742572ee2677c56bc871d850a57dad0f82127f"
sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8
url: "https://pub.dev"
source: hosted
version: "4.2.2"
version: "4.3.3"
vector_graphics:
dependency: transitive
description:
name: vector_graphics
sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43"
sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3"
url: "https://pub.dev"
source: hosted
version: "1.1.9+1"
version: "1.1.11+1"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7"
sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da
url: "https://pub.dev"
source: hosted
version: "1.1.9+1"
version: "1.1.11+1"
vector_graphics_compiler:
dependency: "direct main"
description:
name: vector_graphics_compiler
sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26
sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81"
url: "https://pub.dev"
source: hosted
version: "1.1.9+1"
version: "1.1.11+1"
vector_math:
dependency: transitive
description:
@ -1303,7 +1311,7 @@ packages:
source: hosted
version: "1.1.0"
web:
dependency: "direct main"
dependency: "direct overridden"
description:
name: web
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
@ -1338,10 +1346,10 @@ packages:
dependency: "direct main"
description:
name: window_manager
sha256: dcc865277f26a7dad263a47d0e405d77e21f12cb71f30333a52710a408690bd7
sha256: b3c895bdf936c77b83c5254bec2e6b3f066710c1f89c38b20b8acc382b525494
url: "https://pub.dev"
source: hosted
version: "0.3.7"
version: "0.3.8"
window_size:
dependency: "direct main"
description:
@ -1377,4 +1385,4 @@ packages:
version: "3.1.2"
sdks:
dart: ">=3.3.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.19.2"

View File

@ -1,25 +1,25 @@
name: apidash
description: API Dash is a beautiful open-source cross-platform API Client built using Flutter which can help you easily create & customize your API requests, visually inspect responses and generate Dart code on the go.
publish_to: "none"
version: 0.3.0+3
version: 0.4.0+4
environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.16.0"
flutter: ">=3.19.0"
dependencies:
flutter:
sdk: flutter
web: ^0.5.0
multi_split_view: ^2.4.0
url_launcher: ^6.1.12
flutter_riverpod: ^2.3.7
uuid: ^4.1.0
url_launcher: ^6.2.5
flutter_riverpod: ^2.5.1
riverpod: ^2.5.1
uuid: ^4.3.3
davi: ^3.4.1
http: ^1.1.0
http: ^1.2.1
http_parser: ^4.0.2
collection: ^1.17.2
google_fonts: ^6.1.0
google_fonts: ^6.2.1
highlighter: ^0.1.1
xml: ^6.3.0
jinja: ^0.5.0
@ -28,43 +28,46 @@ dependencies:
url: https://github.com/google/flutter-desktop-embedding.git
path: plugins/window_size
hive_flutter: ^1.1.0
lottie: ^2.6.0
lottie: ^3.1.0
mime_dart: ^3.0.0
path_provider: ^2.1.0
window_manager: ^0.3.5
path_provider: ^2.1.2
window_manager: ^0.3.8
path: ^1.8.3
flutter_markdown: ^0.6.17+1
markdown: ^7.1.1
flutter_markdown: ^0.6.21
markdown: ^7.2.2
just_audio: ^0.9.34
just_audio_mpv: ^0.1.7
just_audio_windows: ^0.2.0
freezed_annotation: ^2.4.1
json_annotation: ^4.8.1
printing: ^5.11.1
package_info_plus: ^4.1.0
printing: ^5.12.0
package_info_plus: ^5.0.1
flutter_typeahead: ^5.2.0
provider: ^6.0.5
provider: ^6.1.2
json_data_explorer:
git:
url: https://github.com/foss42/json_data_explorer.git
ref: 9fa58d7b51e65174ab11cbcae17bba88a4194dde
scrollable_positioned_list: ^0.2.3
file_picker: ^6.1.1
flutter_svg: ^2.0.9
ref: b7dde2f85dff4f482eed7eda4ef2a71344ef8b3a
scrollable_positioned_list: ^0.3.8
file_picker: ^6.2.0
flutter_svg: ^2.0.10+1
vector_graphics_compiler: ^1.1.9+1
code_builder: ^4.9.0
dart_style: ^2.3.4
code_builder: ^4.10.0
dart_style: ^2.3.6
json_text_field: ^1.1.0
csv: ^5.1.1
csv: ^6.0.0
dependency_overrides:
web: ^0.5.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^3.0.0
flutter_lints: ^3.0.1
flutter_launcher_icons: ^0.13.1
test: ^1.24.3
build_runner: ^2.4.6
freezed: ^2.4.1
test: ^1.24.9
build_runner: ^2.4.8
freezed: ^2.4.7
json_serializable: ^6.7.1
flutter:

View File

@ -186,4 +186,18 @@ void main() {
expect(find.byIcon(Icons.save), findsOneWidget);
expect(find.text("Save"), findsOneWidget);
});
testWidgets('Testing for ClearResponseButton', (tester) async {
await tester.pumpWidget(
MaterialApp(
title: 'ClearResponseButton',
theme: kThemeDataLight,
home: const Scaffold(
body: ClearResponseButton(),
),
),
);
expect(find.byIcon(Icons.delete), findsOneWidget);
});
}