import 'package:flutter/material.dart';
class ComparisonScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Flutter vs React Native')),
body: Padding(
padding: EdgeInsets.all(16),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Flutter', style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)),
SizedBox(height: 10),
Text('Fast compile'),
SizedBox(height: 6),
Text('Uses Dart'),
SizedBox(height: 6),
Text('Rich widgets'),
SizedBox(height: 6),
Text('Single codebase'),
],
),
),
SizedBox(width: 24),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('React Native', style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)),
SizedBox(height: 10),
Text('JavaScript runtime'),
SizedBox(height: 6),
Text('Uses JavaScript'),
SizedBox(height: 6),
Text('Native modules'),
SizedBox(height: 6),
Text('Single codebase'),
],
),
),
],
),
),
);
}
}
This screen uses a Row to place two columns side by side. Each column is wrapped in an Expanded widget to share space equally. Inside each column, a title is shown with bold text, followed by four comparison points with spacing in between using SizedBox. Padding around the whole row improves readability. This simple layout clearly shows the differences and similarities between Flutter and React Native.