본문 바로가기
프로그래밍/Flutter-Dart

[Flutter] Card

by 채연2 2021. 3. 25.

결과

 

 

 

전체 코드

// @dart=2.9
import 'package:flutter/material.dart';
import 'package:get/get.dart';

void main() => runApp(GetMaterialApp(
      home: MyStatelessWidget(),
    ));

/// This is the stateless widget that the main application instantiates.
class MyStatelessWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: Card(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            Row(children: [
              Stack(alignment: Alignment.topRight, children: <Widget>[
                Image.asset(
                  'images/test1.jpg',
                  width: 250,
                ),
                Icon(
                  Icons.bookmark,
                  color: Colors.red,
                )
              ]),
              Expanded(
                  child: ListTile(
                title: Text('테스트 제목입니다.'),
                subtitle: Text('테스트 부제목입니다.'),
              ))
            ]),
          ],
        ),
      ),
    );
  }
}
320x100

'프로그래밍 > Flutter-Dart' 카테고리의 다른 글

[Flutter] Login App (3)  (0) 2021.03.29
[Flutter] native code 호출하기  (0) 2021.03.26
[Flutter] Unsound null safety 관련  (0) 2021.03.25
[Flutter] Dice App  (0) 2021.03.25
[Flutter] Shared preferences  (0) 2021.03.25

댓글