Open name27 opened 1 year ago
// ignore_for_file: prefer_const_constructors import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, //debug 배너 제거 home: Scaffold( body: SafeArea( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ RichText( textAlign: TextAlign.center, text: TextSpan( text: '오늘의 하루는\n', style: TextStyle( color: Colors.black, fontWeight: FontWeight.bold, fontSize: 20, ), children: [ TextSpan( text: '어땠나요?', style: TextStyle( color: Colors.black54, fontSize: 13, ), ), ], ), ), Container( height: 200, child: PageView( clipBehavior: Clip.antiAliasWithSaveLayer, children: [ Center( child: Container( width: 300, height: 150, child: Center( child: Text( '상쾌함', style: TextStyle( color: Colors.white, fontSize: 18, ), ), ), decoration: BoxDecoration( borderRadius: BorderRadius.circular(8), gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [ Colors.greenAccent, Colors.lightBlue, ], ), ), ), ), Center( child: Container( width: 300, height: 150, child: Center( child: Text( '우울함', style: TextStyle( color: Colors.white, fontSize: 18, ), ), ), decoration: BoxDecoration( borderRadius: BorderRadius.circular(8), gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [ Colors.indigo, Colors.purple, ], ), ), ), ), Center( child: Container( width: 300, height: 150, child: Center( child: Text( '행복함', style: TextStyle( color: Colors.white, fontSize: 18, ), ), ), decoration: BoxDecoration( borderRadius: BorderRadius.circular(8), gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [ Colors.red, Colors.orange, Colors.yellow, ], ), ), ), ), ], ), ), ], ), ), )); } }