revanced-manager/lib/ui/views/navigation/navigation_viewmodel.dart
2022-09-07 02:37:25 +01:00

23 lines
672 B
Dart

import 'package:flutter/material.dart';
import 'package:injectable/injectable.dart';
import 'package:revanced_manager/ui/views/home/home_view.dart';
import 'package:revanced_manager/ui/views/patcher/patcher_view.dart';
import 'package:revanced_manager/ui/views/settings/settings_view.dart';
import 'package:stacked/stacked.dart';
@lazySingleton
class NavigationViewModel extends IndexTrackingViewModel {
Widget getViewForIndex(int index) {
switch (index) {
case 0:
return const HomeView();
case 1:
return const PatcherView();
case 2:
return const SettingsView();
default:
return const HomeView();
}
}
}