update
This commit is contained in:
@ -25,7 +25,6 @@ class _DestinationPageState extends State<DestinationPage> {
|
||||
final IndexController indexController = Get.find<IndexController>();
|
||||
|
||||
final List<int> _items = List<int>.generate(50, (int index) => index);
|
||||
List<bool> isSelected = [true];
|
||||
|
||||
Future<void> showCurrentPosition() async {
|
||||
LocationPermission permission = await Geolocator.checkPermission();
|
||||
@ -47,6 +46,12 @@ class _DestinationPageState extends State<DestinationPage> {
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
destinationController.context = context;
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final ColorScheme colorScheme = Theme.of(context).colorScheme;
|
||||
@ -82,6 +87,12 @@ class _DestinationPageState extends State<DestinationPage> {
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
|
||||
appBar:AppBar(
|
||||
title: Text("Iternery"),
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios),
|
||||
onPressed: (){
|
||||
indexController.switchPage(AppPages.INITIAL);
|
||||
},
|
||||
),
|
||||
actions: [
|
||||
ToggleButtons(
|
||||
disabledColor: Colors.grey.shade200,
|
||||
@ -91,10 +102,10 @@ class _DestinationPageState extends State<DestinationPage> {
|
||||
)],
|
||||
onPressed: (int index) {
|
||||
setState(() {
|
||||
isSelected[index] = !isSelected[index];
|
||||
destinationController.isSelected[index] = !destinationController.isSelected[index];
|
||||
});
|
||||
},
|
||||
isSelected: isSelected,
|
||||
isSelected: destinationController.isSelected,
|
||||
),
|
||||
IconButton(onPressed: (){
|
||||
showCurrentPosition();
|
||||
|
||||
Reference in New Issue
Block a user