update for permission and destination ordering
This commit is contained in:
@ -8,6 +8,7 @@ import 'package:rogapp/utils/const.dart';
|
||||
import 'package:rogapp/utils/database_helper.dart';
|
||||
import 'package:rogapp/widgets/bottom_sheet_new.dart';
|
||||
import 'package:rogapp/widgets/bottom_sheet_widget.dart';
|
||||
import 'package:sqflite/sqlite_api.dart';
|
||||
import 'package:timeline_tile/timeline_tile.dart';
|
||||
|
||||
class DestinationWidget extends StatelessWidget {
|
||||
@ -176,7 +177,7 @@ class DestinationWidget extends StatelessWidget {
|
||||
onTap: () async {
|
||||
{
|
||||
Destination? fs = destinationController.destinations[index];
|
||||
print("----fsf-----${fs.location_id}");
|
||||
print("----fsf-----${index}");
|
||||
if(fs != null){
|
||||
|
||||
if(indexController.currentDestinationFeature.isNotEmpty) {
|
||||
@ -194,37 +195,7 @@ class DestinationWidget extends StatelessWidget {
|
||||
};
|
||||
},
|
||||
onLongPress: (){
|
||||
|
||||
for(Destination d in destinationController.destinations){
|
||||
if(destinationController.currentSelectedDestinations.length > 0){
|
||||
if(destinationController.currentSelectedDestinations[0].location_id == destinationController.destinations[index].location_id){
|
||||
destinationController.currentSelectedDestinations.clear();
|
||||
print("---- found ----");
|
||||
destinationController.PopulateDestinations();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
destinationController.currentSelectedDestinations.clear();
|
||||
destinationController.currentSelectedDestinations.add(destinationController.destinations[index]);
|
||||
|
||||
// Destination? match_element = null;
|
||||
// destinationController.currentSelectedDestinations.forEach((element) {
|
||||
// if(element.location_id == destinationController.destinations[index].location_id){
|
||||
// match_element = element;
|
||||
// return;
|
||||
// }
|
||||
// });
|
||||
|
||||
// if(match_element != null){
|
||||
// destinationController.currentSelectedDestinations.remove(destinationController.destinations[index]);
|
||||
// }
|
||||
// //destinationController.currentSelectedDestinations.clear();
|
||||
// destinationController.currentSelectedDestinations.add(destinationController.destinations[index]);
|
||||
|
||||
destinationController.PopulateDestinations();
|
||||
|
||||
destinationController.toggleSelection(destinationController.destinations[index]);
|
||||
},
|
||||
selectedTileColor: Colors.amberAccent,
|
||||
selected:destinationController.destinations[index].selected!,
|
||||
|
||||
Reference in New Issue
Block a user