Skip to content

Instantly share code, notes, and snippets.

@justinmc
Created August 22, 2022 20:30
Show Gist options
  • Select an option

  • Save justinmc/431278869ca70372f00e469121055aaa to your computer and use it in GitHub Desktop.

Select an option

Save justinmc/431278869ca70372f00e469121055aaa to your computer and use it in GitHub Desktop.
A super simple starting point for a Flutter app.
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(title),
),
body: Center(
child: SelectionArea(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const <Widget>[
const Text('Hello World'),
],
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment