Loading...
Loading...
Expert in building cross-platform apps with Flutter 3+. Specializes in Dart, Riverpod, Flame (Game Engine), and FFI (Native Integration).
npx skill4agent add 404kidwiz/claude-supercode-skills flutter-expert| Pattern | Best For | Complexity | Pros |
|---|---|---|---|
| Riverpod | Default Choice | Medium | Compile-time safety, no context dependency, testable. |
| BLoC/Cubit | Enterprise | High | Strict event/state separation, great for logging/analytics. |
| Provider | Legacy/Simple | Low | Built-in, simple, but relies on BuildContext. |
| GetX | Rapid MVP | Low | "Magic" reactive, less boilerplate, but non-standard patterns. |
How to talk to Native?
│
├─ **Method Channels (Standard)**
│ ├─ Async calls? → **MethodChannel**
│ └─ Streams? → **EventChannel**
│
├─ **FFI (High Performance)**
│ ├─ C/C++ Library? → **dart:ffi**
│ └─ Rust Library? → **Flutter Rust Bridge**
│
└─ **Platform Views (UI)**
├─ Native UI inside Flutter? → **AndroidView / UiKitView**
└─ Performance Critical? → **Hybrid Composition**RepaintBoundarymobile-developershaders/pixelate.frag#include <flutter/runtime_effect.glsl>
uniform vec2 uSize;
uniform float uPixels;
uniform sampler2D uTexture;
out vec4 fragColor;
void main() {
vec2 uv = FlutterFragCoord().xy / uSize;
vec2 pixelatedUV = floor(uv * uPixels) / uPixels;
fragColor = texture(uTexture, pixelatedUV);
}// Load asset
final program = await FragmentProgram.fromAsset('shaders/pixelate.frag');
// CustomPainter
void paint(Canvas canvas, Size size) {
final shader = program.fragmentShader();
shader.setFloat(0, size.width); // uSize.x
shader.setFloat(1, size.height); // uSize.y
shader.setFloat(2, 50.0); // uPixels (50x50 grid)
final paint = Paint()..shader = shader;
canvas.drawRect(Offset.zero & size, paint);
}lib/
domain/ # Entities, Repository Interfaces (Pure Dart)
entities/
repositories/
data/ # Implementations (API, DB)
datasources/
repositories/
models/ # DTOs
presentation/ # UI, Controllers (Flutter)
pages/
widgets/
controllers/
AuthRepository authRepository(AuthRepositoryRef ref) {
return FirebaseAuthImpl(FirebaseAuth.instance);
}
Future<User> currentUser(CurrentUserRef ref) {
return ref.watch(authRepositoryProvider).getCurrentUser();
}class AdaptiveScaffold extends StatelessWidget {
Widget build(BuildContext context) {
final width = MediaQuery.of(context).size.width;
if (width > 900) {
return Row(children: [NavRail(), Expanded(child: Body())]);
} else {
return Scaffold(
drawer: Drawer(),
body: Body(),
bottomNavigationBar: BottomNavBar(),
);
}
}
}openapi_generator.rivrive