Advertisement
yocky12k

belajar dart md

Oct 10th, 2023 (edited)
1,188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.41 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() {
  4.   runApp(const MainApp());
  5. }
  6.  
  7. class MainApp extends StatelessWidget {
  8.   const MainApp({super.key});
  9.  
  10.   @override
  11.   Widget build(BuildContext context) {
  12.     return MaterialApp(
  13.       title: 'Belajar Flutter',
  14.       debugShowCheckedModeBanner: false,
  15.       home: Scaffold(
  16.         appBar: AppBar(
  17.           title: Text('LATIHAN MD'),
  18.         ),
  19.         body: Center(
  20.           child: Column(
  21.             mainAxisAlignment: MainAxisAlignment.center,
  22.             children: [
  23.               Icon(
  24.                 Icons.home,
  25.                 color: Colors.red,
  26.                 size: 70,
  27.               ),
  28.               SizedBox(height: 50),
  29.               Text(
  30.                 'STMIK ROYAL',
  31.                 style: TextStyle(
  32.                   color: Colors.green,
  33.                   fontSize: 40,
  34.                   fontWeight: FontWeight.bold,
  35.                   decoration: TextDecoration.underline,
  36.                 ),
  37.               ),
  38.               SizedBox(height: 50),
  39.               MaterialButton(
  40.                 onPressed: () {
  41. //logika aksi tombol ketika ditekan
  42.                 },
  43.                 color: Colors.blue,
  44.                 textColor: Colors.white,
  45.                 child: Text('LOGIN'),
  46.                 minWidth: 200,
  47.                 height: 50,
  48.               )
  49.             ],
  50.           ),
  51.         ),
  52.       ),
  53.     );
  54.   }
  55. }
  56.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement