Merge remote-tracking branch 'origin/main'

# Conflicts:
#	pubspec.lock
#	pubspec.yaml
This commit is contained in:
siddu015
2025-03-05 23:46:30 +05:30
51 changed files with 975 additions and 430 deletions

View File

@ -15,3 +15,28 @@ A List of API endpoints that can be used for testing API Dash
#### For Testing sites with Bad Certificate
- https://badssl.com/
- https://www.ssl.com/sample-valid-revoked-and-expired-ssl-tls-certificates/
#### PDF
- https://training.github.com/downloads/github-git-cheat-sheet.pdf
#### Text
- https://www.google.com/robots.txt
#### JSON
- https://api.apidash.dev/openapi.json
#### XML
- https://apidash.dev/sitemap.xml
#### Video
- https://download.blender.org/peach/bigbuckbunny_movies/
- https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4
#### Audio
-

View File

@ -0,0 +1,309 @@
# AI Agent for API Testing and Automated Tool Integration
## Personal Information
- **Full Name:** Akshay Waghmare
- **University Name:** Indian Institute of Information Technology, Allahabad (IIIT Allahabad)
- **Program Enrolled In:** B.Tech in Electronics and Communication Engineering (ECE)
- **Year:** Pre-final Year (Third Year)
- **Expected Graduation Date:** May 2026
## About Me
Im Akshay Waghmare, a pre-final year B.Tech student at IIIT Allahabad, majoring in Electronics and Communication Engineering. With a strong foundation in full-stack development and backend architecture, I have hands-on experience in technologies like **Next.js**, **Node.js**, **Spring Boot**, **Kafka**, **RabbitMQ**, and **Flutter**. Ive interned at **Screenera.ai** and **Webneco Infotech**, working on building scalable, high-performance applications. My open-source contributions span organizations like **Wikimedia Foundation**, **C2SI**, and **OpenClimateFix**, and Ive mentored aspiring developers at **OpenCode IIIT Allahabad**. Ive also participated in several competitions, achieving **AIR 12** in the **Amazon ML Challenge**, **Goldman Sachs India Hackathon (National Finalist)**, and **Google GenAI Hackathon**. Im passionate about AI, cloud technologies, and innovative software solutions, especially in automating tasks with AI agents and leveraging **Large Language Models (LLMs)** for smarter workflows.
## Project Details
- **Project Title:** AI Agent for API Testing and Automated Tool Integration
- **Description:**
This project leverages Large Language Models (LLMs) to automate API testing by generating intelligent test cases, validating responses, and converting APIs into structured tool definitions for seamless integration with AI agent frameworks like **crewAI, smolagents, pydantic-ai, and langgraph**.
- **Key Features:**
- Automated API discovery and structured parsing from OpenAPI specs, Postman collections, and raw API calls.
- AI-powered test case generation, including edge cases and security testing.
- Automated API request execution and intelligent validation using machine learning.
- Seamless tool integration with AI frameworks for advanced automation.
- Benchmark dataset & evaluation framework for selecting the best LLM backend for end users.
# Proposed Idea : AI Agents for API Testing & Tool Definition Generator
I propose a approach leveraging Large Language Models to utilise both API testing and framework integration. My solution combines intelligent test generation with automated tool definition creation, all powered by contextually-aware AI.
The core of my approach is a unified pipeline that first parses and understands API specifications at a deep semantic level, then uses that understanding for two key purposes: generating comprehensive test suites and creating framework-specific tool definitions. This dual-purpose system will dramatically reduce the manual effort typically required for both tasks while improving quality and coverage.
For the API testing component, We will focus on areas where traditional testing tools fall short - particularly intelligent edge case detection and business logic validation. By leveraging LLMs' ability to reason about APIs contextually, the system will identify potential issues that rule-based generators miss. The test generation will cover functional testing with parameter variations, edge cases including boundary values and invalid inputs, security testing for authentication and injection vulnerabilities, and even performance testing scenarios.
For the framework integration component, We will then develop a flexible adapter system that generates properly typed tool definitions with appropriate validation rules for each target framework. This means developers can instantly convert their APIs into tool definitions for crewAI, langchain, pydantic-ai, langgraph, and other frameworks without manually rewriting specifications and validation logic.
To address the benchmarking requirement in the project description, After that we can create a standardized dataset of diverse API specifications and implement a comprehensive evaluation framework. This will measure multiple dimensions including accuracy of generated tests and tools, API coverage percentage, relevance to the API's purpose, edge case detection ability, and cost efficiency across different LLM providers. This will enable users to make informed decisions about which model best fits their specific needs.
## System Architecture
The system architecture consists of several key components working together to form a pipeline:
```mermaid
flowchart TD
subgraph Client["Client Layer"]
Web[Web Interface]
CLI[Command Line Interface]
SDK[SDK/API Client]
end
subgraph Gateway["API Gateway"]
GW[API Gateway/Load Balancer]
Auth[Authentication Service]
end
subgraph Core["Core Services"]
subgraph APIAnalysis["API Analysis Service"]
Parser[API Specification Parser]
Analyzer[Endpoint Analyzer]
DependencyDetector[Dependency Detector]
end
subgraph TestGen["Test Generation Service"]
TestCaseGen[Test Case Generator]
TestDataGen[Test Data Generator]
TestSuiteOrg[Test Suite Organizer]
EdgeCaseGen[Edge Case Generator]
end
subgraph ToolGen["Tool Generation Service"]
ToolDefGen[Tool Definition Generator]
SchemaGen[Schema Generator]
FrameworkAdapter[Framework Adapter]
DocGen[Documentation Generator]
end
end
subgraph LLM["LLM Services"]
PromptMgr[Prompt Manager]
ModelRouter[Model Router]
TokenManager[Token Manager]
OutputParser[Output Parser]
CacheManager[Cache Manager]
end
subgraph Execution["Execution Services"]
subgraph Runner["Test Runner Service"]
Executor[Request Executor]
AuthManager[Auth Manager]
RateLimit[Rate Limiter]
Retry[Retry Manager]
end
subgraph Validator["Validation Service"]
SchemaValidator[Schema Validator]
LogicValidator[Business Logic Validator]
PerformanceValidator[Performance Validator]
SecurityValidator[Security Validator]
end
subgraph Reporter["Reporting Service"]
ResultCollector[Result Collector]
CoverageAnalyzer[Coverage Analyzer]
ReportGenerator[Report Generator]
Visualizer[Visualizer]
end
end
subgraph Data["Data Services"]
DB[(Database)]
Cache[(Cache)]
Storage[(Object Storage)]
Queue[(Message Queue)]
end
subgraph External["External Systems"]
TargetAPIs[Target APIs]
CISystem[CI/CD Systems]
AIFrameworks[AI Agent Frameworks]
Monitoring[Monitoring Systems]
end
%% Client to Gateway
Web --> GW
CLI --> GW
SDK --> GW
%% Gateway to Services
GW --> Auth
Auth --> Parser
Auth --> TestCaseGen
Auth --> ToolDefGen
Auth --> Executor
%% API Analysis Flow
Parser --> Analyzer
Analyzer --> DependencyDetector
Parser --> DB
%% Test Generation Flow
Analyzer --> TestCaseGen
TestCaseGen --> TestDataGen
TestDataGen --> TestSuiteOrg
TestCaseGen --> EdgeCaseGen
EdgeCaseGen --> TestSuiteOrg
TestSuiteOrg --> DB
%% Tool Generation Flow
Analyzer --> ToolDefGen
ToolDefGen --> SchemaGen
SchemaGen --> FrameworkAdapter
FrameworkAdapter --> DocGen
ToolDefGen --> DB
%% LLM Integration
TestCaseGen --> PromptMgr
EdgeCaseGen --> PromptMgr
ToolDefGen --> PromptMgr
LogicValidator --> PromptMgr
PromptMgr --> ModelRouter
ModelRouter --> TokenManager
TokenManager --> OutputParser
ModelRouter --> CacheManager
CacheManager --> Cache
%% Execution Flow
TestSuiteOrg --> Executor
Executor --> AuthManager
AuthManager --> RateLimit
RateLimit --> Retry
Executor --> TargetAPIs
TargetAPIs --> Executor
Executor --> SchemaValidator
SchemaValidator --> LogicValidator
LogicValidator --> PerformanceValidator
PerformanceValidator --> SecurityValidator
SchemaValidator --> ResultCollector
LogicValidator --> ResultCollector
PerformanceValidator --> ResultCollector
SecurityValidator --> ResultCollector
%% Reporting Flow
ResultCollector --> CoverageAnalyzer
CoverageAnalyzer --> ReportGenerator
ReportGenerator --> Visualizer
ReportGenerator --> Storage
%% Data Service Integration
DB <--> Parser
DB <--> TestSuiteOrg
DB <--> ToolDefGen
DB <--> ResultCollector
Queue <--> Executor
Storage <--> ReportGenerator
%% External Integrations
ReportGenerator --> CISystem
FrameworkAdapter --> AIFrameworks
Reporter --> Monitoring
%% Styling
classDef client fill:#3498db,stroke:#2980b9,color:white
classDef gateway fill:#f1c40f,stroke:#f39c12,color:black
classDef core fill:#27ae60,stroke:#229954,color:white
classDef llm fill:#9b59b6,stroke:#8e44ad,color:white
classDef execution fill:#e74c3c,stroke:#c0392b,color:white
classDef data fill:#16a085,stroke:#1abc9c,color:white
classDef external fill:#7f8c8d,stroke:#2c3e50,color:white
class Web,CLI,SDK client
class GW,Auth gateway
class Parser,Analyzer,DependencyDetector,TestCaseGen,TestDataGen,TestSuiteOrg,EdgeCaseGen,ToolDefGen,SchemaGen,FrameworkAdapter,DocGen core
class PromptMgr,ModelRouter,TokenManager,OutputParser,CacheManager llm
class Executor,AuthManager,RateLimit,Retry,SchemaValidator,LogicValidator,PerformanceValidator,SecurityValidator,ResultCollector,CoverageAnalyzer,ReportGenerator,Visualizer execution
class DB,Cache,Storage,Queue data
class TargetAPIs,CISystem,AIFrameworks,Monitoring external
```
1. **API Specification Parser**: This component handles multiple API specification formats (OpenAPI, GraphQL, gRPC, etc.) and normalizes them into a unified internal representation. I'll build on existing parsing libraries but extend them with custom logic to extract semantic meaning and relationships between endpoints.
2. **LLM Integration Layer**: A provider-agnostic abstraction supporting multiple LLM services with intelligent routing, caching, and fallback mechanisms. Prompt templates will be version-controlled and systematically optimized through iterative testing to achieve the best results.
3. **Test Generation Engine**: This core component uses LLMs to analyze API specifications and generate comprehensive test suites. For large APIs that might exceed context limits, I'll implement a chunking approach that processes endpoints in logical batches while maintaining awareness of their relationships.
4. **Test Execution Runtime**: Once tests are generated, this component executes them against target APIs, handling authentication, implementing appropriate retry logic, respecting rate limits, and collecting comprehensive response data for validation.
5. **Response Validation Service**: This combines traditional schema validation with LLM-powered semantic validation to catch subtle issues in responses that might comply with the schema but violate business logic or contain inconsistent data.
6. **Tool Definition Generator**: This component converts API specifications into properly structured tool definitions for various AI frameworks, handling the specific requirements and patterns of each target framework.
7. **Benchmark Framework**: The evaluation system that assesses LLM performance on standardized tasks with detailed metrics for accuracy, coverage, relevance, and efficiency.
All components will be implemented in Python with comprehensive test coverage and documentation. The architecture will be modular, allowing for component reuse and independent scaling as needs evolve.
For frontend integration, I can either develop integration points with your existing Flutter-based application or implement a CLI interface. The backend will expose a clear API that can be consumed by either approach. I'd welcome discussion on which option would better align with your current infrastructure and team workflows - the CLI would offer simplicity for CI/CD integration, while Flutter integration would provide a more seamless experience for existing users.
## System Workflow and Interactions
To illustrate how the components of my proposed system interact, I've created a sequence diagram showing the key workflows:
```mermaid
sequenceDiagram
actor User as "User" #ff6347
participant UI as "Client(API Dash UI)/CLI Interface" #4682b4
participant Orch as "Orchestrator" #32cd32
participant Parser as "API Parser" #ffa500
participant LLM as "LLM Service" #8a2be2
participant TestGen as "Test Generator" #ff1493
participant Runner as "Test Runner" #00ced1
participant Validator as "Response Validator" #ff8c00
participant Reporter as "Test Reporter" #9932cc
participant ToolGen as "Tool Generator" #ffb6c1
participant API as "Target API" #20b2aa
User->>UI: Upload API Spec / Define Test Scenario
UI->>Orch: Submit Request
Orch->>Parser: Parse API Specification
Parser-->>Orch: Structured API Metadata
Orch->>LLM: Generate Test Cases
LLM->>TestGen: Create Test Scenarios
TestGen-->>Orch: Generated Test Cases
Orch->>Runner: Execute Tests
Runner->>API: Send API Requests
API-->>Runner: API Responses
Runner->>Validator: Validate Responses
Validator->>LLM: Analyze Response Quality
LLM-->>Validator: Validation Results
Validator-->>Runner: Validation Results
Runner-->>Orch: Test Execution Results
Orch->>Reporter: Generate Reports
Reporter-->>UI: Display Results
alt Tool Definition Generation
User->>UI: Request Tool Definitions
UI->>Orch: Forward Request
Orch->>ToolGen: Generate Tool Definitions
ToolGen->>LLM: Optimize Tool Descriptions
LLM-->>ToolGen: Enhanced Descriptions
ToolGen-->>Orch: Framework-Specific Definitions
Orch-->>UI: Return Tool Definitions
UI-->>User: Download Definitions
end
```
This diagram demonstrates the four key workflows in the system:
1. API Specification Analysis - The system ingests and parses API specifications, then uses LLM to understand them semantically.
2. Test Generation - Using the parsed API and LLM intelligence, the system creates comprehensive test suites tailored to the API's functionality.
3. Test Execution - Tests are run against the actual API, with responses validated both technically and semantically using LLM-powered understanding.
4. Tool Definition Generation - The system leverages its understanding of the API to create framework-specific tool definitions that developers can immediately use.
The LLM service is central to the entire workflow, providing the intelligence needed for deep API understanding, smart test generation, semantic validation, and appropriate tool definition creation.
## Clarifying Questions
I have some questions for more understanding:
1. Which AI frameworks are highest priority for tool definition generation? Is there a specific order of importance for crewAI, langchain, pydantic-ai, and langgraph?
2. Do you have preferred LLM providers that should be prioritized for integration, or should the system be designed to work with any provider through a common interface?
3. Are there specific types of APIs that should be given special focus in the benchmark dataset (e.g., e-commerce, financial, IoT)?
4. How will the frontend be planned? Will it be a standalone interface, an extension of an existing dashboard, or fully integrated into an API testing - API Dash client ?

View File

@ -0,0 +1,49 @@
## Instructions
- Create a fork of API Dash.
- In the folder [doc/proposals/2025/gsoc](https://github.com/foss42/apidash/tree/main/doc/proposals/2025/gsoc) create a file named `application_<your name>_<short project name>.md`
The file should contain the follow:
```
### About
1. Full Name
3. Contact info (email, phone, etc.)
6. Discord handle
7. Home page (if any)
8. Blog (if any)
9. GitHub profile link
10. Twitter, LinkedIn, other socials
11. Time zone
12. Link to a resume (PDF, publicly accessible via link and not behind any login-wall)
### University Info
1. University name
2. Program you are enrolled in (Degree & Major/Minor)
3. Year
5. Expected graduation date
### Motivation & Past Experience
Short answers to the following questions (Add relevant links wherever you can):
1. Have you worked on or contributed to a FOSS project before? Can you attach repo links or relevant PRs?
2. What is your one project/achievement that you are most proud of? Why?
3. What kind of problems or challenges motivate you the most to solve them?
4. Will you be working on GSoC full-time? In case not, what will you be studying or working on while working on the project?
6. Do you mind regularly syncing up with the project mentors?
7. What interests you the most about API Dash?
8. Can you mention some areas where the project can be improved?
### Project Proposal Information
1. Proposal Title
2. Abstract: A brief summary about the problem that you will be tackling & how.
3. Detailed Description
4. Weekly Timeline: A rough week-wise timeline of activities that you would undertake.
```
- Feel free to add images by adding it to the `images` folder inside [doc/proposals/2025/gsoc](https://github.com/foss42/apidash/tree/main/doc/proposals/2025/gsoc) and linking it to your doc.
- Finally, send your application as a PR for review.

View File

@ -0,0 +1,26 @@
## Instructions
- Create a fork of API Dash.
- In the folder [doc/proposals/2025/gsoc](https://github.com/foss42/apidash/tree/main/doc/proposals/2025/gsoc) create a file named `idea_<your name>_<short project name>.md`
The file should contain the following:
```
### Initial Idea Submission
Full Name:
University name:
Program you are enrolled in (Degree & Major/Minor):
Year:
Expected graduation date:
Project Title: <Write your idea title>
Relevant issues: <Add links to the relevant issues>
Idea description:
<Write you thoughts below discussing your approach and how will you implement it>
```
- Feel free to add images by adding it to the `images` folder inside [doc/proposals/2025/gsoc](https://github.com/foss42/apidash/tree/main/doc/proposals/2025/gsoc) and linking it to your doc.
- Finally, send you changes as a PR for review.

View File

@ -268,15 +268,100 @@ Here are the detailed instructions for running the generated API Dash code in **
## Go (net/http)
TODO
### 1. Install Go compiler
- Windows and MacOS: check out the [official source](https://go.dev/doc/install)
- Linux: Install from your distro's package manager.
Verify if go is installed:
```bash
go version
```
### 2. Create a project
```bash
go mod init example.com/api
```
### 3. Run the generated code
- Paste the generated code into `main.go`.
- Build and run by `go run main.go`.
## JavaScript (axios)
TODO
The generated api code can be run in browser by using the code in an html file as demonstrated below:
### 1. Create the html file with generated code
Create a new file `index.html`
```html
<!DOCTYPE html>
<html>
<head>
<title>Axios Example</title>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
</head>
<body>
<script>
// Paste your API Dash generated code here !!
</script>
</body>
</html>
```
Make sure to paste the generated js code from api dash under the `<script>` tag.
### 2. Test with Browser Developer Tools
Open the `index.html` file in a modern browser and open devtools.
- **Chrome**: Right-click the page and select "Inspect" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS).
- **Firefox**: Right-click the page and select "Inspect Element" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS).
- **Edge**: Right-click the page and select "Inspect" or press F12 or Ctrl+Shift+I.
Navigate to network tab and refresh the page to see the requests and network activity.
## JavaScript (fetch)
TODO
The generated api code can be run in browser by using the code in an html file as demonstrated below:
### 1. Create the html file with generated code
Create a new file `index.html`
```html
<!DOCTYPE html>
<html>
<head>
<title>Fetch Example</title>
</head>
<body>
<script>
// Paste your API Dash generated code here !!
</script>
</body>
</html>
```
Make sure to paste the generated js code from api dash under the `<script>` tag.
### 2. Test with Browser Developer Tools
Open the `index.html` file in a modern browser and open devtools.
- **Chrome**: Right-click the page and select "Inspect" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS).
- **Firefox**: Right-click the page and select "Inspect Element" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS).
- **Edge**: Right-click the page and select "Inspect" or press F12 or Ctrl+Shift+I.
Navigate to network tab and refresh the page to see the requests and network activity.
## node.js (JavaScript, axios)
@ -655,7 +740,88 @@ java -jar api_test.jar
## PHP (curl)
TODO
Here are the detailed instructions for running the generated API Dash code in PHP (using `curl`) for macOS, Windows, and Linux:
### 1. Install and set PHP:
Before starting out, we need to install PHP in our system.
#### macOS:
- Go to the official PHP website: [https://www.php.net/manual/en/install.macosx.php](https://www.php.net/manual/en/install.macosx.php)
- Follow the installation instructions.
#### Windows:
- Go to the official PHP website: [https://www.php.net/manual/en/install.windows.php](https://www.php.net/manual/en/install.windows.php)
- Follow the installation instructions.
#### Linux:
The installation process depends on your Linux distribution. Use the appropriate command below:
- ##### Ubuntu/Debian
```bash
sudo apt update
sudo apt install php php-cli php-curl php-mbstring php-xml php-zip -y
```
- ##### Arch Linux / Manjaro
```bash
sudo pacman -S php php-apache php-cgi php-curl php-mbstring php-xml php-zip
```
- ##### Fedora / CentOS
```bash
- sudo dnf install php php-cli php-curl php-mbstring php-xml php-zip -y
```
- ##### OpenSUSE
```bash
sudo zypper install php php-cli php-curl php-mbstring php-xml php-zip
```
✅ Finally, check that everything works correctly pasting this command in your terminal
```bash
php --version
```
### 2. Check cURL
cURL is usually enabled by default. To check if it's active, run:
```bash
php -m | grep curl
```
and check if it returns **curl** as output
#### If curl is disabled
1. Open the `php.ini` configuration file. You can find its location by running:
```bash
php --ini
```
2. Open the file in a text editor/IDE
3. Find this line
```bash
;extension=curl
```
4. Remove the semicolon (`;`) at the beginning to enable it:
```bash
extension=curl
```
5. Save and restart php by using
```bash
sudo systemctl restart apache2 # For Apache
sudo systemctl restart php8.2-fpm # For PHP-FPM (Nginx)
```
### 3. Execute the generated code:
Once you have everything needed installed, follow these steps to execute the generated code:
1. **Open a IDE/text editor** ✍️ (Visual Studio, VS Code or any other text editor).
2. **Create a php file ( ex. `request.php` )** ✍️ (Visual Studio, VS Code or any other text editor).
3. **Copy and paste the generated API code** 📋 from API Dash into the `request.php` file.
#### In Visual Studio:
1. Click the **Start Debugging `(F5)`** button from the top menu to run the project.
2. The terminal will display the API response.
#### Using the CLI:
1. Open the terminal at the project root directory and run the file you've created:
```bash
php filename.php
```
2. The terminal will display the API response.
## PHP (guzzle)

View File

@ -1,6 +1,7 @@
import 'dart:convert';
import 'package:apidash_core/apidash_core.dart';
import 'package:code_builder/code_builder.dart';
import 'package:pub_semver/pub_semver.dart';
import 'package:dart_style/dart_style.dart';
import 'shared.dart';
@ -141,7 +142,8 @@ class DartDioCodeGen {
sbf.writeln(mainFunction.accept(emitter));
return DartFormatter(
pageWidth: contentType == ContentType.formdata ? 70 : 160)
.format(sbf.toString());
languageVersion: Version(3, 2, 4),
pageWidth: contentType == ContentType.formdata ? 70 : 160,
).format(sbf.toString());
}
}

View File

@ -2,6 +2,7 @@ import 'dart:convert';
import 'dart:io';
import 'package:apidash_core/apidash_core.dart';
import 'package:code_builder/code_builder.dart';
import 'package:pub_semver/pub_semver.dart';
import 'package:dart_style/dart_style.dart';
import 'shared.dart';
@ -225,7 +226,8 @@ class DartHttpCodeGen {
sbf.writeln(mainFunction.accept(emitter));
return DartFormatter(
pageWidth: contentType == ContentType.formdata ? 70 : 160)
.format(sbf.toString());
languageVersion: Version(3, 2, 4),
pageWidth: contentType == ContentType.formdata ? 70 : 160,
).format(sbf.toString());
}
}

View File

@ -74,10 +74,7 @@ class NavbarButton extends ConsumerWidget {
? Theme.of(context)
.colorScheme
.onSecondaryContainer
: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.65),
: Theme.of(context).colorScheme.onSurfaceVariant,
),
)
: const SizedBox.shrink(),

View File

@ -29,10 +29,7 @@ class EditorTitle extends StatelessWidget {
tooltip: title,
onSelected: onSelected,
child: Ink(
color: Theme.of(context)
.colorScheme
.secondaryContainer
.withOpacity(0.3),
color: Theme.of(context).colorScheme.surface,
padding:
const EdgeInsets.symmetric(horizontal: 12.0, vertical: 6),
child: Row(

View File

@ -29,17 +29,13 @@ class EnvCellField extends StatelessWidget {
),
decoration: InputDecoration(
hintStyle: kCodeStyle.copyWith(
color: clrScheme.outline.withOpacity(
kHintOpacity,
),
color: clrScheme.outlineVariant,
),
hintText: hintText,
contentPadding: const EdgeInsets.only(bottom: 12),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: clrScheme.primary.withOpacity(
kHintOpacity,
),
color: clrScheme.outlineVariant,
),
),
enabledBorder: UnderlineInputBorder(

View File

@ -26,9 +26,7 @@ class EnvURLField extends StatelessWidget {
decoration: InputDecoration(
hintText: kHintTextUrlCard,
hintStyle: kCodeStyle.copyWith(
color: Theme.of(context).colorScheme.outline.withOpacity(
kHintOpacity,
),
color: Theme.of(context).colorScheme.outlineVariant,
),
border: InputBorder.none,
),

View File

@ -1,4 +1,3 @@
import 'package:apidash_core/apidash_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:apidash/providers/providers.dart';
@ -11,10 +10,8 @@ class EnvironmentDropdown extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
final environments = ref.watch(environmentsStateNotifierProvider);
final environmentSequence = ref.watch(environmentSequenceProvider);
final environmentsList = environmentSequence
.map((e) => environments?[e])
.whereNotNull()
.toList();
final environmentsList =
environmentSequence.map((e) => environments?[e]).nonNulls.toList();
final activeEnvironment = ref.watch(activeEnvironmentIdStateProvider);
return EnvironmentPopupMenu(

View File

@ -108,7 +108,7 @@ class Dashboard extends ConsumerWidget {
VerticalDivider(
thickness: 1,
width: 1,
color: Theme.of(context).colorScheme.surfaceContainerHighest,
color: Theme.of(context).colorScheme.surfaceContainerHigh,
),
Expanded(
child: IndexedStack(

View File

@ -112,14 +112,14 @@ class _HistoryExpansionTileState extends ConsumerState<HistoryExpansionTile>
child: Icon(
Icons.chevron_right_rounded,
size: 20,
color: colorScheme.onSurface.withOpacity(0.6),
color: colorScheme.outline,
)),
kHSpacer5,
Text(
humanizeDate(widget.date),
style: Theme.of(context).textTheme.titleSmall?.copyWith(
fontWeight: FontWeight.bold,
color: colorScheme.onSurface.withOpacity(0.6),
color: colorScheme.outline,
),
),
],

View File

@ -49,8 +49,9 @@ class HistoryURLCard extends StatelessWidget {
style: kCodeStyle.copyWith(
fontSize: fontSize,
fontWeight: FontWeight.bold,
color: getHTTPMethodColor(
method,
color: getAPIColor(
apiType!,
method: method,
brightness: Theme.of(context).brightness,
),
),

View File

@ -21,21 +21,6 @@ class EditRequestBody extends ConsumerWidget {
final apiType = ref
.watch(selectedRequestModelProvider.select((value) => value?.apiType));
// TODO: #178 GET->POST Currently switches to POST everytime user edits body even if the user intentionally chooses GET
// final sm = ScaffoldMessenger.of(context);
// void changeToPostMethod() {
// if (requestModel?.httpRequestModel!.method == HTTPVerb.get) {
// ref
// .read(collectionStateNotifierProvider.notifier)
// .update(selectedId, method: HTTPVerb.post);
// sm.hideCurrentSnackBar();
// sm.showSnackBar(getSnackBar(
// "Switched to POST method",
// small: false,
// ));
// }
// }
return Column(
children: [
(apiType == APIType.rest)
@ -55,12 +40,8 @@ class EditRequestBody extends ConsumerWidget {
switch (apiType) {
APIType.rest => Expanded(
child: switch (contentType) {
ContentType.formdata => const Padding(
padding: kPh4,
child: FormDataWidget(
// TODO: See changeToPostMethod above
// changeMethodToPost: changeToPostMethod,
)),
ContentType.formdata =>
const Padding(padding: kPh4, child: FormDataWidget()),
// TODO: Fix JsonTextFieldEditor & plug it here
ContentType.json => Padding(
padding: kPt5o10,
@ -69,7 +50,6 @@ class EditRequestBody extends ConsumerWidget {
fieldKey: "$selectedId-json-body-editor",
initialValue: requestModel?.httpRequestModel?.body,
onChanged: (String value) {
// changeToPostMethod();
ref
.read(collectionStateNotifierProvider.notifier)
.update(body: value);
@ -84,7 +64,6 @@ class EditRequestBody extends ConsumerWidget {
fieldKey: "$selectedId-body-editor",
initialValue: requestModel?.httpRequestModel?.body,
onChanged: (String value) {
// changeToPostMethod();
ref
.read(collectionStateNotifierProvider.notifier)
.update(body: value);

View File

@ -23,7 +23,7 @@ class BottomNavBar extends ConsumerWidget {
color: Theme.of(context).colorScheme.onInverseSurface,
),
),
color: Theme.of(context).colorScheme.surface,
color: Theme.of(context).colorScheme.surfaceContainerLowest,
),
child: Material(
type: MaterialType.transparency,

View File

@ -21,9 +21,9 @@ class PageBase extends ConsumerWidget {
final isDarkMode =
ref.watch(settingsProvider.select((value) => value.isDark));
final scaffold = Scaffold(
backgroundColor: Theme.of(context).colorScheme.surface,
backgroundColor: Theme.of(context).colorScheme.surfaceContainerLowest,
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.surface,
backgroundColor: Theme.of(context).colorScheme.surfaceContainerLowest,
primary: true,
title: Text(title),
centerTitle: true,
@ -43,7 +43,7 @@ class PageBase extends ConsumerWidget {
? kPb70
: EdgeInsets.zero) +
(kIsWindows || kIsMacOS ? kPt28 : EdgeInsets.zero),
color: Theme.of(context).colorScheme.surface,
color: Theme.of(context).colorScheme.surfaceContainerLowest,
child: scaffold,
),
if (kIsWindows)

View File

@ -26,15 +26,16 @@ Color getResponseStatusCodeColor(int? statusCode,
return col;
}
Color getHTTPMethodColor(HTTPVerb method,
{Brightness brightness = Brightness.light}) {
Color col = switch (method) {
HTTPVerb.get => kColorHttpMethodGet,
HTTPVerb.head => kColorHttpMethodHead,
HTTPVerb.post => kColorHttpMethodPost,
HTTPVerb.put => kColorHttpMethodPut,
HTTPVerb.patch => kColorHttpMethodPatch,
HTTPVerb.delete => kColorHttpMethodDelete,
Color getAPIColor(
APIType apiType, {
HTTPVerb? method,
Brightness? brightness,
}) {
Color col = switch (apiType) {
APIType.rest => getHTTPMethodColor(
method,
),
APIType.graphql => kColorGQL,
};
if (brightness == Brightness.dark) {
col = getDarkModeColor(col);
@ -42,9 +43,22 @@ Color getHTTPMethodColor(HTTPVerb method,
return col;
}
Color getHTTPMethodColor(HTTPVerb? method) {
Color col = switch (method) {
HTTPVerb.get => kColorHttpMethodGet,
HTTPVerb.head => kColorHttpMethodHead,
HTTPVerb.post => kColorHttpMethodPost,
HTTPVerb.put => kColorHttpMethodPut,
HTTPVerb.patch => kColorHttpMethodPatch,
HTTPVerb.delete => kColorHttpMethodDelete,
_ => kColorHttpMethodGet,
};
return col;
}
Color getDarkModeColor(Color col) {
return Color.alphaBlend(
col.withOpacity(kOpacityDarkModeBlend),
col.withValues(alpha: kOpacityDarkModeBlend),
kColorWhite,
);
}

View File

@ -21,8 +21,7 @@ class HistoryRequestCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final Color color = Theme.of(context).colorScheme.surface;
final Color colorVariant =
Theme.of(context).colorScheme.surfaceContainerHighest.withOpacity(0.5);
final Color colorVariant = Theme.of(context).colorScheme.surfaceContainer;
final Color surfaceTint = Theme.of(context).colorScheme.primary;
return Card(
shape: const ContinuousRectangleBorder(borderRadius: kBorderRadius12),
@ -38,7 +37,6 @@ class HistoryRequestCard extends StatelessWidget {
onTap: onTap,
borderRadius: kBorderRadius6,
hoverColor: colorVariant,
focusColor: colorVariant.withOpacity(0.5),
child: Padding(
padding: kPv6 + kPh8,
child: SizedBox(

View File

@ -43,8 +43,7 @@ class SidebarEnvironmentCard extends StatelessWidget {
final colorScheme = Theme.of(context).colorScheme;
final Color color =
isGlobal ? colorScheme.secondaryContainer : colorScheme.surface;
final Color colorVariant =
colorScheme.surfaceContainerHighest.withOpacity(0.5);
final Color colorVariant = colorScheme.surfaceContainer;
final Color surfaceTint = colorScheme.primary;
bool isSelected = selectedId == id;
bool inEditMode = editRequestId == id;
@ -68,7 +67,7 @@ class SidebarEnvironmentCard extends StatelessWidget {
child: InkWell(
borderRadius: kBorderRadius8,
hoverColor: colorVariant,
focusColor: colorVariant.withOpacity(0.5),
focusColor: colorVariant,
onTap: inEditMode ? null : onTap,
// onSecondaryTap: onSecondaryTap,
onSecondaryTapUp: (isGlobal)

View File

@ -28,8 +28,7 @@ class SidebarHistoryCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final Color color = Theme.of(context).colorScheme.surface;
final Color colorVariant =
Theme.of(context).colorScheme.surfaceContainerHighest.withOpacity(0.5);
final Color colorVariant = Theme.of(context).colorScheme.surfaceContainer;
final model = models.first;
final Color surfaceTint = Theme.of(context).colorScheme.primary;
final String name = getHistoryRequestName(model);
@ -53,7 +52,6 @@ class SidebarHistoryCard extends StatelessWidget {
onTap: onTap,
borderRadius: kBorderRadius8,
hoverColor: colorVariant,
focusColor: colorVariant.withOpacity(0.5),
child: Padding(
padding: const EdgeInsets.only(
left: 6,

View File

@ -45,8 +45,7 @@ class SidebarRequestCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final Color color = Theme.of(context).colorScheme.surface;
final Color colorVariant =
Theme.of(context).colorScheme.surfaceContainerHighest.withOpacity(0.5);
final Color colorVariant = Theme.of(context).colorScheme.surfaceContainer;
final Color surfaceTint = Theme.of(context).colorScheme.primary;
bool isSelected = selectedId == id;
bool inEditMode = editRequestId == id;
@ -72,7 +71,7 @@ class SidebarRequestCard extends StatelessWidget {
child: InkWell(
borderRadius: kBorderRadius8,
hoverColor: colorVariant,
focusColor: colorVariant.withOpacity(0.5),
focusColor: colorVariant,
onTap: inEditMode ? null : onTap,
// onDoubleTap: inEditMode ? null : onDoubleTap,
onSecondaryTapUp: (details) {

View File

@ -118,12 +118,7 @@ class ViewCodePane extends StatelessWidget {
? kLightCodeTheme
: kDarkCodeTheme;
final textContainerdecoration = BoxDecoration(
color: Color.alphaBlend(
(Theme.of(context).brightness == Brightness.dark
? Theme.of(context).colorScheme.onPrimaryContainer
: Theme.of(context).colorScheme.primaryContainer)
.withOpacity(kForegroundOpacity),
Theme.of(context).colorScheme.surface),
color: Theme.of(context).colorScheme.surfaceContainerLow,
border: Border.all(
color: Theme.of(context).colorScheme.surfaceContainerHighest),
borderRadius: kBorderRadius8,

View File

@ -29,10 +29,7 @@ showHistoryRetentionDialog(
child: Text(
"Select the duration for which you want to retain your request history",
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.8),
color: Theme.of(context).colorScheme.outline,
),
),
),
@ -49,10 +46,7 @@ showHistoryRetentionDialog(
secondary: Icon(e.icon,
color: selectedRetentionPeriod == e
? Theme.of(context).colorScheme.primary
: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.6)),
: Theme.of(context).colorScheme.outline),
value: e,
groupValue: selectedRetentionPeriod,
onChanged: (value) {

View File

@ -23,8 +23,9 @@ class DropdownButtonHttpMethod extends StatelessWidget {
EdgeInsets.only(left: context.isMediumWindow ? 8 : 16),
dropdownMenuItemtextStyle: (HTTPVerb v) => kCodeStyle.copyWith(
fontWeight: FontWeight.bold,
color: getHTTPMethodColor(
v,
color: getAPIColor(
APIType.rest,
method: v,
brightness: Theme.of(context).brightness,
),
),

View File

@ -86,16 +86,12 @@ class _TextFieldEditorState extends State<TextFieldEditor> {
decoration: InputDecoration(
hintText: widget.hintText ?? kHintContent,
hintStyle: TextStyle(
color: Theme.of(context).colorScheme.outline.withOpacity(
kHintOpacity,
),
color: Theme.of(context).colorScheme.outlineVariant,
),
focusedBorder: OutlineInputBorder(
borderRadius: kBorderRadius8,
borderSide: BorderSide(
color: Theme.of(context).colorScheme.primary.withOpacity(
kHintOpacity,
),
color: Theme.of(context).colorScheme.outlineVariant,
),
),
enabledBorder: OutlineInputBorder(
@ -106,12 +102,7 @@ class _TextFieldEditorState extends State<TextFieldEditor> {
),
filled: true,
hoverColor: kColorTransparent,
fillColor: Color.alphaBlend(
(Theme.of(context).brightness == Brightness.dark
? Theme.of(context).colorScheme.onPrimaryContainer
: Theme.of(context).colorScheme.primaryContainer)
.withOpacity(kForegroundOpacity),
Theme.of(context).colorScheme.surface),
fillColor: Theme.of(context).colorScheme.surfaceContainerLow,
),
),
);

View File

@ -31,9 +31,7 @@ class ObscurableCellField extends HookWidget {
obscureText: obscureText.value,
decoration: InputDecoration(
hintStyle: kCodeStyle.copyWith(
color: clrScheme.outline.withOpacity(
kHintOpacity,
),
color: clrScheme.outlineVariant,
),
hintText: hintText,
suffixIcon: IconButton(
@ -50,9 +48,7 @@ class ObscurableCellField extends HookWidget {
contentPadding: const EdgeInsets.only(bottom: 12),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: clrScheme.primary.withOpacity(
kHintOpacity,
),
color: clrScheme.outline,
),
),
enabledBorder: UnderlineInputBorder(

View File

@ -80,15 +80,12 @@ class _HeaderFieldState extends State<HeaderField> {
color: colorScheme.onSurface,
),
decoration: InputDecoration(
hintStyle: kCodeStyle.copyWith(
color: colorScheme.outline.withOpacity(kHintOpacity)),
hintStyle: kCodeStyle.copyWith(color: colorScheme.outlineVariant),
hintText: widget.hintText,
contentPadding: const EdgeInsets.only(bottom: 12),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: colorScheme.primary.withOpacity(
kHintOpacity,
),
color: colorScheme.outline,
),
),
enabledBorder: UnderlineInputBorder(

View File

@ -25,9 +25,7 @@ class URLField extends StatelessWidget {
decoration: InputDecoration(
hintText: kHintTextUrlCard,
hintStyle: kCodeStyle.copyWith(
color: Theme.of(context).colorScheme.outline.withOpacity(
kHintOpacity,
),
color: Theme.of(context).colorScheme.outlineVariant,
),
border: InputBorder.none,
),

View File

@ -16,7 +16,7 @@ class OverlayWidgetTemplate {
_overlay = OverlayEntry(
// replace with your own layout
builder: (context) => ColoredBox(
color: kColorBlack.withOpacity(kOverlayBackgroundOpacity),
color: kColorBlack.withValues(alpha: kOverlayBackgroundOpacity),
child: widget),
);
_overlayState!.insert(_overlay!);

View File

@ -405,14 +405,10 @@ class _BodySuccessState extends State<BodySuccess> {
? kLightCodeTheme
: kDarkCodeTheme;
final textContainerdecoration = BoxDecoration(
color: Color.alphaBlend(
(Theme.of(context).brightness == Brightness.dark
? Theme.of(context).colorScheme.onPrimaryContainer
: Theme.of(context).colorScheme.primaryContainer)
.withOpacity(kForegroundOpacity),
Theme.of(context).colorScheme.surface),
color: Theme.of(context).colorScheme.surfaceContainerLow,
border: Border.all(
color: Theme.of(context).colorScheme.surfaceContainerHighest),
color: Theme.of(context).colorScheme.surfaceContainerHighest,
),
borderRadius: kBorderRadius8,
);

View File

@ -1,4 +1,3 @@
import 'package:apidash_design_system/apidash_design_system.dart';
import 'package:flutter/material.dart';
import 'package:multi_split_view/multi_split_view.dart';
@ -35,10 +34,9 @@ class DashboardSplitViewState extends State<DashboardSplitView> {
data: MultiSplitViewThemeData(
dividerThickness: 3,
dividerPainter: DividerPainters.background(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
highlightedColor: Theme.of(context).colorScheme.outline.withOpacity(
kHintOpacity,
),
color: Theme.of(context).colorScheme.surfaceContainer,
highlightedColor:
Theme.of(context).colorScheme.surfaceContainerHighest,
animationEnabled: false,
),
),

View File

@ -1,4 +1,3 @@
import 'package:apidash_design_system/apidash_design_system.dart';
import 'package:flutter/material.dart';
import 'package:multi_split_view/multi_split_view.dart';
@ -30,10 +29,9 @@ class EqualSplitView extends StatelessWidget {
data: MultiSplitViewThemeData(
dividerThickness: 3,
dividerPainter: DividerPainters.background(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
highlightedColor: Theme.of(context).colorScheme.outline.withOpacity(
kHintOpacity,
),
color: Theme.of(context).colorScheme.surfaceContainer,
highlightedColor:
Theme.of(context).colorScheme.surfaceContainerHighest,
animationEnabled: false,
),
),

View File

@ -1,4 +1,3 @@
import 'package:apidash_design_system/apidash_design_system.dart';
import 'package:flutter/material.dart';
import 'package:multi_split_view/multi_split_view.dart';
@ -35,10 +34,9 @@ class HistorySplitViewState extends State<HistorySplitView> {
data: MultiSplitViewThemeData(
dividerThickness: 3,
dividerPainter: DividerPainters.background(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
highlightedColor: Theme.of(context).colorScheme.outline.withOpacity(
kHintOpacity,
),
color: Theme.of(context).colorScheme.surfaceContainer,
highlightedColor:
Theme.of(context).colorScheme.surfaceContainerHighest,
animationEnabled: false,
),
),

View File

@ -35,8 +35,7 @@ class SegmentedTabbar extends StatelessWidget {
dividerColor: Colors.transparent,
indicatorWeight: 0.0,
indicatorSize: TabBarIndicatorSize.tab,
unselectedLabelColor:
Theme.of(context).colorScheme.onSurface.withOpacity(0.4),
unselectedLabelColor: Theme.of(context).colorScheme.outline,
labelStyle: kTextStyleTab.copyWith(
fontWeight: FontWeight.bold,
color: Theme.of(context).colorScheme.onPrimary,

View File

@ -45,9 +45,7 @@ class RequestDataTable extends StatelessWidget {
contentPadding: const EdgeInsets.only(bottom: 12),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: clrScheme.primary.withOpacity(
kHintOpacity,
),
color: clrScheme.outlineVariant,
),
),
enabledBorder: UnderlineInputBorder(

View File

@ -47,9 +47,7 @@ class RequestFormDataTable extends StatelessWidget {
contentPadding: const EdgeInsets.only(bottom: 12),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: clrScheme.primary.withOpacity(
kHintOpacity,
),
color: clrScheme.outlineVariant,
),
),
enabledBorder: UnderlineInputBorder(

View File

@ -25,13 +25,11 @@ class SidebarRequestCardTextBox extends StatelessWidget {
style: TextStyle(
fontSize: 8,
fontWeight: FontWeight.bold,
color: switch (apiType) {
APIType.rest => getHTTPMethodColor(
method,
color: getAPIColor(
apiType,
method: method,
brightness: Theme.of(context).brightness,
),
APIType.graphql => kColorGQL,
},
),
),
);

View File

@ -1,5 +1,4 @@
import 'dart:io';
import 'dart:typed_data';
import 'package:apidash/consts.dart';
import 'package:fvp/fvp.dart' as fvp;
import 'package:flutter/material.dart';
@ -20,42 +19,43 @@ class VideoPreviewer extends StatefulWidget {
}
class _VideoPreviewerState extends State<VideoPreviewer> {
VideoPlayerController? _videoController;
late VideoPlayerController _videoController;
late Future<void> _initializeVideoPlayerFuture;
bool _isPlaying = false;
File? _tempVideoFile;
late File _tempVideoFile;
bool _showControls = false;
@override
void initState() {
super.initState();
registerWithAllPlatforms();
_initializeVideoPlayer();
_initializeVideoPlayerFuture = _initializeVideoPlayer();
}
void registerWithAllPlatforms() {
try {
fvp.registerWith();
} catch (e) {
// pass
debugPrint("VideoPreviewer registerWithAllPlatforms(): $e");
}
}
void _initializeVideoPlayer() async {
Future<void> _initializeVideoPlayer() async {
final tempDir = await getTemporaryDirectory();
_tempVideoFile = File(
'${tempDir.path}/temp_video_${DateTime.now().millisecondsSinceEpoch}');
try {
await _tempVideoFile?.writeAsBytes(widget.videoBytes);
_videoController = VideoPlayerController.file(_tempVideoFile!)
..initialize().then((_) {
await _tempVideoFile.writeAsBytes(widget.videoBytes);
_videoController = VideoPlayerController.file(_tempVideoFile);
await _videoController.initialize();
if (mounted) {
setState(() {
_videoController!.play();
_videoController!.setLooping(true);
_videoController.play();
_videoController.setLooping(true);
});
}
});
} catch (e) {
debugPrint("VideoPreviewer _initializeVideoPlayer(): $e");
return;
}
}
@ -65,47 +65,48 @@ class _VideoPreviewerState extends State<VideoPreviewer> {
final iconColor = Theme.of(context).iconTheme.color;
final progressBarColors = VideoProgressColors(
playedColor: iconColor!,
bufferedColor: iconColor.withOpacity(0.5),
backgroundColor: iconColor.withOpacity(0.3),
bufferedColor: iconColor.withValues(alpha: 0.5),
backgroundColor: iconColor.withValues(alpha: 0.3),
);
return Scaffold(
body: MouseRegion(
body: FutureBuilder(
future: _initializeVideoPlayerFuture,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
if (_videoController.value.isInitialized) {
return MouseRegion(
onEnter: (_) => setState(() => _showControls = true),
onExit: (_) => setState(() => _showControls = false),
child: Stack(
children: [
Center(
child: _videoController?.value.isInitialized == true
? AspectRatio(
aspectRatio: _videoController!.value.aspectRatio,
child: VideoPlayer(_videoController!),
)
: const CircularProgressIndicator(),
child: AspectRatio(
aspectRatio: _videoController.value.aspectRatio,
child: VideoPlayer(_videoController),
),
),
Positioned(
left: 0,
right: 0,
bottom: 0,
child: _videoController?.value.isInitialized == true
? SizedBox(
child: SizedBox(
height: 50.0,
child: VideoProgressIndicator(
_videoController!,
_videoController,
allowScrubbing: true,
padding: const EdgeInsets.all(20),
colors: progressBarColors,
),
)
: Container(height: 0),
),
),
if (_showControls)
Center(
child: GestureDetector(
onTap: () {
if (_videoController!.value.isPlaying) {
_videoController!.pause();
if (_videoController.value.isPlaying) {
_videoController.pause();
} else {
_videoController!.play();
_videoController.play();
}
setState(() {
_isPlaying = !_isPlaying;
@ -123,21 +124,25 @@ class _VideoPreviewerState extends State<VideoPreviewer> {
),
],
),
);
}
}
return const Center(child: CircularProgressIndicator());
},
),
);
}
@override
void dispose() {
_videoController?.pause();
_videoController?.dispose();
_videoController.pause();
_videoController.dispose();
if (!kIsRunningTests) {
Future.delayed(const Duration(seconds: 1), () async {
try {
if (_tempVideoFile != null) {
await _tempVideoFile!.delete();
}
await _tempVideoFile.delete();
} catch (e) {
debugPrint("VideoPreviewer dispose(): $e");
return;
}
});

View File

@ -1,5 +1,4 @@
import 'package:apidash_core/consts.dart';
import 'package:collection/collection.dart';
import 'package:seed/seed.dart';
import '../models/models.dart';
import 'graphql_utils.dart';
@ -52,7 +51,7 @@ List<Map<String, String>>? rowsToFormDataMapList(
"value": formData.value,
"type": formData.type.name,
})
.whereNotNull()
.nonNulls
.toList();
return finalMap;
}

View File

@ -15,12 +15,12 @@ dependencies:
curl_parser:
path: ../curl_parser
freezed_annotation: ^2.4.1
http: ^1.2.1
http_parser: ^4.0.2
postman:
path: ../postman
http: ^1.3.0
http_parser: ^4.1.2
insomnia_collection:
path: ../insomnia_collection
postman:
path: ../postman
seed: ^0.0.3
xml: ^6.3.0

View File

@ -1,4 +1,4 @@
# melos_managed_dependency_overrides: curl_parser,postman,seed,insomnia_collection
# melos_managed_dependency_overrides: curl_parser,insomnia_collection,postman,seed
dependency_overrides:
curl_parser:
path: ../curl_parser

View File

@ -6,7 +6,7 @@ const kColorTransparent = Colors.transparent;
const kColorWhite = Colors.white;
const kColorBlack = Colors.black;
const kColorRed = Colors.red;
final kColorLightDanger = Colors.red.withOpacity(0.9);
final kColorLightDanger = Colors.red.withValues(alpha: 0.9);
const kColorDarkDanger = Color(0xffcf6679);
const kColorSchemeSeed = Colors.blue;

View File

@ -71,19 +71,13 @@ class ADOutlinedTextField extends StatelessWidget {
hintStyle: hintTextStyle ??
kCodeStyle.copyWith(
fontSize: hintTextFontSize,
color: hintTextColor ??
clrScheme.outline.withOpacity(
kHintOpacity,
),
color: hintTextColor ?? clrScheme.outlineVariant,
),
hintText: hintText,
contentPadding: contentPadding ?? kP10,
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: focussedBorderColor ??
clrScheme.primary.withOpacity(
kHintOpacity,
),
color: focussedBorderColor ?? clrScheme.outline,
),
),
enabledBorder: OutlineInputBorder(

View File

@ -88,7 +88,7 @@ JsonExplorer(
fontSize: 16,
),
propertyKeyTextStyle: GoogleFonts.inconsolata(
color: Colors.black.withOpacity(0.7),
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 16,
),

View File

@ -284,7 +284,7 @@ class _JsonExplorerPageState extends State<JsonExplorerPage> {
fontSize: 16,
),
propertyKeyTextStyle: GoogleFonts.inconsolata(
color: Colors.black.withOpacity(0.7),
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 16,
),

View File

@ -46,8 +46,8 @@ void main() {
fontWeight: FontWeight.bold,
fontSize: 18,
),
propertyKeyTextStyle: TextStyle(
color: Colors.black.withOpacity(0.7),
propertyKeyTextStyle: const TextStyle(
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 18,
),

View File

@ -5,23 +5,18 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab"
sha256: dc27559385e905ad30838356c5f5d574014ba39872d732111cd07ac0beff4c57
url: "https://pub.dev"
source: hosted
version: "76.0.0"
_macros:
dependency: transitive
description: dart
source: sdk
version: "0.3.3"
version: "80.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e"
sha256: "192d1c5b944e7e53b24b5586db760db934b177d4147c42fbca8c8c5f1eb8d11e"
url: "https://pub.dev"
source: hosted
version: "6.11.0"
version: "7.3.0"
ansi_styles:
dependency: transitive
description:
@ -56,10 +51,10 @@ packages:
dependency: transitive
description:
name: archive
sha256: "528579c7e4579719f04b21eeeeddfd73a18b31dabc22766893b7d1be7f49b967"
sha256: "0c64e928dcbefddecd234205422bcfc2b5e6d31be0b86fef0d0dd48d7b4c9742"
url: "https://pub.dev"
source: hosted
version: "4.0.3"
version: "4.0.4"
args:
dependency: transitive
description:
@ -88,10 +83,10 @@ packages:
dependency: transitive
description:
name: barcode
sha256: "7b6729c37e3b7f34233e2318d866e8c48ddb46c1f7ad01ff7bb2a8de1da2b9f4"
sha256: ab180ce22c6555d77d45f0178a523669db67f95856e3378259ef2ffeb43e6003
url: "https://pub.dev"
source: hosted
version: "2.2.9"
version: "2.2.8"
bidi:
dependency: transitive
description:
@ -100,6 +95,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.12"
binary_codec:
dependency: transitive
description:
name: binary_codec
sha256: "368144225d749e1e33f2f4628d0c70bffff99b99b1d6c0777b039f8967365b07"
url: "https://pub.dev"
source: hosted
version: "2.0.3"
boolean_selector:
dependency: transitive
description:
@ -120,18 +123,18 @@ packages:
dependency: transitive
description:
name: build_config
sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33"
sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1
url: "https://pub.dev"
source: hosted
version: "1.1.2"
version: "1.1.1"
build_daemon:
dependency: transitive
description:
name: build_daemon
sha256: "8e928697a82be082206edb0b9c99c5a4ad6bc31c9e9b8b2f291ae65cd4a25daa"
sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9"
url: "https://pub.dev"
source: hosted
version: "4.0.4"
version: "4.0.2"
build_resolvers:
dependency: transitive
description:
@ -168,10 +171,10 @@ packages:
dependency: transitive
description:
name: built_value
sha256: "8b158ab94ec6913e480dc3f752418348b5ae099eb75868b5f4775f0572999c61"
sha256: "28a712df2576b63c6c005c465989a348604960c0958d28be5303ba9baa841ac2"
url: "https://pub.dev"
source: hosted
version: "8.9.4"
version: "8.9.3"
characters:
dependency: transitive
description:
@ -204,6 +207,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.3.0"
ci:
dependency: transitive
description:
name: ci
sha256: "145d095ce05cddac4d797a158bc4cf3b6016d1fe63d8c3d2fbd7212590adca13"
url: "https://pub.dev"
source: hosted
version: "0.1.0"
cli_launcher:
dependency: transitive
description:
@ -311,10 +322,10 @@ packages:
dependency: "direct main"
description:
name: dart_style
sha256: "7306ab8a2359a48d22310ad823521d723acfed60ee1f7e37388e8986853b6820"
sha256: "27eb0ae77836989a3bc541ce55595e8ceee0992807f14511552a898ddd0d88ac"
url: "https://pub.dev"
source: hosted
version: "2.3.8"
version: "3.0.1"
dartx:
dependency: transitive
description:
@ -335,10 +346,10 @@ packages:
dependency: "direct main"
description:
name: desktop_drop
sha256: d55a010fe46c8e8fcff4ea4b451a9ff84a162217bdb3b2a0aa1479776205e15d
sha256: "03abf1c0443afdd1d65cf8fa589a2f01c67a11da56bbb06f6ea1de79d5628e94"
url: "https://pub.dev"
source: hosted
version: "0.4.4"
version: "0.5.0"
equatable:
dependency: transitive
description:
@ -379,30 +390,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.2"
fetch_api:
dependency: transitive
description:
name: fetch_api
sha256: "97f46c25b480aad74f7cc2ad7ccba2c5c6f08d008e68f95c1077286ce243d0e6"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
fetch_client:
dependency: transitive
description:
name: fetch_client
sha256: "9666ee14536778474072245ed5cba07db81ae8eb5de3b7bf4a2d1e2c49696092"
url: "https://pub.dev"
source: hosted
version: "1.1.2"
ffi:
dependency: transitive
description:
name: ffi
sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418"
sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
version: "2.1.3"
file:
dependency: transitive
description:
@ -471,10 +466,10 @@ packages:
dependency: transitive
description:
name: file_selector_windows
sha256: "320fcfb6f33caa90f0b58380489fc5ac05d99ee94b61aa96ec2bff0ba81d3c2b"
sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4"
url: "https://pub.dev"
source: hosted
version: "0.9.3+4"
version: "0.9.3+3"
fixnum:
dependency: transitive
description:
@ -487,18 +482,18 @@ packages:
dependency: "direct main"
description:
name: flex_color_scheme
sha256: "32914024a4f404d90ff449f58d279191675b28e7c08824046baf06826e99d984"
sha256: ae638050fceb35b6040a43cf67892f9b956022068e736284919d93322fdd4ba2
url: "https://pub.dev"
source: hosted
version: "7.3.1"
version: "8.1.1"
flex_seed_scheme:
dependency: transitive
description:
name: flex_seed_scheme
sha256: "4cee2f1d07259f77e8b36f4ec5f35499d19e74e17c7dce5b819554914082bc01"
sha256: d3ba3c5c92d2d79d45e94b4c6c71d01fac3c15017da1545880c53864da5dfeb0
url: "https://pub.dev"
source: hosted
version: "1.5.0"
version: "3.5.0"
flutter:
dependency: "direct main"
description: flutter
@ -509,22 +504,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_highlighter:
dependency: "direct main"
description:
name: flutter_highlighter
sha256: "93173afd47a9ada53f3176371755e7ea4a1065362763976d06d6adfb4d946e10"
url: "https://pub.dev"
source: hosted
version: "0.1.1"
flutter_hooks:
dependency: "direct main"
description:
name: flutter_hooks
sha256: cde36b12f7188c85286fba9b38cc5a902e7279f36dd676967106c041dc9dde70
sha256: b772e710d16d7a20c0740c4f855095026b31c7eb5ba3ab67d2bd52021cd9461d
url: "https://pub.dev"
source: hosted
version: "0.20.5"
version: "0.21.2"
flutter_keyboard_visibility:
dependency: transitive
description:
@ -577,18 +564,18 @@ packages:
dependency: "direct dev"
description:
name: flutter_launcher_icons
sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea"
sha256: bfa04787c85d80ecb3f8777bde5fc10c3de809240c48fa061a2c2bf15ea5211c
url: "https://pub.dev"
source: hosted
version: "0.13.1"
version: "0.14.3"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
version: "5.0.0"
flutter_markdown:
dependency: "direct main"
description:
@ -651,10 +638,10 @@ packages:
dependency: "direct dev"
description:
name: freezed
sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e"
sha256: "59a584c24b3acdc5250bb856d0d3e9c0b798ed14a4af1ddb7dc1c7b41df91c9c"
url: "https://pub.dev"
source: hosted
version: "2.5.7"
version: "2.5.8"
freezed_annotation:
dependency: transitive
description:
@ -680,18 +667,18 @@ packages:
dependency: "direct main"
description:
name: fvp
sha256: "040aa12beccd5bc60631259f27a481c4abc11a389aa4f57a47b643f58fe0b060"
sha256: f5012756985f7c8c19caaea2d65baf8a6cf5fee9fe520e1fabb8bc61e1d5f468
url: "https://pub.dev"
source: hosted
version: "0.26.1"
version: "0.30.0"
glob:
dependency: transitive
description:
name: glob
sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de
sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
url: "https://pub.dev"
source: hosted
version: "2.1.3"
version: "2.1.2"
google_fonts:
dependency: transitive
description:
@ -740,6 +727,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.6.1"
hotreloader:
dependency: transitive
description:
name: hotreloader
sha256: bc167a1163807b03bada490bfe2df25b0d744df359227880220a5cbd04e5734b
url: "https://pub.dev"
source: hosted
version: "4.3.0"
html:
dependency: transitive
description:
@ -787,7 +782,7 @@ packages:
sha256: "13d3349ace88f12f4a0d175eb5c12dcdd39d35c4c109a8a13dfeb6d0bd9e31c3"
url: "https://pub.dev"
source: hosted
version: "4.3.0"
version: "4.5.3"
insomnia_collection:
dependency: transitive
description:
@ -816,6 +811,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.5"
jaspr:
dependency: transitive
description:
name: jaspr
sha256: "1bc6dfd4e00ac45e85efff80e457ff5fb7a40ed05828f8046b130cc6bfe7fd36"
url: "https://pub.dev"
source: hosted
version: "0.15.2"
jinja:
dependency: "direct main"
description:
@ -828,10 +831,10 @@ packages:
dependency: transitive
description:
name: js
sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc"
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.7.2"
version: "0.6.7"
json_annotation:
dependency: "direct main"
description:
@ -851,10 +854,10 @@ packages:
dependency: "direct dev"
description:
name: json_serializable
sha256: c2fcb3920cf2b6ae6845954186420fca40bc0a8abcc84903b7801f17d7050d7c
sha256: "81f04dee10969f89f604e1249382d46b97a1ccad53872875369622b5bfc9e58a"
url: "https://pub.dev"
source: hosted
version: "6.9.0"
version: "6.9.4"
json_text_field:
dependency: "direct main"
description:
@ -931,10 +934,10 @@ packages:
dependency: transitive
description:
name: lints
sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7
url: "https://pub.dev"
source: hosted
version: "4.0.0"
version: "5.1.1"
logging:
dependency: transitive
description:
@ -951,14 +954,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.3.1"
macros:
dependency: transitive
description:
name: macros
sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656"
url: "https://pub.dev"
source: hosted
version: "0.1.3-main.0"
markdown:
dependency: "direct main"
description:
@ -1070,14 +1065,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.2"
ollama_dart:
dependency: "direct main"
description:
name: ollama_dart
sha256: "4e40bc499b6fe46ba54a004d2da601c40bd73d66e3f18cf7b03225ccf3d481a6"
url: "https://pub.dev"
source: hosted
version: "0.2.2+1"
package_config:
dependency: transitive
description:
@ -1186,10 +1173,10 @@ packages:
dependency: transitive
description:
name: petitparser
sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646"
sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
url: "https://pub.dev"
source: hosted
version: "6.1.0"
version: "6.0.2"
platform:
dependency: transitive
description:
@ -1265,10 +1252,10 @@ packages:
dependency: "direct main"
description:
name: printing
sha256: "482cd5a5196008f984bb43ed0e47cbfdca7373490b62f3b27b3299275bf22a93"
sha256: b535d177fc6e8f8908e19b0ff5c1d4a87e3c4d0bf675e05aa2562af1b7853906
url: "https://pub.dev"
source: hosted
version: "5.14.2"
version: "5.13.4"
process:
dependency: transitive
description:
@ -1294,7 +1281,7 @@ packages:
source: hosted
version: "6.1.2"
pub_semver:
dependency: transitive
dependency: "direct main"
description:
name: pub_semver
sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd"
@ -1425,10 +1412,10 @@ packages:
dependency: transitive
description:
name: shared_preferences_android
sha256: a768fc8ede5f0c8e6150476e14f38e2417c0864ca36bb4582be8e21925a03c22
sha256: "02a7d8a9ef346c9af715811b01fbd8e27845ad2c41148eefd31321471b41863d"
url: "https://pub.dev"
source: hosted
version: "2.4.6"
version: "2.4.0"
shared_preferences_foundation:
dependency: transitive
description:
@ -1457,10 +1444,10 @@ packages:
dependency: transitive
description:
name: shared_preferences_web
sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019
sha256: d2ca4132d3946fec2184261726b355836a82c33d7d5b67af32692aff18a4684e
url: "https://pub.dev"
source: hosted
version: "2.4.3"
version: "2.4.2"
shared_preferences_windows:
dependency: transitive
description:
@ -1473,10 +1460,18 @@ packages:
dependency: transitive
description:
name: shelf
sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12
sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
url: "https://pub.dev"
source: hosted
version: "1.4.2"
version: "1.4.1"
shelf_gzip:
dependency: transitive
description:
name: shelf_gzip
sha256: "4f4b793c0f969f348aece1ab4cc05fceba9fea431c1ce76b1bc0fa369cecfc15"
url: "https://pub.dev"
source: hosted
version: "4.1.0"
shelf_packages_handler:
dependency: transitive
description:
@ -1485,6 +1480,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.2"
shelf_proxy:
dependency: transitive
description:
name: shelf_proxy
sha256: a71d2307f4393211930c590c3d2c00630f6c5a7a77edc1ef6436dfd85a6a7ee3
url: "https://pub.dev"
source: hosted
version: "1.0.4"
shelf_static:
dependency: transitive
description:
@ -1497,10 +1500,10 @@ packages:
dependency: transitive
description:
name: shelf_web_socket
sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925"
sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67
url: "https://pub.dev"
source: hosted
version: "3.0.0"
version: "2.0.1"
shlex:
dependency: transitive
description:
@ -1518,10 +1521,10 @@ packages:
dependency: transitive
description:
name: source_gen
sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832"
sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b"
url: "https://pub.dev"
source: hosted
version: "1.5.0"
version: "2.0.0"
source_helper:
dependency: transitive
description:
@ -1558,10 +1561,10 @@ packages:
dependency: "direct dev"
description:
name: spot
sha256: "648cd3e9f9b336d005a4dcde24538e44edc72b8d548e0416fa93c0541655f219"
sha256: "8743e97055bbd22d0eb33d25673aa6dafee7c6eaa869860d0f5a68b7348e12bc"
url: "https://pub.dev"
source: hosted
version: "0.13.0"
version: "0.17.0"
sprintf:
dependency: transitive
description:
@ -1742,18 +1745,18 @@ packages:
dependency: transitive
description:
name: url_launcher_web
sha256: "3ba963161bd0fe395917ba881d320b9c4f6dd3c4a233da62ab18a5025c85f1e9"
sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e"
url: "https://pub.dev"
source: hosted
version: "2.4.0"
version: "2.3.3"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77"
sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4"
url: "https://pub.dev"
source: hosted
version: "3.1.4"
version: "3.1.3"
uuid:
dependency: "direct main"
description:
@ -1766,18 +1769,18 @@ packages:
dependency: transitive
description:
name: vector_graphics
sha256: "44cc7104ff32563122a929e4620cf3efd584194eec6d1d913eb5ba593dbcf6de"
sha256: "27d5fefe86fb9aace4a9f8375b56b3c292b64d8c04510df230f849850d912cb7"
url: "https://pub.dev"
source: hosted
version: "1.1.18"
version: "1.1.15"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"
sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb"
url: "https://pub.dev"
source: hosted
version: "1.1.13"
version: "1.1.12"
vector_graphics_compiler:
dependency: "direct main"
description:
@ -1806,18 +1809,18 @@ packages:
dependency: transitive
description:
name: video_player_android
sha256: "7018dbcb395e2bca0b9a898e73989e67c0c4a5db269528e1b036ca38bcca0d0b"
sha256: "391e092ba4abe2f93b3e625bd6b6a6ec7d7414279462c1c0ee42b5ab8d0a0898"
url: "https://pub.dev"
source: hosted
version: "2.7.17"
version: "2.7.16"
video_player_avfoundation:
dependency: transitive
description:
name: video_player_avfoundation
sha256: "84b4752745eeccb6e75865c9aab39b3d28eb27ba5726d352d45db8297fbd75bc"
sha256: "33224c19775fd244be2d6e3dbd8e1826ab162877bd61123bf71890772119a2b7"
url: "https://pub.dev"
source: hosted
version: "2.7.0"
version: "2.6.5"
video_player_platform_interface:
dependency: "direct main"
description:
@ -1830,10 +1833,10 @@ packages:
dependency: transitive
description:
name: video_player_web
sha256: "3ef40ea6d72434edbfdba4624b90fd3a80a0740d260667d91e7ecd2d79e13476"
sha256: "881b375a934d8ebf868c7fb1423b2bfaa393a0a265fa3f733079a86536064a10"
url: "https://pub.dev"
source: hosted
version: "2.3.4"
version: "2.3.3"
vm_service:
dependency: transitive
description:
@ -1854,10 +1857,10 @@ packages:
dependency: "direct overridden"
description:
name: web
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "1.1.1"
web_socket:
dependency: transitive
description:
@ -1870,10 +1873,10 @@ packages:
dependency: transitive
description:
name: web_socket_channel
sha256: "0b8e2457400d8a859b7b2030786835a28a8e80836ef64402abef392ff4f1d0e5"
sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
version: "3.0.1"
webdriver:
dependency: transitive
description:
@ -1894,10 +1897,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: b89e6e24d1454e149ab20fbb225af58660f0c0bf4475544650700d8e2da54aef
sha256: "8b338d4486ab3fbc0ba0db9f9b4f5239b6697fcee427939a40e720cbb9ee0a69"
url: "https://pub.dev"
source: hosted
version: "5.11.0"
version: "5.9.0"
window_manager:
dependency: "direct main"
description:
@ -1943,10 +1946,10 @@ packages:
dependency: transitive
description:
name: yaml_edit
sha256: fb38626579fb345ad00e674e2af3a5c9b0cc4b9bfb8fd7f7ff322c7c9e62aef5
sha256: e9c1a3543d2da0db3e90270dbb1e4eebc985ee5e3ffe468d83224472b2194a5f
url: "https://pub.dev"
source: hosted
version: "2.2.2"
version: "2.2.1"
sdks:
dart: ">=3.7.0 <3.999.0"
flutter: ">=3.27.0"
dart: ">=3.7.0-0 <3.999.0"
flutter: ">=3.29.0"

View File

@ -115,7 +115,6 @@ void main() {
label.style?.color,
equals(Theme.of(tester.element(find.byKey(testKey)))
.colorScheme
.onSurface
.withOpacity(0.65)));
.onSurfaceVariant));
});
}

View File

@ -71,77 +71,115 @@ void main() {
});
});
group("Testing getAPIColor function", () {
HTTPVerb methodGet = HTTPVerb.get;
Color colMethodGetDarkModeExpected = getDarkModeColor(kColorHttpMethodGet);
test('Test getAPIColor for GET method dark mode', () {
expect(
getAPIColor(
APIType.rest,
method: methodGet,
brightness: dark,
),
colMethodGetDarkModeExpected);
});
HTTPVerb methodHead = HTTPVerb.head;
Color colMethodHeadDarkModeExpected =
getDarkModeColor(kColorHttpMethodHead);
test('Test getHTTPMethodColor for HEAD Method dark mode', () {
expect(
getAPIColor(
APIType.rest,
method: methodHead,
brightness: dark,
),
colMethodHeadDarkModeExpected);
});
HTTPVerb methodPatch = HTTPVerb.patch;
Color colMethodPatchDarkModeExpected =
getDarkModeColor(kColorHttpMethodPatch);
test('Test getHTTPMethodColor for PATCH Method dark mode', () {
expect(
getAPIColor(
APIType.rest,
method: methodPatch,
brightness: dark,
),
colMethodPatchDarkModeExpected);
});
HTTPVerb methodPut = HTTPVerb.put;
Color colMethodPutDarkModeExpected = getDarkModeColor(kColorHttpMethodPut);
test('Test getHTTPMethodColor for PUT Method dark mode', () {
expect(
getAPIColor(
APIType.rest,
method: methodPut,
brightness: dark,
),
colMethodPutDarkModeExpected);
});
HTTPVerb methodPost = HTTPVerb.post;
Color colMethodPostDarkModeExpected =
getDarkModeColor(kColorHttpMethodPost);
test('Test getHTTPMethodColor for POST Method dark mode', () {
expect(
getAPIColor(
APIType.rest,
method: methodPost,
brightness: dark,
),
colMethodPostDarkModeExpected);
});
HTTPVerb methodDelete = HTTPVerb.delete;
Color colMethodDeleteDarkModeExpected =
getDarkModeColor(kColorHttpMethodDelete);
test('Test getHTTPMethodColor for DELETE Method dark mode', () {
expect(
getAPIColor(
APIType.rest,
method: methodDelete,
brightness: dark,
),
colMethodDeleteDarkModeExpected);
});
});
group("Testing getHTTPMethodColor function", () {
HTTPVerb methodGet = HTTPVerb.get;
test('Test getHTTPMethodColor for GET method', () {
expect(getHTTPMethodColor(methodGet), kColorHttpMethodGet);
});
Color colMethodGetDarkModeExpected = getDarkModeColor(kColorHttpMethodGet);
test('Test getHTTPMethodColor for GET method dark mode', () {
expect(getHTTPMethodColor(methodGet, brightness: dark),
colMethodGetDarkModeExpected);
});
HTTPVerb methodHead = HTTPVerb.head;
test('Test getHTTPMethodColor for HEAD Method', () {
expect(getHTTPMethodColor(methodHead), kColorHttpMethodHead);
});
Color colMethodHeadDarkModeExpected =
getDarkModeColor(kColorHttpMethodHead);
test('Test getHTTPMethodColor for HEAD Method dark mode', () {
expect(getHTTPMethodColor(methodHead, brightness: dark),
colMethodHeadDarkModeExpected);
});
HTTPVerb methodPatch = HTTPVerb.patch;
test('Test getHTTPMethodColor for PATCH Method', () {
expect(getHTTPMethodColor(methodPatch), kColorHttpMethodPatch);
});
Color colMethodPatchDarkModeExpected =
getDarkModeColor(kColorHttpMethodPatch);
test('Test getHTTPMethodColor for PATCH Method dark mode', () {
expect(getHTTPMethodColor(methodPatch, brightness: dark),
colMethodPatchDarkModeExpected);
});
HTTPVerb methodPut = HTTPVerb.put;
test('Test getHTTPMethodColor for PUT Method', () {
expect(getHTTPMethodColor(methodPut), kColorHttpMethodPut);
});
Color colMethodPutDarkModeExpected = getDarkModeColor(kColorHttpMethodPut);
test('Test getHTTPMethodColor for PUT Method dark mode', () {
expect(getHTTPMethodColor(methodPut, brightness: dark),
colMethodPutDarkModeExpected);
});
HTTPVerb methodPost = HTTPVerb.post;
test('Test getHTTPMethodColor for POST Method', () {
expect(getHTTPMethodColor(methodPost), kColorHttpMethodPost);
});
Color colMethodPostDarkModeExpected =
getDarkModeColor(kColorHttpMethodPost);
test('Test getHTTPMethodColor for POST Method dark mode', () {
expect(getHTTPMethodColor(methodPost, brightness: dark),
colMethodPostDarkModeExpected);
});
HTTPVerb methodDelete = HTTPVerb.delete;
test('Test getHTTPMethodColor for DELETE Method', () {
expect(getHTTPMethodColor(methodDelete), kColorHttpMethodDelete);
});
Color colMethodDeleteDarkModeExpected =
getDarkModeColor(kColorHttpMethodDelete);
test('Test getHTTPMethodColor for DELETE Method dark mode', () {
expect(getHTTPMethodColor(methodDelete, brightness: dark),
colMethodDeleteDarkModeExpected);
});
});
group('Testing getScaffoldKey function', () {