Created
November 1, 2023 14:54
-
-
Save CristhianLara1996/5747ccc7013227c3056e10d89bc4c8ca to your computer and use it in GitHub Desktop.
Input Generics
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
class InputPhone extends StatelessWidget { | |
/// Creates a phone input widget. | |
const InputPhone( | |
this.label, { | |
Key? key, | |
... | |
}) : super(key: key); | |
final String label; | |
@override | |
Widget build(BuildContext context) { | |
return Row( | |
children: [ | |
Icon(Icons.flag), | |
_InputGeneric( | |
key: key, | |
label: label, | |
... | |
) | |
], | |
); | |
} | |
} | |
class InputXl extends StatelessWidget { | |
/// Creates a xl input widget. | |
const InputXl( | |
this.label, { | |
Key? key, | |
... | |
}) : super(key: key); | |
final String label; | |
@override | |
Widget build(BuildContext context) { | |
return _InputGeneric( | |
key: key, | |
label: label, | |
... | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment