Created
December 17, 2021 20:11
-
-
Save RinatValiullov/f9971a1bc2865c1194719c8edbcd03e2 to your computer and use it in GitHub Desktop.
Simple Flutter App(wip)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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