Skip to content

Instantly share code, notes, and snippets.

@cgrant
Last active August 15, 2024 20:34
Show Gist options
  • Select an option

  • Save cgrant/8d27eb74a9350e9197e6da6e21b1be6b to your computer and use it in GitHub Desktop.

Select an option

Save cgrant/8d27eb74a9350e9197e6da6e21b1be6b to your computer and use it in GitHub Desktop.
FlutterFastTrack - HelloFlutter
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: Text('Hello, World!'),
),
),
);
}
}
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Flutter Demo',
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});
final name = "World";
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
Text('Hello $name'),
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment