Skip to content

Instantly share code, notes, and snippets.

@rickyngan
Last active June 11, 2020 07:53
Show Gist options
  • Save rickyngan/5d17d12dafbb89e6a4cf26f872fe7c1e to your computer and use it in GitHub Desktop.
Save rickyngan/5d17d12dafbb89e6a4cf26f872fe7c1e to your computer and use it in GitHub Desktop.
2020 Jun 13 HoC HK Flutter: 4_statelesswidget
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Flutter Demo Home Page'),
),
body: Center(
child: FlutterLogo(size: 100),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment