Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple Flutter App(wip)
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(child: MyWidget()),
),
);
}
}
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: [
Flexible(
child: Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Text('Is It USA?', style: TextStyle(fontSize: 32)),
Text('California'),
],
),
),
),
Flexible(flex: 4, child: Container(color: Colors.green)),
Flexible(child: Container(color: Colors.red)),
],
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment