This is an old revision of the document!
Flutter
POO
Constructeur avec paramètres nommés
class Test {
// ...
// Test(foo: 'foo', bar: 'bar');
Test({ String foo, String bar})
}
Constructeur avec paramètres nommés & obligatoires
class Test {
// ...
// Test(bar: 'bar') => throw an exception because foo does not exist
Test({ required String foo, String bar})
}
Surcharger un constructeur
class Test {
// ...
Test({super.key, this.foo});
Test.foo({super.key}) {
foo = 'foo';
}
}
Widgets
* SafeArea pour ignorer le haut du device
Librairies externes
Librairie: * smooth_page_indicator