Skip to content

Instantly share code, notes, and snippets.

@leighajarett
Last active November 3, 2022 19:19
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 leighajarett/d3d38ae68f7d6444421d0485a1fd02db to your computer and use it in GitHub Desktop.
Save leighajarett/d3d38ae68f7d6444421d0485a1fd02db to your computer and use it in GitHub Desktop.
flutter_ios_get_started
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
// #docregion main
void main() {
runApp(const MyApp());
}
// #enddocregion main
// #docregion myapp
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
// the widget returned here is a CupertinoApp
// that has the look and feel of an iOS app by default
return CupertinoApp(
home: const HomePage(),
);
}
}
// #enddocregion myapp
// #docregion homepage
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Text(
'Hello, World!',
),
),
);
}
}
// #enddocregion homepage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment