agentsclimarketplace

Flutter developer

Skill AtulPurohit/Antigravity-Awesome-Skills/skills/flutter-developer

Build beautiful, performant Flutter applications for iOS, Android, and web. Covers state management, navigation, animations, platform channels, and deployment.From its SKILL.md

Install
npx -y skills add AtulPurohit/Antigravity-Awesome-Skills --skill flutter-developer

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.3 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

Flutter Developer

Purpose

Build high-quality, cross-platform Flutter applications with clean architecture, proper state management, and native-feeling UIs.

Operating Mode

You are a senior Flutter developer. You write clean Dart code, apply proper architecture patterns, and deliver performant apps that feel native.

The Process

1️⃣ Architecture Selection

Choose based on app complexity:
- Small app: setState + inherited widgets
- Medium app: Riverpod or Provider
- Large app: Riverpod + Repository pattern or BLoC

2️⃣ Riverpod State Management (Recommended)

// providers/post_provider.dart
import 'package:riverpod_annotation/riverpod_annotation.dart';

part 'post_provider.g.dart';

@riverpod
class Posts extends _$Posts {
  @override
  FutureOr<List<Post>> build() async {
    return ref.watch(postRepositoryProvider).getPosts();
  }

  Future<void> createPost(String title, String body) async {
    state = const AsyncValue.loading();
    state = await AsyncValue.guard(() async {
      await ref.read(postRepositoryProvider).createPost(title, body);
      return ref.read(postRepositoryProvider).getPosts();
    });
  }
}

// In widget
class PostsScreen extends ConsumerWidget {
  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final postsAsync = ref.watch(postsProvider);
    
    return postsAsync.when(
      data: (posts) => ListView.builder(
        itemCount: posts.length,
        itemBuilder: (ctx, i) => PostCard(post: posts[i]),
      ),
      loading: () => const CircularProgressIndicator(),
      error: (err, stack) => Text('Error: $err'),
    );
  }
}

3️⃣ Clean Architecture

// Feature-based folder structure
lib/
├── core/
│   ├── di/           # Dependency injection
│   ├── router/       # App navigation (go_router)
│   ├── theme/        # App theme
│   └── utils/
├── features/
│   └── posts/
│       ├── data/
│       │   ├── models/         # JSON serializable models
│       │   ├── repositories/   # Implementation
│       │   └── datasources/    # API, local DB
│       ├── domain/
│       │   ├── entities/       # Pure Dart classes
│       │   ├── repositories/   # Abstract interfaces
│       │   └── usecases/
│       └── presentation/
│           ├── providers/      # Riverpod providers
│           ├── screens/
│           └── widgets/

4️⃣ Navigation with go_router

// core/router/app_router.dart
final routerProvider = Provider<GoRouter>((ref) {
  return GoRouter(
    initialLocation: '/',
    redirect: (context, state) {
      final isLoggedIn = ref.read(authProvider).isLoggedIn;
      if (!isLoggedIn && !state.matchedLocation.startsWith('/auth')) {
        return '/auth/login';
      }
      return null;
    },
    routes: [
      GoRoute(path: '/', builder: (ctx, state) => const HomeScreen()),
      GoRoute(
        path: '/posts/:id',
        builder: (ctx, state) => PostDetailScreen(id: state.pathParameters['id']!),
      ),
      ShellRoute(
        builder: (ctx, state, child) => MainScaffold(child: child),
        routes: [
          GoRoute(path: '/home', builder: (ctx, state) => const HomeTab()),
          GoRoute(path: '/profile', builder: (ctx, state) => const ProfileTab()),
        ],
      ),
    ],
  );
});

5️⃣ Performance Best Practices

// ✅ Use const constructors everywhere possible
const MyWidget(); // Widget is not rebuilt

// ✅ Use ListView.builder for long lists (not ListView with children)
ListView.builder(
  itemCount: items.length,
  itemBuilder: (ctx, i) => ItemCard(item: items[i]),
);

// ✅ Avoid rebuilding expensive widgets
class ExpensiveWidget extends StatelessWidget {
  const ExpensiveWidget({super.key});
  
  @override
  Widget build(BuildContext context) => /* expensive computation */;
}

// ✅ Use RepaintBoundary for independently animated sections
RepaintBoundary(
  child: AnimatedCounter(value: count),
)

// ✅ Dispose controllers
@override
void dispose() {
  _controller.dispose();
  _scrollController.dispose();
  super.dispose();
}

6️⃣ Platform Channels (Native Features)

// Call native iOS/Android code
static const platform = MethodChannel('com.example.app/native');

Future<String> getNativeData() async {
  try {
    return await platform.invokeMethod<String>('getData') ?? '';
  } on PlatformException catch (e) {
    throw Exception('Native call failed: ${e.message}');
  }
}

Outputs

  1. Project structure with clean architecture
  2. State management setup (Riverpod)
  3. Navigation configuration (go_router)
  4. API integration with error handling
  5. Custom widget library
  6. Performance optimization checklist
  7. Build and release configuration

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.