Created
February 2, 2022 20:35
-
-
Save aarontwf/5313693d81cdf6c2b30dc296983ce53c to your computer and use it in GitHub Desktop.
Input Chip
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'; | |
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