Skip to content

Instantly share code, notes, and snippets.

@CoderJava
Created October 3, 2020 11:52
Show Gist options
  • Select an option

  • Save CoderJava/58c750fdee8d1057235f8e40d28dedfb to your computer and use it in GitHub Desktop.

Select an option

Save CoderJava/58c750fdee8d1057235f8e40d28dedfb to your computer and use it in GitHub Desktop.
simple input chip with event onDeleted
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');
},
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment