Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Jatis Flutter GeneratorNew to Visual Studio Code? Get it now.
Jatis Flutter Generator

Jatis Flutter Generator

hakanon

|
17 installs
| (0) | Free
Generate Flutter presentations with consistent architecture patterns
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Jatis Flutter Generator

A comprehensive VS Code extension for generating Flutter presentations, dependencies, and services following Jatis standardization. Built with consistent architecture patterns, complete unit testing, and flexible configuration options to ensure team-wide development consistency.

Features

🚀 Flutter Project Creation

  • Complete Flutter project setup with automatic platform configuration
  • Platform detection and enabling - automatically enables disabled platforms (web, windows, linux, macos)
  • Multi-platform support with customizable platform selection
  • Automatic project opening after successful creation
  • Flutter installation validation before project creation
  • Streamlined workflow with just project name and platform inputs

🏗️ Presentation Generation

  • Generate complete Flutter presentations with consistent architecture patterns
  • Creates organized folder structure: constants, controller, service, model, view
  • Additional controller functions with custom input prompt (e.g., getUserData, updateProfile)
  • Automatic test generation for all components including additional functions
  • Generates clean, maintainable code following best practices

🔧 Dependency Management

  • Generate dependency classes with reusable components
  • Additional dependency functions with custom input prompt (e.g., initialize, configure, cleanup)
  • Automatic dependency test generation for reliable code including additional functions
  • Organized code structure with clear separation

📋 Model Generation from JSON

  • Generate Dart models from JSON with automatic type detection and conversion
  • Nested model support - automatically creates separate model files for nested objects
  • Plural-to-singular conversion - converts array names like users → User model
  • Smart type mapping - generates proper Dart types (List<User>, String, int, etc.)
  • Directory selection - choose target directory within lib/ folder with history tracking
  • JSON validation - real-time validation with preview before generation
  • Comprehensive model methods - fromJson, toJson, toString, and proper constructors

⚙️ Service Generation

  • Generate standalone service classes with interface-implementation pattern
  • Additional service functions with custom input prompt (e.g., authenticate, refreshToken, logout)
  • Configurable service paths for organized code structure
  • Automatic service test generation with comprehensive test setup including additional functions
  • Clean separation between business logic and presentation layer

🧪 Testing & Build Tools

  • Automated test file generation for all presentations, dependencies, and services
  • Testing framework setup with automatic mock generation
  • Build runner support with easy directory selection
  • Test coverage reports to ensure code quality
  • GetX state management package installation and configuration
  • History tracking for recently used directories and files

🌐 Network Layer Generation

  • Complete Dio-based HTTP client with SOLID principles and clean architecture
  • Automatic network layer generation when creating Flutter projects
  • Multi-service support with API client factory for different base URLs
  • Comprehensive error handling with typed exceptions (Network, Timeout, Server, Certificate, Serialization)
  • Request/response logging with built-in logging interceptor
  • SSL certificate pinning for enhanced security
  • Flavor system integration for environment-specific base URLs
  • GetX dependency injection with automatic AppBinding registration
  • Generic type support for automatic JSON serialization/deserialization
  • Configurable timeouts and custom headers support
  • Generic type support for automatic JSON serialization/deserialization

🔒 Secure Storage Generation

  • Complete Secure Storage Service using flutter_secure_storage
  • Automatic storage layer generation when creating Flutter projects
  • Unified service implementation in secure_storage_service.dart
  • Centralized keys management via StorageKeys abstract class
  • Comprehensive error handling with SecureStorageException
  • Automatic AppBinding registration for dependency injection
  • Full unit test coverage including key verification

⚙️ Configuration Management

  • Flexible path configuration to organize your project structure
  • Easy setup with user-friendly configuration options
  • Clean import paths in generated code
  • Package version management for testing and build tools
  • Project-level settings with simple setup interface

Installation

  1. Install from VS Code Marketplace: Jatis Flutter Generator
  2. Or install manually:
    code --install-extension hakanon.jatis-flutter-generator
    

Usage

Create Flutter Project

  1. Right-click on any folder in Explorer or use Command Palette
  2. Select "Create Flutter Project" from context menu
  3. Enter project name (follows Flutter naming conventions)
  4. Select target platforms (default: android,ios)
    • Supports: android, ios, web, windows, macos, linux
    • Extension automatically enables disabled platforms
  5. Project is created and automatically opened in VS Code

Example Project Creation:

Input: my_flutter_app
Platforms: web,windows,linux

Result:
✓ Enables Flutter platforms (if disabled): web, windows, linux
✓ Creates project with platform directories:
  - android/
  - ios/
  - web/
  - windows/
  - linux/
✓ Automatically opens the new project

Included Network Layer: The generated project includes a complete network layer at lib/base/network/:

lib/base/network/
├── api_client_interface.dart          # HTTP client contract
├── dio_api_client.dart                # Dio implementation
├── api_client_config.dart             # Configuration object
├── api_client_factory.dart            # Multi-service support
├── api_client_exception.dart          # Typed exceptions
└── interceptors/
    └── logging_interceptor.dart       # Request/response logging

test/base/network/
├── dio_api_client_test.dart
├── api_client_factory_test.dart
├── api_client_config_test.dart
└── interceptors/
    └── logging_interceptor_test.dart

The API client is automatically registered in lib/base/binding/app_binding.dart and integrated with the flavor system for environment-specific base URLs.

Included Storage Layer: The generated project includes a secure storage layer at lib/base/storage/:

lib/base/storage/
├── secure_storage_service.dart        # Implementation, Interface, and Exceptions
├── storage_keys.dart                  # Centralized storage keys
└── README.md                          # Documentation

test/base/storage/
├── secure_storage_service_test.dart   # Service tests
└── storage_keys_test.dart             # Key verification tests

The storage service is automatically registered in lib/base/binding/app_binding.dart as StorageServiceInterface.

Generate Presentation

  1. Right-click on any folder in Explorer
  2. Select "Generate Presentation" from context menu
  3. Enter presentation name (e.g., user_profile, payment)
  4. Presentation and tests are automatically created

Generated Structure:

lib/presentation/user_profile/           # Configurable: lib/{moduleSubpath}/
├── constants/user_profile_constant.dart
├── controller/
│   ├── user_profile_controller.dart
│   └── user_profile_binding.dart
├── model/user_profile_viewmodel.dart
├── service/user_profile_service.dart
└── view/user_profile_page.dart

test/presentation/user_profile/          # Configurable: test/{testSubpath}/
├── constants/user_profile_constant_test.dart
├── controller/
│   ├── user_profile_controller_test.dart
│   └── user_profile_binding_test.dart
├── model/user_profile_viewmodel_test.dart
└── service/user_profile_service_test.dart

Generate Dependencies

  1. Right-click on any folder in Explorer
  2. Select "Generate Dependencies" from context menu
  3. Enter dependency name (e.g., database, api_client)
  4. Dependency class and tests are automatically created

Generated Structure:

lib/base/dependencies/database/         # Configurable: lib/{dependenciesSubpath}/
└── database.dart

test/dependencies/database/             # Configurable: test/{dependenciesTestSubpath}/
└── database_test.dart

Generate Service

  1. Right-click on any folder in Explorer
  2. Select "Generate Service" from context menu
  3. Enter service name (e.g., auth, payment, notification)
  4. Service class and tests are automatically created

Generated Structure:

lib/services/auth/                      # Configurable: lib/{serviceSubpath}/
└── auth_service.dart

test/services/auth/                     # Configurable: test/{serviceTestSubpath}/
└── auth_service_test.dart

Create Model from JSON

  1. Right-click on any folder in Explorer or use Command Palette
  2. Select "Create Model from JSON" from context menu
  3. Choose target directory within lib/ folder (with search and history)
  4. Enter model name (e.g., User, ApiResponse, ProductData)
  5. Input JSON data - extension validates and shows preview
  6. Models are automatically generated with nested support

Example JSON Input:

{
  "id": 1,
  "name": "John Doe",
  "email": "john@example.com",
  "hair": {
    "color": "brown",
    "length": "short"
  },
  "users": [
    {
      "name": "Alice",
      "age": 25
    }
  ]
}

Generated Structure:

lib/models/                             # Your selected directory
├── api_response.dart                   # Main model
├── hair.dart                          # Nested object model  
└── user.dart                          # Array element model (users → User)

Generated Model Features:

  • Proper Dart types (int, String, List<User>, etc.)
  • Required/optional parameters based on nullable analysis
  • fromJson() and toJson() methods with proper type conversion
  • toString() method for debugging
  • Null-safe constructor with proper parameter handling

Using the Network Layer

The generated network layer provides a complete HTTP client ready to use in your services. Here's how to integrate it:

Basic Usage in Services

import 'package:get/get.dart';
import '../../base/network/api_client_interface.dart';

class UserService {
  final ApiClientInterface _apiClient = Get.find<ApiClientInterface>();
  
  Future<User> getUser(String id) async {
    return await _apiClient.get<User>(
      '/users/$id',
      parser: (json) => User.fromJson(json),
    );
  }
  
  Future<User> createUser(User user) async {
    return await _apiClient.post<User>(
      '/users',
      data: user.toJson(),
      parser: (json) => User.fromJson(json),
    );
  }
  
  Future<void> deleteUser(String id) async {
    await _apiClient.delete('/users/$id');
  }
}

Multi-Service Configuration

For applications that communicate with multiple backend services:

// In lib/base/binding/app_binding.dart
class AppBinding extends Bindings {
  @override
  void dependencies() {
    var factory = Get.find<ApiClientFactory>();
    
    // Register additional API clients
    factory.registerClient('payment', ApiClientConfig(
      baseUrl: 'https://payment-api.example.com',
      defaultHeaders: {'X-Service': 'payment'},
    ));
    
    factory.registerClient('analytics', ApiClientConfig(
      baseUrl: 'https://analytics-api.example.com',
      enableLogging: false,  // Disable logging for analytics
    ));
  }
}

// In your service
class PaymentService {
  final ApiClientInterface _apiClient = 
    Get.find<ApiClientFactory>().getClient('payment');
  
  Future<PaymentResult> processPayment(PaymentRequest request) async {
    return await _apiClient.post<PaymentResult>(
      '/process',
      data: request.toJson(),
      parser: (json) => PaymentResult.fromJson(json),
    );
  }
}

Custom Headers and Authentication

class AuthenticatedService {
  final ApiClientInterface _apiClient = Get.find<ApiClientInterface>();
  
  Future<Profile> getProfile() async {
    var token = await _getAuthToken();
    
    return await _apiClient.get<Profile>(
      '/profile',
      headers: {
        'Authorization': 'Bearer $token',
        'X-Custom-Header': 'value',
      },
      parser: (json) => Profile.fromJson(json),
    );
  }
}

Error Handling

import '../../base/network/api_client_exception.dart';

class UserService {
  final ApiClientInterface _apiClient = Get.find<ApiClientInterface>();
  
  Future<User?> getUserSafely(String id) async {
    try {
      return await _apiClient.get<User>(
        '/users/$id',
        parser: (json) => User.fromJson(json),
      );
    } on TimeoutException catch (e) {
      print('Request timed out: ${e.message}');
      return null;
    } on ServerException catch (e) {
      print('Server error ${e.statusCode}: ${e.message}');
      return null;
    } on NetworkException catch (e) {
      print('Network error: ${e.message}');
      return null;
    } on ApiClientException catch (e) {
      print('API error: ${e.message}');
      return null;
    }
  }
}

Flavor-Based Configuration

The network layer automatically integrates with the flavor system:

// lib/flavors.dart (generated)
class F {
  static Flavor? appFlavor;

  static String get baseUrl {
    switch (appFlavor) {
      case Flavor.production:
        return 'https://api.production.com';
      case Flavor.uat:
        return 'https://api.uat.com';
      case Flavor.development:
        return 'https://api.development.com';
      default:
        return 'https://api.development.com';
    }
  }
}

// lib/base/binding/app_binding.dart (generated)
class AppBinding extends Bindings {
  @override
  void dependencies() {
    var factory = ApiClientFactory(
      defaultConfig: ApiClientConfig(
        baseUrl: F.baseUrl,  // Uses flavor-specific URL
        enableLogging: F.appFlavor != Flavor.production,
      ),
    );
    
    factory.registerClient('default', ApiClientConfig(
      baseUrl: F.baseUrl,
    ));
    
    Get.put<ApiClientFactory>(factory, permanent: true);
    Get.put<ApiClientInterface>(
      factory.getClient('default'),
      permanent: true,
    );
  }
}

Build Runner Operations

  • Install Build Runner: Automatically installs build_runner package
  • Run Build Runner: Execute for entire project or specific directories
  • Directory Selection: Choose specific folders to build with history tracking

Package Management

  • Install Packages: Choose from Mockito, Build Runner, or GetX packages with automatic installation
  • Run Test Coverage: Execute tests with coverage reports
  • Directory-specific Testing: Run tests for specific modules or the entire project

Commands

Access via Command Palette (Ctrl+Shift+P / Cmd+Shift+P):

  • Jatis: Create Flutter Project - Create new Flutter project with platform configuration
  • Jatis: Generate Presentation - Create new Flutter presentation module
  • Jatis: Generate Dependencies - Create dependency classes
  • Jatis: Generate Service - Create standalone service classes
  • Jatis: Create Model from JSON - Generate Dart models from JSON input with nested support
  • Jatis: Install Packages - Install Mockito, Build Runner, or GetX packages
  • Jatis: Run Build Runner - Execute build runner with options
  • Jatis: Run Unit Test with Coverage - Execute test coverage
  • Jatis: Configuration - Open settings panel

Configuration

Configure the extension via VS Code Settings or the built-in Configuration UI:

Path Configuration

The extension uses a flexible path system with absolute roots and configurable subpaths:

Setting Default Value Description
jatis.baseModuleSubpath presentation Subpath under lib/ for presentation generation
jatis.baseTestSubpath presentation Subpath under test/ for presentation tests
jatis.baseDependenciesSubpath base/dependencies Subpath under lib/ for dependencies
jatis.baseDependenciesTestSubpath dependencies Subpath under test/ for dependency tests
jatis.baseServiceSubpath services Subpath under lib/ for service generation
jatis.baseServiceTestSubpath services Subpath under test/ for service tests
jatis.mockitoVersion ^5.4.6 Mockito package version
jatis.buildRunnerVersion ^2.5.4 Build runner package version
jatis.getVersion ^4.7.2 Get (GetX) package version

Path Structure

  • Absolute roots (never change): lib/ and test/
  • Configurable subpaths: Set via configuration UI
  • Clean imports: Generated code uses package:myapp/presentation/... (no lib/ prefix)
  • User-friendly: Configure presentation instead of /lib/presentation

Example Configuration:

  • Module Subpath: features/auth → Creates modules in lib/features/auth/
  • Test Subpath: features/auth → Creates tests in test/features/auth/
  • Import paths: package:myapp/features/auth/controller/...

Code Architecture

Controller Pattern

Generated controllers use modern Dart patterns:

class UserProfileController extends GetxController implements UserProfileControllerInterface {
  late final UserProfileServiceInterface _service;
  late final UserProfileViewModel _viewmodel = UserProfileViewModel();

  UserProfileController(this._service);

  @override
  UserProfileViewModel get viewModel => _viewmodel;
}

Dependency Injection

Clean dependency injection with GetX:

class UserProfileBinding extends Bindings {
  @override
  void dependencies() {
    Get.lazyPut<UserProfileServiceInterface>(() => UserProfileService());
    Get.lazyPut<UserProfileControllerInterface>(() => UserProfileController(
          Get.find<UserProfileServiceInterface>(),
        ));
  }
}

Test Generation

Automatically generates comprehensive tests with mockito:

@GenerateMocks([UserProfileServiceInterface])
void main() {
  late UserProfileController controller;
  late MockUserProfileServiceInterface mockService;

  setUp(() {
    mockService = MockUserProfileServiceInterface();
    controller = UserProfileController(mockService);
  });

  group('UserProfileController', () {
    test('should initialize with correct viewModel', () {
      expect(controller.viewModel, isA<UserProfileViewModel>());
    });
  });
}

Requirements

  • Flutter SDK 3.0.0 or higher
  • Dart SDK 2.17.0 or higher
  • VS Code 1.102.0 or higher

Generated Project Dependencies

Projects created with this extension include the following packages:

  • dio (^5.4.3+1) - HTTP client for network requests
  • crypto (^3.0.3) - Cryptographic functions for SSL certificate pinning
  • get (^4.6.6) - State management and dependency injection
  • mockito (^5.4.6) - Mocking framework for testing
  • build_runner (^2.5.4) - Code generation tool

Platform Support

This extension is fully cross-platform compatible and has been tested on:

  • Windows 10/11
  • macOS 13+ (Ventura and later)
  • Linux (Ubuntu 22.04 and other major distributions)

The extension automatically detects your operating system and adjusts command execution, path handling, and shell operations accordingly. No manual configuration is required for cross-platform compatibility.

Release Notes

Version 1.1.10

  • 🐛 Fixed Build Runner on macOS/Linux: Fixed an issue where the build_runner command would fail on zsh (macOS/Linux) due to unquoted glob patterns. Added quotes to the --build-filter argument to ensure cross-platform compatibility.

Version 1.1.9

  • 🔒 Secure Storage Generation: Complete secure storage implementation automatically generated
    • Unified Implementation: SecureStorageService implements StorageServiceInterface in a single file
    • Key Management: StorageKeys class for centralized, safe key management
    • Error Handling: Custom SecureStorageException for robust error catching
    • Dependency Injection: Automatically registered in AppBinding
    • Testing: Comprehensive unit tests for service operations and key constants

Version 1.1.8

  • 🌐 Network Layer Generation: Complete Dio-based HTTP client automatically generated when creating Flutter projects
    • Multi-service support - API client factory for managing multiple backend services with different base URLs
    • Comprehensive error handling - Typed exceptions (NetworkException, TimeoutException, ServerException, CertificateException, SerializationException, CancellationException)
    • Request/response logging - Built-in logging interceptor for debugging HTTP traffic
    • SSL certificate pinning - Enhanced security with certificate fingerprint validation
    • Generic type support - Automatic JSON serialization/deserialization with parser functions
    • Configurable timeouts - Separate connection, receive, and send timeout settings
    • Custom headers - Default headers with per-request override support and precedence rules
    • Base URL override - Per-request base URL override for multi-service scenarios
    • Complete test suite - Unit tests generated for all network layer components
    • Network layer files generated at lib/base/network/ with corresponding tests at test/base/network/
    • Ready-to-use HTTP client following company standards and best practices
  • 🔗 Flavor System Integration: Automatic base URL configuration based on environment (development, UAT, production)
  • 💉 GetX Dependency Injection: Automatic registration in AppBinding for easy service integration
  • 🐛 Fixed Route Name Formatting: Route names in constants now use kebab-case instead of snake_case
    • Module name transaction_detail now generates route /transaction-detail-page instead of /transaction_detail-page
    • Applies to both constant files and constant test files
    • Added toKebabCase() utility function for consistent naming
  • 🌍 Cross-Platform Support: Full compatibility with macOS and Linux
    • Automatic platform detection (Windows, macOS, Linux)
    • Platform-specific shell configuration for command execution
    • Cross-platform path handling and normalization
    • Proper command escaping for all platforms
    • Tested on Windows 10/11, macOS 13+, and Ubuntu 22.04
    • No manual configuration required - works out of the box on all platforms

Version 1.1.7

  • 📋 Model Generation from JSON: New comprehensive JSON-to-Dart model generation feature
    • New "Create Model from JSON" command available in context menu and Command Palette
    • Smart JSON validation with real-time error checking and formatted preview
    • Nested model support - automatically detects and creates separate model files for nested objects
    • Plural-to-singular conversion - intelligently converts array names (e.g., users → User model)
    • Advanced type mapping - generates proper Dart types (List<User>, String, int, double, bool)
    • Directory selection within lib/ - focused directory picker showing only lib/ subdirectories with search and history
    • Template architecture refactor - moved model generation to dedicated template system for better maintainability
    • Comprehensive model methods - generates fromJson(), toJson(), toString(), and null-safe constructors
    • Nested object imports - automatically manages imports between related model files

Version 1.1.6

  • 🚀 New Flutter Project Creation Command: Complete Flutter project setup with automatic platform configuration
    • New "Create Flutter Project" command available in context menu and Command Palette
    • Automatic platform detection and enabling - detects disabled platforms (web, windows, linux, macos) and enables them automatically
    • Multi-platform support with customizable platform selection and intelligent defaults
    • Flutter installation validation ensures Flutter is available before project creation
    • Streamlined workflow with just project name and platform inputs
    • Automatic project opening after successful creation for immediate development
    • Platform directory creation ensures all selected platforms have their respective directories (web/, windows/, linux/, macos/)
    • User-friendly notifications for platform enabling and creation status

Version 1.1.5

  • 🐛 Fixed Input Cancellation: Fixed issue where pressing ESC during additional functions input would still generate files
    • ESC/Cancel during additional functions prompt now properly cancels the entire generation process
    • Applies to all three generator types: presentations, services, and dependencies
    • Empty input (pressing Enter) still continues with no additional functions as expected
    • Improves user experience by respecting cancellation intent

Version 1.1.4

  • 🔧 Enhanced Presentation Generation: Added support for additional controller functions
    • New input prompt for custom functions after entering presentation name
    • Functions are automatically added to both controller interface and implementation
    • Comprehensive unit tests generated for all additional functions
    • Camel case validation ensures Flutter naming standards
    • Empty input is allowed for presentations without additional functions
  • ⚙️ Enhanced Service Generation: Added support for additional service functions
    • New input prompt for custom functions after entering service name (e.g., authenticate, refreshToken, logout)
    • Functions are automatically added to both service interface and implementation
    • Comprehensive unit tests generated for all additional functions with TODO comments
    • Consistent pattern with presentation controller function generation
  • 🔗 Enhanced Dependency Generation: Added support for additional dependency functions
    • New input prompt for custom functions after entering dependency name (e.g., initialize, configure, cleanup)
    • Functions are automatically added to both dependency interface and implementation
    • Comprehensive unit tests generated for all additional functions with TODO comments
    • Unified additional functions pattern across all three generator types

Version 1.1.3

  • 🎨 Icon Update: Changed extension icon image

Version 1.1.2

  • 🚀 Generate Service Command: Added new service generation functionality
    • New "Generate Service" command for creating standalone service classes
    • Service classes follow interface-implementation pattern (e.g., AuthServiceInterface + AuthService)
    • Configurable service paths (jatis.baseServiceSubpath and jatis.baseServiceTestSubpath)
    • Automatic service test generation with comprehensive test setup
    • Services are organized separately from presentation modules for better architecture
  • 📋 History Tracking Enhancement: Improved selection history functionality
    • Fixed history sorting to properly show most recently selected items first
    • History items now update timestamp when selected from history list
    • Better tracking across build runner directory selection and unit test file selection
  • 🏗️ Template Architecture Refactor: Separated templates for better maintainability
    • Split templates into dedicated files: PresentationTemplates, PresentationTestTemplates, DependencyTestTemplates, ServiceTestTemplates
    • Improved code organization with focused template responsibilities
    • Better type safety and easier maintenance of template generation
  • ⚙️ Enhanced Configuration UI: Added service path configuration options
    • Service Subpath and Service Test Subpath settings in Configuration UI
    • Edit and reset functionality for service path settings
    • Consistent configuration pattern across all generator types

Version 1.1.1

  • 📦 GetX Package Support: Added GetX (Get) package to installation options
    • New "Get" option in Install Packages command
    • Configurable GetX version (default: ^4.7.2) in extension settings
    • GetX version management through Configuration UI
  • 🔧 Streamlined Package Installation: Removed individual "Install Mockito Package" and "Install Build Runner Package" commands from context menu and Command Palette, consolidated into unified "Install Packages" menu
  • ⚙️ Enhanced Configuration: Added GetX version configuration to settings panel
  • 🏗️ Improved Controller Template: Updated controller constructor to use cleaner positional parameters instead of named parameters
    • Changed from Controller({required ServiceInterface service}) to Controller(this._service)
    • Updated corresponding test templates to match new constructor pattern

Version 1.1.0

  • 🔄 Codebase Migration: Extension codebase refactored from JavaScript to TypeScript for better maintainability
  • ⚙️ Flexible Path Configuration: New configurable subpath system with centralized constants
    • Absolute roots (lib/, test/) are now centralized constants
    • User-configurable subpaths (e.g., presentation, features/auth)
    • Clean import paths without lib/ prefix in generated code
    • Intuitive configuration UI with dynamic prompts
  • ✨ Enhanced Features: Improved extension stability and performance
  • 🔧 Template Updates: Updated code generation templates with modern Dart patterns
  • 🐛 Bug Fixes: Fixed various issues for better user experience
  • ⚡ Performance: Optimized extension performance and reliability

Version 1.0.4

  • Added selection history feature for improved user experience

Version 1.0.3

  • Added "All Unit Tests" option to test coverage command

Version 1.0.2

  • Fixed "Command not found" error when using extension from marketplace

Version 1.0.1

  • Added command to install build runner and its configuration

Troubleshooting

Platform-Specific Issues

macOS/Linux

Issue: Commands fail with "command not found" errors Solution: Ensure Flutter is added to your PATH. Run flutter doctor in your terminal to verify installation.

Issue: Permission denied errors when creating projects Solution: Check folder permissions. You may need to run chmod +x on the target directory.

Issue: Build runner fails with path errors Solution: Ensure file paths don't contain special characters that need escaping. The extension handles most cases automatically.

Windows

Issue: Commands fail in PowerShell Solution: The extension uses the default system shell. If issues persist, try using Command Prompt as your default terminal.

Issue: Path errors with spaces in project names Solution: The extension automatically handles spaces in paths. If issues occur, try using underscores instead of spaces in project names.

All Platforms

Issue: Flutter commands not executing Solution:

  1. Verify Flutter is installed: Run flutter --version in your terminal
  2. Restart VS Code after installing Flutter
  3. Check the extension output panel for detailed error messages

Issue: Extension commands not appearing in context menu Solution: Ensure you're right-clicking on a folder (not a file) in the Explorer view.

Network Layer Issues

Issue: API client not found when injecting with GetX Solution:

  1. Ensure AppBinding is registered in your main.dart: GetMaterialApp(initialBinding: AppBinding())
  2. Verify the API client is registered in lib/base/binding/app_binding.dart
  3. Check that you're using Get.find<ApiClientInterface>() after the binding is initialized

Issue: Network requests timing out Solution:

  1. Check your timeout configuration in ApiClientConfig (default: 30 seconds)
  2. Verify the base URL is correct in your flavor configuration
  3. Test the API endpoint with a tool like Postman to ensure it's accessible
  4. Increase timeout values if needed:
ApiClientConfig(
  baseUrl: 'https://api.example.com',
  connectTimeout: Duration(seconds: 60),
  receiveTimeout: Duration(seconds: 60),
)

Issue: SSL certificate validation errors Solution:

  1. For development/testing, you can disable SSL pinning in the config:
ApiClientConfig(
  baseUrl: 'https://api.example.com',
  enableSslPinning: false,
)
  1. For production, ensure your certificate fingerprints are correct
  2. Use openssl to get certificate fingerprints:
openssl s_client -connect api.example.com:443 < /dev/null 2>/dev/null | openssl x509 -fingerprint -sha256 -noout

Issue: JSON serialization errors Solution:

  1. Ensure your model classes have proper fromJson and toJson methods
  2. Check that the API response structure matches your model
  3. Use the logging interceptor to inspect the actual response:
ApiClientConfig(
  baseUrl: 'https://api.example.com',
  enableLogging: true,  // Enable to see request/response details
)
  1. Handle serialization errors explicitly:
try {
  var user = await _apiClient.get<User>('/users/1', parser: User.fromJson);
} on SerializationException catch (e) {
  print('Failed to parse response: ${e.message}');
  print('Original error: ${e.originalError}');
}

Issue: Multiple API clients interfering with each other Solution:

  1. Ensure each client is registered with a unique name in the factory
  2. Verify you're retrieving the correct client by name:
var paymentClient = Get.find<ApiClientFactory>().getClient('payment');
var analyticsClient = Get.find<ApiClientFactory>().getClient('analytics');
  1. Check that each client has its own configuration

Issue: Headers not being sent with requests Solution:

  1. Verify default headers are set in ApiClientConfig:
ApiClientConfig(
  baseUrl: 'https://api.example.com',
  defaultHeaders: {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
  },
)
  1. For per-request headers, pass them explicitly:
await _apiClient.get('/endpoint', headers: {'Authorization': 'Bearer token'});
  1. Enable logging to verify headers are being sent

Issue: Base URL override not working Solution:

  1. Pass the baseUrlOverride parameter explicitly:
await _apiClient.get('/endpoint', baseUrlOverride: 'https://different-api.com');
  1. Ensure the override URL is complete (includes protocol)
  2. Check that the path doesn't start with the full URL (use relative paths)

Issue: Logging interceptor not showing output Solution:

  1. Verify logging is enabled in config: enableLogging: true
  2. Check your IDE/terminal console output (not just debug console)
  3. Ensure you're not in production flavor (logging is typically disabled in production)
  4. For custom logging, add your own interceptor:
ApiClientConfig(
  baseUrl: 'https://api.example.com',
  customInterceptors: [YourCustomLoggingInterceptor()],
)

For additional support, please file an issue on the GitLab repository.


Happy Flutter Development! 🚀

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft