Skip to content

Instantly share code, notes, and snippets.

@Andrious
Created June 13, 2019 04:29
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 Andrious/0af248a177cedf3b18b51213ef7a637e to your computer and use it in GitHub Desktop.
Save Andrious/0af248a177cedf3b18b51213ef7a637e to your computer and use it in GitHub Desktop.
Demonstrates the textDirection property in both the Row and Column widget.
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
MyApp({Key key}) : super(key: key);
State createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
title: Text('Sample Code'),
),
body: Center(child: Column /* Row */(
// textDirection: TextDirection.rtl,
// verticalDirection: VerticalDirection.up,
children: <Widget>[
const Text("This is the first line."),
const Text("This is the second line."),
],
)),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment