Created
March 10, 2020 22:55
-
-
Save mampersat/c4fc42ee5b988a934da788b0f7cf9549 to your computer and use it in GitHub Desktop.
Pimorize
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'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
theme: ThemeData.dark().copyWith(scaffoldBackgroundColor: darkBlue), | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
body: Center( | |
child: MyWidget(), | |
), | |
), | |
); | |
} | |
} | |
class MyWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return | |
Column( | |
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | |
children: | |
[ | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | |
children: [ NumberButton(i:'7'), NumberButton(i:'8'),NumberButton(i:'9') ] | |
), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | |
children: [ Text('4'), Text('5'),Text('6') ] | |
), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | |
children: [ Text('1'), Text('2'),Text('3') ] | |
), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | |
children: [ Text('0'),Text('.') ] | |
), | |
] | |
); | |
} | |
} | |
class NumberButton extends StatelessWidget { | |
const NumberButton({ Key key, this.i = '3',}) : super(key: key); | |
final String i; | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
child: Text(i) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment