Skip to content

Instantly share code, notes, and snippets.

@adityathakurxd
Created March 22, 2022 14:58
Show Gist options
  • Save adityathakurxd/75b25485cacf4524fcc2e04fe0536e95 to your computer and use it in GitHub Desktop.
Save adityathakurxd/75b25485cacf4524fcc2e04fe0536e95 to your computer and use it in GitHub Desktop.
Flutter Workshop Day 1 (main dart code
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Hello World!"),
),
body: Text("Some text"),
floatingActionButton: FloatingActionButton(
onPressed: () {
print("Hello");
},
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment