Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zubairehman/genericcard
A re-usable card widget so that you can import and use it everywhere in the app without putting up the layout again and again.
https://github.com/zubairehman/genericcard
cardview dart2 flutter flutter-apps flutter-demo material-design
Last synced: about 1 month ago
JSON representation
A re-usable card widget so that you can import and use it everywhere in the app without putting up the layout again and again.
- Host: GitHub
- URL: https://github.com/zubairehman/genericcard
- Owner: zubairehman
- Created: 2019-03-30T19:31:49.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-30T19:43:02.000Z (almost 6 years ago)
- Last Synced: 2024-11-10T01:27:56.571Z (3 months ago)
- Topics: cardview, dart2, flutter, flutter-apps, flutter-demo, material-design
- Language: Dart
- Size: 922 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# flutter_app
A re-usable ui.card widget so that you can import and use it everywhere in the app without putting up the layout again and again.
## Getting Started
One way or another you may want to display some “items”, be it an album, an e-commerce product, social media feed, with a title, a subtitle, few lines of body text, and of course an image. Unlike other Flutter widgets such as AppBar, CheckBoxTile, SwitchTile, for which you can have neat layouts ready-made, Card widget only gives you “a rectangle with elevation”. You need to figure out your way to put things in it beautifully. Material Components Web’s catalogue page gives us 5 different layers to reference from. This widget hs been designed to keep provided material guidlines in mind.
## Usage
```
GenericCard(
imagePath: 'assets/images/image.jpg',
title: 'Flutter Demo Card',
subtitle: 'by Zubair Rehman',
body:
'Visit ten places on our planet that are undergoing the biggest changes today.',
flatButtons: [
FlatButton(
child: Text(
'First Button',
style: Theme.of(context)
.textTheme
.button
.copyWith(color: Colors.blueAccent),
),
onPressed: () {},
),
FlatButton(
child: Text(
'Second Button',
style: Theme.of(context)
.textTheme
.button
.copyWith(color: Colors.blueAccent),
),
onPressed: () {},
),
],
iconButtons: [
IconButton(
icon: Icon(Icons.assignment),
color: Colors.grey[500],
iconSize: 24.0,
onPressed: () {},
),
IconButton(
icon: Icon(Icons.email),
color: Colors.grey[500],
iconSize: 24.0,
onPressed: () {},
),
IconButton(
icon: Icon(Icons.more_vert),
color: Colors.grey[500],
iconSize: 24.0,
onPressed: () {},
),
],
)
```