0 purchases
adaptive keros
Adaptive Keros #
Apprendre à créer un package qui s'adapte selon l'OS utilisé.
Ce package est destiné à la création d'applications Flutter
Getting started #
Pour utiliser ce package, ajouté au pubspec.yaml:
dependencies:
adaptive_keros= ^1.0.1
copied to clipboard
Usage #
Dans le fichier Dart, importez:
import'package:adaptive_keros/adaptive_keros.dart';
copied to clipboard
Intégrer un Scaffold
@override
Widget build(BuildContext context) {
return Adaptive.scaffold(
string: 'Test',
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Adaptive.text(Colors.red[900], 20, TextAlign.center,
string: 'Ceci est notre App Test'),
Adaptive.button(
onPressed: () => Adaptive.alert(
context: context,
onPressed: () {
print("Test");
Navigator.pop(context);
}),
child: Adaptive.text(Colors.red[900], 20, TextAlign.center,
string: 'Press Me')),
Adaptive.button(
child: Adaptive.text(Colors.red[900], 20, TextAlign.center, string: 'Montrer l\'alerte'),
onPressed: (){
Adaptive.alert(
context: context,
onPressed: () {
Navigator.pop(context);
}
);
}
)
],
)),
);
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.