skip to Main Content

How to send http request in flutter

session.post( 'http://myopencart.example.com/index.php?route=api/cart/add', params={'api_token':'768ef1810185cd6562478f61d2'}, data={ 'product_id':'100' 'quantuty':'1' } ) How to I post this in flutter. In this api there is two type of data to be posted. I need solution for this I didn't tried yet.

VIEW QUESTION

Flutter – WillPopScope is deprecated

I want to exit the alert. WillPopScope( onWillPop: () async { final shouldExit = await showDialog( context: context, builder: (context) => CupertinoAlertDialog( title: const Text('Exit App'), content: const Text('Are you sure you want to exit the app?'), actions: [ CupertinoDialogAction(…

VIEW QUESTION

Flutter/Dart Future

class _WorterBuchState extends State<WorterBuch> with TickerProviderStateMixin { var wordPair= '' ; @override void initState(){ super.initState(); load(); } Future<void> load() async{ SharedPreferences prefs = await SharedPreferences.getInstance(); prefs.setString('key', 'value'); wordPair = await "key : " + (prefs.getString('key') as String); } @override Widget…

VIEW QUESTION
Back To Top
Search