Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
flutter [2022/09/10 20:24] – créée alyveflutter [2026/02/19 15:15] (current) – removed caly
Line 1: Line 1:
-====== Flutter ====== 
- 
-===== POO ===== 
- 
-==== Constructeur avec paramètres nommés ==== 
-<code> 
-class Test { 
-  // ... 
-   
-  // Test(foo: 'foo', bar: 'bar'); 
-  Test({ String foo, String bar}) 
-} 
-</code> 
- 
- 
-==== Constructeur avec paramètres nommés & obligatoires ==== 
-<code> 
-class Test { 
-  // ... 
-   
-  // Test(bar: 'bar') => throw an exception because foo does not exist 
-  Test({ required String foo, String bar}) 
-} 
-</code> 
- 
-==== Surcharger un constructeur ==== 
-<code> 
-class Test { 
-  // ... 
-  Test({super.key, this.foo}); 
-   
-  Test.foo({super.key}) { 
-    foo = 'foo'; 
-  } 
-} 
-</code> 
- 
- 
-===== Librairies externes ====== 
- 
- * [[https://pub.dev/packages/smooth_page_indicator|Smooth page indicator]] 
- 
- 
-Paramètres nommés requis: ({ @required String foo, String bar }) => foo obligatoire 
-Classname({ this.foo, this.bar })  => shortcut 
- 
-Surcharger un constructeur: 
-class Person { 
-  String name; 
-  int age; 
- 
-  Person({this.name, this.age}) 
-  Person.newBorn({this.name}) { 
-    this.age = 0; 
-  } 
-} 
- 
- 
-Widgets: 
-* SafeArea pour ignorer le haut du device 
-Librairie: 
-* smooth_page_indicator