Skip to content

Instantly share code, notes, and snippets.

@donwardpeng
Created January 8, 2020 18:04
Show Gist options
  • Save donwardpeng/ba0dc42854d2bf289379f20587be439f to your computer and use it in GitHub Desktop.
Save donwardpeng/ba0dc42854d2bf289379f20587be439f to your computer and use it in GitHub Desktop.
Codemash Flutter Demo 1
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: true,
home: Scaffold(
body: Center(
child: MyWidget(),
),
),
);
}
}
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
//constraints: BoxConstraints.expand(width: 200, height: 200),
// color: Colors.white,
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text('Hello, World!'),
RaisedButton(
child: Text('Press me!'),
onPressed: () {
//do nothing for now
}),
])));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment