Advertisement
yudiwibisono

flutter_card

Apr 15th, 2022
413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.97 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() {
  4.   runApp(const MyApp());
  5. }
  6.  
  7. class MyApp extends StatelessWidget {
  8.   const MyApp({Key? key}) : super(key: key);
  9.  
  10.   @override
  11.   Widget build(BuildContext context) {
  12.     return MaterialApp(
  13.         title: "Flutter Demo",
  14.         home: Scaffold(
  15.           appBar: AppBar(
  16.             title: const Text("Card"),
  17.           ),
  18.           body: const MyHomePage(),
  19.         ));
  20.   }
  21. }
  22.  
  23. class MyHomePage extends StatelessWidget {
  24.   const MyHomePage({Key? key}) : super(key: key);
  25.  
  26.   @override
  27.   Widget build(BuildContext context) {
  28.     return Card(
  29.         child: ListTile(
  30.             onTap: () {},
  31.             leading: Image.network(
  32.                 'https://flutter.github.io/assets-for-api-docs/assets/widgets/owl-2.jpg'),
  33.             trailing: const Icon(Icons.more_vert),
  34.             title: const Text('Judul'),
  35.             subtitle: const Text("ini Subjudul"),
  36.             tileColor: Colors.white70));
  37.   }
  38. }
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement