main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
theme: ThemeData(primarySwatch: Colors.indigo),
home: Scaffold(
appBar: AppBar(
title: const Text("Flutter - InkResponse")
),
body: bodyContent()
)
)
);
}
bodyContent(){
return Card(
elevation: 8,
margin: const EdgeInsets.all(16),
child: InkResponse(
onTap: (){
// do something here
},
containedInkWell: true,
child: const Padding(
padding: EdgeInsets.all(12),
child: Text("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, when an unknown printer took"
" a galley of type and scrambled"
" it to make a type specimen book.",
style: TextStyle(fontSize: 17)
)
)
)
);
}
More flutter tutorials
- flutter – Card rounded image padding
- flutter – Card clip behavior
- flutter – Container decoration image
- flutter – Container clip behavior
- flutter – Column items equal height
- flutter – Column items stretch horizontally
- flutter – Column height wrap content
- flutter – Column max height
- flutter – Column space between
- flutter – Column space around
- flutter – Row space around
- flutter – Row space evenly
- flutter – Row alignment
- flutter – Row center vertically
- flutter – Row background color