Flutter / Controller / Redirect to a page with data
Redirect to a page with data
-
STEPS
1. in controller
Get.to(() => SetPasswordScreen(email: email, otp: otpTEController.text)); 2. in view page
class SetPasswordScreen extends StatefulWidget { final String email, otp; const SetPasswordScreen({Key? key, required this.email, required this.otp}); @override State createState() => _SetPasswordScreenState(); } 3. show the data
body: Padding( padding: EdgeInsets.all(16.0), child: Text(email), ),