Advertisement
mjamilasfihani

modul-3

Dec 2nd, 2021
735
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.02 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/services.dart';
  3.  
  4. void main() => runApp(MyApp());
  5.  
  6. class MyApp extends StatelessWidget
  7. {
  8.   @override
  9.  
  10.   Widget build(BuildContext context)
  11.   {
  12.     SystemChrome.setEnabledSystemUIOverlays([]);
  13.     const textStyle = TextStyle(fontFamily: 'Pacifico', fontSize: 40);
  14.     return MaterialApp(
  15.       home: Scaffold(
  16.         body: Container(
  17.           constraints: BoxConstraints.expand(),
  18.           decoration: BoxDecoration(gradient: LinearGradient(
  19.               begin: Alignment.topCenter,
  20.               end: Alignment.bottomCenter,
  21.               colors: [Color(0xffb81d46), Color(0xff804ad9)],
  22.             )
  23.           ),
  24.           child: Stack(
  25.             fit: StackFit.loose,
  26.             children: <Widget>[
  27.               Opacity(
  28.                 opacity: 0.1,
  29.                 child: Align(
  30.                   alignment: Alignment.center,
  31.                   child: Container(
  32.                     height: 450,
  33.                     decoration: BoxDecoration(
  34.                       image: DecorationImage(
  35.                         image: AssetImage('assets/images/heart.png'),
  36.                         fit: BoxFit.cover,
  37.                       )
  38.                     ),
  39.                   ),
  40.                 ),
  41.               ),
  42.               Center(
  43.                 child: RichText(
  44.                   text: TextSpan(
  45.                     children: <TextSpan>[
  46.                       TextSpan(text: 'The', style: textStyle),
  47.                       TextSpan(text: "\nLOVE\n", style: TextStyle(
  48.                         color: Colors.white,
  49.                         fontFamily: 'Poppins',
  50.                         fontSize: 70,
  51.                         fontWeight: FontWeight.w900,
  52.                         height: 0.8,
  53.                       )),
  54.                       TextSpan(text: 'Calculator', style: textStyle.copyWith(height: 1)),
  55.                     ]
  56.                   )
  57.                 )
  58.               )
  59.             ],
  60.           ),
  61.         ))
  62.     );
  63.   }
  64. }
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement