PROJ=sortator
cd /home/ws/flutter
mkdir $PROJ
cd $PROJ
flutter create --project-name=$PROJ --platforms=linux,android --template=app \
--description="Moves and renames files into different target directories" .
mkdir lib/models lib/controllers lib/screens
vi pubspec.yaml
# dependencies:
# g: ^4.6.5
flutter get pub
flutter config --enable-linux-desktop
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'screens/sortator_screen.dart';
void main() {
runApp(GetMaterialApp(
home: SortatorScreen(),));
}
class Sortator {
final List<String> targetDirectories = [];
final List<String> categories = [];
}
import 'package:get/get.dart';
import '../controllers/sortator.dart';
class SortatorController extends GetxController {
final sortator = Sortator().obs;
}
import 'package:flutter/material.dart';
class SortatorScreen extends GetxController {
final sortator = Sortator().obs;
}