Created
June 13, 2019 04:29
-
-
Save Andrious/0af248a177cedf3b18b51213ef7a637e to your computer and use it in GitHub Desktop.
Demonstrates the textDirection property in both the Row and Column widget.
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/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