Flutter vs React Native
Cross-platform mobile titans compared: Flutter's Skia rendering vs React Native's native bridges, performance benchmarks, ecosystem, and 2026 enterprise adoption.
Platform derin entegrasyon, maksimum performans ve en iyi UX
Tek kod tabanı, iki platform — hız ve maliyet avantajı
// Swift (iOS) - HealthKit entegrasyonu (yalnızca native'de mümkün)
import HealthKit
import SwiftUI
@Observable
class HealthViewModel {
var stepCount: Int = 0
var heartRate: Double = 0
var activeCalories: Double = 0
private let healthStore = HKHealthStore()
func requestPermission() async throws {
let readTypes: Set<HKObjectType> = [
HKObjectType.quantityType(forIdentifier: .stepCount)!,
HKObjectType.quantityType(forIdentifier: .heartRate)!,
HKObjectType.quantityType(forIdentifier: .activeEnergyBurned)!
]
try await healthStore.requestAuthorization(toShare: [], read: readTypes)
}
func fetchTodayStats() async throws {
let now = Date()
let startOfDay = Calendar.current.startOfDay(for: now)
let predicate = HKQuery.predicateForSamples(
withStart: startOfDay, end: now, options: .strictStartDate
)
// Adım sayısı
let stepType = HKQuantityType(.stepCount)
let stepQuery = HKStatisticsQuery(
quantityType: stepType,
quantitySamplePredicate: predicate,
options: .cumulativeSum
) { [weak self] _, result, _ in
Task { @MainActor in
self?.stepCount = Int(result?.sumQuantity()?.doubleValue(for: .count()) ?? 0)
}
}
healthStore.execute(stepQuery)
}
}
// ARKit entegrasyonu — native exclusive
import ARKit
import RealityKit
struct ARViewContainer: UIViewRepresentable {
func makeUIView(context: Context) -> ARView {
let arView = ARView(frame: .zero)
let config = ARWorldTrackingConfiguration()
config.planeDetection = [.horizontal, .vertical]
arView.session.run(config)
// 3D model yükleme ve yerleştirme
let anchor = AnchorEntity(plane: .horizontal)
let box = ModelEntity(mesh: .generateBox(size: 0.1))
anchor.addChild(box)
arView.scene.addAnchor(anchor)
return arView
}
func updateUIView(_ uiView: ARView, context: Context) {}
}// Flutter - Platform özelliği erişimi (Method Channel)
import 'package:flutter/services.dart';
import 'package:flutter/material.dart';
// Platform kanalı tanımı
const platform = MethodChannel('com.myapp/native');
class NativeFeatureService {
// iOS'ta HealthKit, Android'de Health Connect
static Future<Map<String, dynamic>> getHealthData() async {
try {
final result = await platform.invokeMethod<Map>('getHealthData');
return Map<String, dynamic>.from(result ?? {});
} on PlatformException catch (e) {
debugPrint('HealthKit/Health Connect hatası: ${e.message}');
return {};
}
}
// Cihaza özgü biyometrik kimlik doğrulama
static Future<bool> authenticateWithBiometrics() async {
try {
return await platform.invokeMethod<bool>('biometricAuth') ?? false;
} on PlatformException catch (e) {
debugPrint('Biyometrik hata: ${e.message}');
return false;
}
}
}
// Flutter UI (her iki platformda aynı)
class HealthDashboard extends StatefulWidget {
const HealthDashboard({super.key});
@override
State<HealthDashboard> createState() => _HealthDashboardState();
}
class _HealthDashboardState extends State<HealthDashboard> {
Map<String, dynamic> healthData = {};
@override
void initState() {
super.initState();
loadHealthData();
}
Future<void> loadHealthData() async {
final data = await NativeFeatureService.getHealthData();
setState(() => healthData = data);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Sağlık Özeti')),
body: ListView(
children: [
_StatCard(label: 'Adım Sayısı', value: '${healthData["steps"] ?? 0}'),
_StatCard(label: 'Kalori', value: '${healthData["calories"] ?? 0} kcal'),
],
),
);
}
}Karar, ekip boyutu, bütçe ve uygulama karmaşıklığına göre değişir. Küçük ekip + sınırlı bütçe + içerik odaklı uygulama → Cross-platform mantıklı. Büyük ekip + platform derinliği + performans kritik → Native tercih edin. Kotlin Multiplatform, iş mantığını paylaşırken UI'ı native tutarak ikisi arasında güzel bir orta yol sunuyor.
Ücretsiz Danışmanlık AlBu yazının en değerli bilgisi
Bu ipucu, yazının en önemli çıkarımını içeriyor.
Haftalık Swift tips, SwiftUI tricks ve iOS best practices. Spam yok, sadece değerli içerik.
Gizliliğinize saygı duyuyoruz. İstediğiniz zaman abonelikten çıkabilirsiniz.
KMP hibrit bir yaklaşım: iş mantığı, ağ katmanı ve veri modelleri Kotlin ile paylaşılır; UI her platformda native olarak yazılır. Native performans + kod paylaşımı avantajını birleştiriyor.