Try
Widget _profileImage() {
return GestureDetector(
onTap: () {
controller.nextPhoto();
print('change my Image!');
},
child: Container(
padding: EdgeInsets.all(10),
width: Get.mediaQuery.size.width,
height: Get.mediaQuery.size.height,
child: FittedBox(
child: Obx(
() => Image.network(
controller.imagePath.value,
fit: BoxFit.fill,
),
),
),
),
);
}
or share what's inside `toggleEditProfile` function.
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return GetMaterialApp(
home: SafeArea(
child: Scaffold(
body: Center(
child: ElevatedButton(
onPressed: () {
print("executed");
Get.snackbar(
"title",
"content",
);
},
child: Icon(Icons.ac_unit)),
),
),
),
);
}
}