Last active
November 3, 2022 19:19
-
-
Save leighajarett/d3d38ae68f7d6444421d0485a1fd02db to your computer and use it in GitHub Desktop.
flutter_ios_get_started
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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