Skip to content

Instantly share code, notes, and snippets.

@tklee1975
Created September 19, 2020 08:40
Show Gist options
  • Save tklee1975/b385d447337a28ac776a6b7c305ae112 to your computer and use it in GitHub Desktop.
Save tklee1975/b385d447337a28ac776a6b7c305ae112 to your computer and use it in GitHub Desktop.
A very simple flutter widget!
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return CupertinoApp(
home: Container(
color: Colors.amber,
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(
"What's Flutter?",
style: TextStyle(fontSize: 30),
),
Padding(
padding: const EdgeInsets.all(30.0),
child: Text(
"Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.",
style: TextStyle(fontSize: 20),
textAlign: TextAlign.center,
),
),
],
)),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment