Starting with plain (non material ui) canvas in flutter. Use raw widgets use import ‘package:flutter/widgets.dart’; Here is a working example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import 'package:flutter/widgets.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return Container( padding: EdgeInsets.all(25.0), child: Directionality( textDirection: TextDirection.ltr, child:Text("hello world", style: TextStyle( color: Color.fromRGBO(255, 255, 255, 1) ), ))); } } |
The directionality is needed, the padding was added so that we see the message, otherwise it is masked by the menubar in phone.
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.