Movator: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 6: | Zeile 6: | ||
PROJ=sortator | PROJ=sortator | ||
cd /home/ws/flutter | cd /home/ws/flutter | ||
flutter pub global activate get_cli | |||
# Pfad muss $HOME/.pub-cache/bin enthalten! | |||
PATH=$HOME/.pub-cache/bin:$PATH | |||
get create:$PROJ | |||
# Fragen beantworten, Alternativen mit Rauf-/Runter-Tasten auswählen. | |||
cd $PROJ | cd $PROJ | ||
flutter config --enable-linux-desktop | flutter config --enable-linux-desktop | ||
</syntaxhighlight> | </syntaxhighlight> |
Version vom 22. August 2022, 14:13 Uhr
Links
Erzeugen
PROJ=sortator
cd /home/ws/flutter
flutter pub global activate get_cli
# Pfad muss $HOME/.pub-cache/bin enthalten!
PATH=$HOME/.pub-cache/bin:$PATH
get create:$PROJ
# Fragen beantworten, Alternativen mit Rauf-/Runter-Tasten auswählen.
cd $PROJ
flutter config --enable-linux-desktop
Startseite festlegen
- change lib/main.dart:
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'screens/sortator_screen.dart';
void main() {
runApp(GetMaterialApp(
home: SortatorScreen(),));
}
Modul erstellen
- create a file models\sortator.dart
class Sortator {
final List<String> targetDirectories = [];
final List<String> categories = [];
}
- create a file lib/controller/sortator_controller.dart
import 'package:get/get.dart';
import '../controllers/sortator.dart';
class SortatorController extends GetxController {
final sortator = Sortator().obs;
}
- create a file lib/screens/sortator_screen.dart
import 'package:flutter/material.dart';
class SortatorScreen extends GetxController {
final sortator = Sortator().obs;
}