Skip to content

Instantly share code, notes, and snippets.

@leighajarett
Created November 4, 2022 15:05
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/5715d4f269f629d274ef1b0e9546853b to your computer and use it in GitHub Desktop.
Save leighajarett/5715d4f269f629d274ef1b0e9546853b to your computer and use it in GitHub Desktop.
Flutter Row Example
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return CupertinoApp(
home: const HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child:
// #docregion row
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Icon(CupertinoIcons.globe),
Text('Hello, world!'),
],
),
// #enddocregion row
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment