Skip to content

Instantly share code, notes, and snippets.

@FlutterZeroGit
Last active July 10, 2022 11:16
Show Gist options
  • Save FlutterZeroGit/876a14daacccd0992e0da772cb1a128c to your computer and use it in GitHub Desktop.
Save FlutterZeroGit/876a14daacccd0992e0da772cb1a128c to your computer and use it in GitHub Desktop.
InkWell
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('FlutterZero'),
),
body: Center(
child: Material(
child: InkWell(
child: Container(
height: 150,
width: 150,
child: Center(
child: Text(
'Click',
style: TextStyle(fontSize: 30),
),
),
),
highlightColor: Colors.blue.withOpacity(0.7),
splashColor: Colors.grey.withOpacity(0.7),
onTap: () {},
),
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment