mockup and List View in a Modern Design
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class HomeController extends GetxController {
|
||||
import '../pages/list_view.dart';
|
||||
|
||||
void loadFilaments() {}
|
||||
class HomeController extends GetxController {
|
||||
void loadFilaments() {
|
||||
// Navigiere zur Listenseite
|
||||
Get.toNamed(ListPage.namedRoute);
|
||||
}
|
||||
void downloadFilaments() {
|
||||
// JSON Backup file herunterladen
|
||||
}
|
||||
|
||||
void downloadFilaments() {}
|
||||
|
||||
void restoreFilaments() {}
|
||||
void restoreFilaments() {
|
||||
// JSON Backup file wiederherstellen
|
||||
}
|
||||
}
|
||||
|
||||
31
lib/controllers/list_controller.dart
Normal file
31
lib/controllers/list_controller.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:get/get.dart';
|
||||
import '../../model/filament_model.dart';
|
||||
import '../../helpers/filament_repository.dart';
|
||||
|
||||
class ListController extends GetxController {
|
||||
final filamentList = <FilamentModel>[].obs;
|
||||
final isLoadingFilament = false.obs;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
_loadListFillament();
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
@override
|
||||
void onReady() {}
|
||||
|
||||
@override
|
||||
void onClose() {}
|
||||
|
||||
Future<void> _loadListFillament() async {
|
||||
isLoadingFilament(true);
|
||||
if (filamentList.isNotEmpty) {
|
||||
filamentList.clear();
|
||||
}
|
||||
filamentList(FilamentRepository.to.getAllFilaments());
|
||||
isLoadingFilament(false);
|
||||
}
|
||||
|
||||
void addNewFilament() {}
|
||||
}
|
||||
Reference in New Issue
Block a user