Advertisement
AbiMulya

(Belajar Flutter) Text Widget

Oct 6th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.97 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() {
  4.   runApp(MyApp());
  5. }
  6.  
  7. class MyApp extends StatelessWidget {
  8.   // This widget is the root of your application.
  9.   @override
  10.   Widget build(BuildContext context) {
  11.     return MaterialApp(
  12.       home: Scaffold(
  13.         appBar: AppBar(
  14.           title: Text("Coba coba"),
  15.         ),
  16.         body: Center(
  17.           child: Container(
  18.             color: Colors.lightBlue,
  19.             width: 150,
  20.             height: 50,
  21.             child: Text(
  22.               "Nyobain Flutter dlu ya gaess",
  23.               style: TextStyle(
  24.                   color: Colors.white,
  25.                   fontStyle: FontStyle.italic,
  26.                   fontWeight: FontWeight.w700,
  27.                   fontSize: 20),
  28.               // textAlign: TextAlign.center,
  29.               // maxLines: 2,
  30.               // overflow: TextOverflow.ellipsis,
  31.               // softWrap: false,
  32.             ),
  33.           ),
  34.         ),
  35.       ),
  36.     );
  37.   }
  38. }
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement