1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Difference between using super.key and (Key? key) : super(key: key) in Flutter

Discussão em 'Mobile' iniciado por Stack, Outubro 17, 2024 às 05:52.

  1. Stack

    Stack Membro Participativo

    I want to know what's the difference between using {super.key} and (Key? key) : super(key: key) in a Flutter app.

    I mean I know they both set key from the super widgets, but why there is 2 types of them? and which is preferred to use?

    class MyPublicWidget extends StatelessWidget {
    MyPublicWidget({super.key});
    }

    Continue reading...

Compartilhe esta Página