the method join isn't defined flutter sqflite
I believe that you need to import the path library/package library as join is one of the functions of this library that is for manipulation paths.
So it should simply be a matter of adding the respective import and the first problem should be resolved.
import 'package:path/path.dart';
The second is similar add
import 'package:collection/collection.dart';