Receber por email
← Voltar para o catálogo

Flutter/Dart Development

Habilidade especializada para desenvolvimento de aplicativos Flutter e programação Dart.

1.4kestrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add a5c-ai/babysitter

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/flutter-dart-development/svg)](https://www.skillteca.com.br/skills/flutter-dart-development)

Skills relacionadas

Ver todas de Automação →

Alerta por categoria

Receba novas skills de Automação toda segunda

1 email curto, só com as skills novas de Automação. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Flutter/Dart Development Skill

Overview

This skill provides specialized capabilities for Flutter app development and Dart programming. It enables execution of Flutter CLI commands, widget generation, state management configuration, and comprehensive debugging with Flutter DevTools.

Allowed Tools

  • bash - Execute Flutter CLI, Dart commands, and pub operations
  • read - Analyze Flutter project files, widgets, and configurations
  • write - Generate and modify Dart code and Flutter configurations
  • edit - Update existing Flutter widgets and configurations
  • glob - Search for Dart files and Flutter assets
  • grep - Search for patterns in Flutter codebase

Capabilities

Core Development

  1. Flutter CLI Operations
  2. Create new Flutter projects with templates
  3. Run Flutter apps on devices and emulators
  4. Build release APK, AAB, and IPA files
  5. Execute Flutter analyze for linting
  6. Run Flutter doctor for environment diagnostics
  1. Dart Language Features
  2. Generate null-safe Dart code
  3. Implement async/await patterns with Futures
  4. Create Dart classes with factory constructors
  5. Use extension methods effectively
  6. Implement sealed classes and pattern matching
  1. Widget Development
  2. Create custom StatelessWidget and StatefulWidget
  3. Implement InheritedWidget for dependency injection
  4. Build CustomPainter for custom graphics
  5. Create responsive layouts with LayoutBuilder
  6. Implement animations with AnimationController

State Management

  1. BLoC Pattern
  2. Generate BLoC classes with events and states
  3. Configure flutter_bloc with BlocProvider
  4. Implement Cubit for simpler state management
  5. Set up BlocObserver for debugging
  6. Handle state persistence with hydrated_bloc
  1. Provider Pattern
  2. Configure ChangeNotifierProvider
  3. Implement Consumer and Selector widgets
  4. Set up MultiProvider for multiple states
  5. Use ProxyProvider for dependent providers
  1. Riverpod
  2. Configure ProviderScope and ProviderContainer
  3. Implement StateNotifier and StateNotifierProvider
  4. Create AsyncNotifier for async operations
  5. Use Riverpod code generation

Navigation

  1. GoRouter
  2. Configure declarative routing
  3. Implement deep linking with path parameters
  4. Set up redirect guards for authentication
  5. Handle nested navigation with ShellRoute
  6. Implement type-safe routing with code generation
  1. AutoRoute
  2. Generate route configurations
  3. Implement nested routers
  4. Configure route guards
  5. Handle path parameters and query strings

Code Generation

  1. Build Runner
  2. Configure Freezed for immutable classes
  3. Set up JsonSerializable for JSON parsing
  4. Implement Hive type adapters
  5. Generate mock classes with Mockito
  6. Use built_value for value types

Testing

  1. Testing Frameworks
  2. Configure unit tests with test package
  3. Implement widget tests with flutter_test
  4. Set up integration tests
  5. Use golden tests for UI verification
  6. Mock dependencies with Mockito

Performance

  1. Performance Optimization
  2. Implement const constructors
  3. Use RepaintBoundary effectively
  4. Configure image caching
  5. Implement lazy loading with ListView.builder
  6. Profile with Flutter DevTools

Target Processes

This skill integrates with the following processes:

  • flutter-app-scaffolding.js - Project setup and configuration
  • cross-platform-ui-library.js - Shared widget development
  • mobile-testing-strategy.js - Test implementation
  • mobile-performance-optimization.js - Performance tuning

Dependencies

Required

  • Flutter SDK 3.16+
  • Dart SDK 3.2+
  • Android Studio or VS Code with Flutter extension

Optional

  • Android SDK (for Android development)
  • Xcode (for iOS development, macOS only)
  • Chrome (for web development)
  • Flutter DevTools

Configuration

Project Structure

project-root/
├── lib/
│   ├── main.dart
│   ├── app/
│   │   ├── app.dart
│   │   └── router.dart
│   ├── features/
│   │   └── feature_name/
│   │       ├── data/
│   │       ├── domain/
│   │       └── presentation/
│   ├── core/
│   │   ├── constants/
│   │   ├── errors/
│   │   ├── extensions/
│   │   └── utils/
│   └── shared/
│       └── widgets/
├── test/
├── integration_test/
├── assets/
├── pubspec.yaml
└── analysis_options.yaml

Analysis Options

# analysis_options.yaml
include: package:flutter_lints/flutter.yaml

linter:
  rules:
    prefer_const_constructors: true
    prefer_const_declarations: true
    avoid_print: true
    prefer_single_quotes: true
    require_trailing_commas: true

analyzer:
  errors:
    invalid_annotation_target: ignore
  exclude:
    - "**/*.g.dart"
    - "**/*.freezed.dart"

Usage Examples

Initialize Project

# Create new Flutter project
flutter create --org com.example my_app

# Create with specific platforms
flutter create --platforms android,ios,web my_app

# Add dependencies
flutter pub add flutter_bloc equatable
flutter pub add --dev build_runner freezed freezed_annotation

Generate Widget

// lib/features/home/presentation/widgets/custom_card.dart
import 'package:flutter/material.dart';

class CustomCard extends StatelessWidget {
  const CustomCard({
    super.key,
    required this.title,
    required this.subtitle,
    this.onTap,
  });

  final String title;
  final String subtitle;
  final VoidCallback? onTap;

  @override
  Widget build(BuildContext context) {
    final theme = Theme.of(context);

    return Card(
      elevation: 2,
      child: InkWell(
        onTap: onTap,
        borderRadius: BorderRadius.circular(12),
        child: Padding(
          padding: const EdgeInsets.all(16),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Text(
                title,
                style: theme.textTheme.titleMedium?.copyWith(
                  fontWeight: FontWeight.bold,
                ),
              ),
              const SizedBox(height: 8),
              Text(
                subtitle,
                style: theme.textTheme.bodyMedium?.copyWith(
                  color: theme.colorScheme.onSurfaceVariant,
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Configure BLoC

// lib/features/auth/presentation/bloc/auth_bloc.dart
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:equatable/equatable.dart';

part 'auth_event.dart';
part 'auth_state.dart';

class AuthBloc extends Bloc<AuthEvent, AuthState> {
  AuthBloc({required this.authRepository}) : super(const AuthInitial()) {
    on<AuthLoginRequested>(_onLoginRequested);
    on<AuthLogoutRequested>(_onLogoutRequested);
  }

  final AuthRepository authRepository;

  Future<void> _onLoginRequested(
    AuthLoginRequested event,
    Emitter<AuthState> emit,
  ) async {
    emit(const AuthLoading());
    try {
      final user = await authRepository.login(
        email: event.email,
        password: event.password,
      );
      emit(AuthAuthenticated(user: user));
    } catch (e) {
      emit(AuthError(message: e.toString()));
    }
  }

  Future<void> _onLogoutRequested(
    AuthLogoutRequested event,
    Emitter<AuthState> emit,
  ) async {
    await authRepository.logout();
    emit(const AuthUnauthenticated());
  }
}

Configure GoRouter

// lib/app/router.dart
import 'package:go_router/go_router.dart';

final router = GoRouter(
  initialLocation: '/',
  routes: [
    GoRoute(
      path: '/',
      name: 'home',
      builder: (context, state) => const HomeScreen(),
      routes: [
        GoRoute(
          path: 'details/:id',
          name: 'details',
          builder: (context, state) {
            final id = state.pathParameters['id']!;
            return DetailsScreen(id: id);
          },
        ),
      ],
    ),
  
Compartilhar X LinkedIn