Study log - Flutter
4232 단어 fluttertextwidgetflutter
Outline
Flutter 위젯 테스트 - 게으름방지, 기록, 공부
Documents
https://flutter.dev/docs/development/ui/widgets/text
Result
Code
import 'package:flutter/material.dart';
import 'package:flutter_gallery/src/routes.dart';
class EgText extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Text'),
),
body: ListView(
padding: const EdgeInsets.all(8.0),
children: <Widget> [
Container(
child: Text(
'May the Force be with you.',
style: TextStyle(fontSize:20),
),
),
Container(
child: Text(
'Carpe diem. Seize the day, boys. Make your lives extraordinary.',
style: TextStyle(fontWeight: FontWeight.bold, fontSize:20)
),
),
Container(
child: Text(
'Keep your friends close, but your enemies closer.',
style: TextStyle(fontStyle:FontStyle.italic, fontSize:20)
),
),
Container(
child: Text(
'A martini. Shaken, not stirred.',
style: TextStyle(color:Colors.deepOrange, fontSize:20)
),
),
Container(
child: Text.rich(
TextSpan(
style: TextStyle(color:Colors.blue, fontSize:25),
children: <TextSpan>[
TextSpan(text:'When you ', ),
TextSpan(text:'realize ', style:TextStyle(fontWeight: FontWeight.bold)),
TextSpan(text:'you want to spend the rest of your ', ),
TextSpan(text:'life with somebody', style:TextStyle(decoration: TextDecoration.underline)),
TextSpan(text:', you want the rest of your life to ', ),
TextSpan(text:'start as soon as possible', style: TextStyle(color:Colors.indigo, backgroundColor: Colors.amber)),
TextSpan(text:'.', ),
],
),
),
),
Container(
child: Text.rich(
TextSpan(
style: TextStyle(color:Colors.black, fontSize:25),
children: <TextSpan>[
TextSpan(text:'If you let my daughter go now, ', style: TextStyle(color:Colors.grey[400])),
TextSpan(text:'that\'ll be the end of it', style: TextStyle(color:Colors.grey[500])),
TextSpan(text:'. I will not look for you, ', style: TextStyle(color:Colors.grey[600])),
TextSpan(text:'I will not pursue you', style: TextStyle(color:Colors.grey[700])),
TextSpan(text:'.', ),
TextSpan(text:'But if you don\'t, ', ),
TextSpan(text:'I will look for you, ', style:TextStyle(decoration: TextDecoration.underline)),
TextSpan(text:'I will find you, ', style: TextStyle(fontWeight: FontWeight.bold, fontStyle:FontStyle.italic)),
TextSpan(text:'and ', ),
TextSpan(text:'I will kill you.', style: TextStyle(color:Colors.red, fontSize:40, fontWeight: FontWeight.bold)),
],
),
),
),
],
),
);
}
}
Link
Github: https://github.com/OreoJam/flutter_gallery
Author And Source
이 문제에 관하여(Study log - Flutter), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@24331/Study-log-Flutter저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)