Created
October 3, 2020 11:54
-
-
Save CoderJava/5b127b9250222c7a0fda9684590c167e to your computer and use it in GitHub Desktop.
simple input chip with custom deleteIcon
This file contains hidden or 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'; | |
| class InputChipExample extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar( | |
| title: Text('Input Chip'), | |
| ), | |
| body: InputChip( | |
| label: Text('coderkotlin@gmail.com'), | |
| onPressed: () { | |
| debugPrint('input chip tapped'); | |
| }, | |
| avatar: CircleAvatar( | |
| backgroundImage: NetworkImage('http://api.bengkelrobot.net:8001/assets/images/yudi.jpeg'), | |
| ), | |
| onDeleted: () { | |
| debugPrint('input chip when onDeleted'); | |
| }, | |
| deleteIcon: Icon(Icons.delete_forever), | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment