
[ad_1]
Sélecteur simple
Un widget de sélection simple et personnalisable avec transition animée.
SimpleSelector(
items: [
Icon(Icons.lock),
Icon(Icons.lock_open),
],
);
C’est ça. ☺️ Vous ne pouvez l’utiliser qu’en donnant un items
.
SimpleSelector(
items: [
Icon(Icons.lock),
Icon(Icons.lock_open),
],
duration: const Duration(milliseconds: 300),
curve: Curves.easeInOutCubic,
onChanged: (index) {
print(index);
},
);
- éléments
The items to be used in the selection are entered here.
- durée
Use this to set the animation duration.
- courbe
Use this to change the animation curve type.
- articleÉtendue
Use this to specify the width of the items.
- la taille
Use this to specify the height of the items.
- indicateurCouleur
Use this to change the indicator color.
- Couleur de l’arrière plan
Use this to change the background color.
- rayon
Use this to change the radius.
- articleRembourrage
Use this to give padding to each of the items. This way you can leave space between items.
- mainAxisSizemainAxisSize
Use this to organize the space occupied by items horizontally.
- animation
Use this to eliminate the animation transition altogether.
- élémentAligner
If you want to change where the items are aligned use this.
- onChanged
This function is used to see the selected index.
GitHub
Voir Github
[ad_2]