1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home:Scaffold( appBar: AppBar( title: Text("flutter demo"), ), body: HomeContent(), ) ); } }
class HomeContent extends StatelessWidget{ @override Widget build(BuildContext context) { return Center( child: Container( child: Text('各位同学大家好,我是珠江老师阿发是否你好吗', textAlign: TextAlign.left, style: TextStyle( fontSize: 16, color: Colors.red, fontWeight: FontWeight.w800, fontStyle: FontStyle.italic, decoration: TextDecoration.lineThrough, decorationColor: Colors.white, decorationStyle: TextDecorationStyle.dashed, letterSpacing: 5 ), overflow: TextOverflow.ellipsis, maxLines: 2, textScaleFactor: 1.2, ), height: 300, width: 300, decoration: BoxDecoration( color: Colors.yellow, border: Border.all( color: Colors.blue, width: 2 ), borderRadius: BorderRadius.all( Radius.circular(20) ) ), padding: EdgeInsets.all(10), margin: EdgeInsets.all(10), transform: Matrix4.rotationZ(0.3), alignment: Alignment.bottomLeft, ), ); } }
|