Skip to content

Instantly share code, notes, and snippets.

@nerder
Last active March 8, 2020 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nerder/eda6c1208a4cff0916df5e1b945b1fdd to your computer and use it in GitHub Desktop.
Save nerder/eda6c1208a4cff0916df5e1b945b1fdd to your computer and use it in GitHub Desktop.
[Flutter Workshop] Step 0: Familiarize with the IDE shortcuts
// IMPORTANT SHORTCUTS
// Run the code: [Cmd] + [Enter]
// Show quick fixes: [Alt] + [Enter]
// Comment-out code: [Cmd] + [/]
import 'package:flutter/material.dart';
final Color twPink = Color.fromARGB(255, 239, 91, 161);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.dark().copyWith(scaffoldBackgroundColor: twPink),
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: HelloTW(),
),
),
);
}
}
class HelloTW extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text('Hello', style: Theme.of(context).textTheme.headline3),
Padding(
padding: const EdgeInsets.only(left: 10, top: 10),
child: Image.network("https://www.thoughtworks.com/imgs/tw-logo.svg"),
),
],
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment