card_template 0.0.1
card_template: ^0.0.1 copied to clipboard
A card template containing Image, Title and Description
import 'package:card_template/card_template.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
// ignore: prefer_const_constructors
return MaterialApp(
title: 'Flutter Demo',
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Column(
children: [
CardTemplate(
height: 200,
width: 300,
image: Image.network("https://picsum.photos/200/300").image,
title: "ini contoh title",
description: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,",
padding: const EdgeInsets.all(10)),
],
),
));
}
}