Skip to content

Instantly share code, notes, and snippets.

@aarontwf
Created February 2, 2022 20:35
Show Gist options
  • Save aarontwf/5313693d81cdf6c2b30dc296983ce53c to your computer and use it in GitHub Desktop.
Save aarontwf/5313693d81cdf6c2b30dc296983ce53c to your computer and use it in GitHub Desktop.
Input Chip
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const MaterialApp(home: MyHomePage());
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.all(32),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
InputChip(
label: const Text('Just onDeleted'),
onDeleted: () => {},
),
InputChip(
label: const Text('With onPressed'),
onDeleted: () => {},
onPressed: () => {},
),
],
),
)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment