Created
July 10, 2022 11:17
-
-
Save FlutterZeroGit/c786d708d396a69de445b9a71b084abc to your computer and use it in GitHub Desktop.
InkWell-borderRadius
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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), | |
borderRadius: BorderRadius.circular(40), | |
onTap: () {}, | |
), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment