From ffdf9d3b0241767c5d355855a60244c55d6451d3 Mon Sep 17 00:00:00 2001 From: Muzzammil Shahid Date: Mon, 3 Jun 2024 13:15:57 +0500 Subject: [PATCH] remove unused context from functions parameter --- lib/screens/mobile/mobile_home.dart | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/screens/mobile/mobile_home.dart b/lib/screens/mobile/mobile_home.dart index 0199ce8..b7b0b53 100644 --- a/lib/screens/mobile/mobile_home.dart +++ b/lib/screens/mobile/mobile_home.dart @@ -618,27 +618,27 @@ class _MobileHomeScaffoldState extends State with TickerProv case "Publish": return buildButton(sendButton, publish); case "Subscribe": - return buildButton(sendButton, () async => _subscribe(index, context)); + return buildButton(sendButton, () async => _subscribe(index)); case "UnSubscribe": return buildButton( sendButton, - () async => _unSubscribe(index, sessionStateProvider.session, sessionStateProvider.subscription, context), + () async => _unSubscribe(index, sessionStateProvider.session, sessionStateProvider.subscription), ); case "Call": - return buildButton(sendButton, () async => _call(index, context)); + return buildButton(sendButton, () async => _call(index)); case "Register": - return buildButton(sendButton, () async => _registerAndStoreResult(index, context)); + return buildButton(sendButton, () async => _registerAndStoreResult(index)); case "UnRegister": return buildButton( sendButton, - () async => _unRegister(index, sessionStateProvider.session, sessionStateProvider.unregister, context), + () async => _unRegister(index, sessionStateProvider.session, sessionStateProvider.unregister), ); default: return Container(); } } - Future _unRegister(int index, Session? session, var reg, BuildContext context) async { + Future _unRegister(int index, Session? session, var reg) async { final scaffoldMessenger = ScaffoldMessenger.of(context); try { await session?.unregister(reg); @@ -665,7 +665,7 @@ class _MobileHomeScaffoldState extends State with TickerProv } } - Future _unSubscribe(int index, Session? session, var sub, BuildContext context) async { + Future _unSubscribe(int index, Session? session, var sub) async { final scaffoldMessenger = ScaffoldMessenger.of(context); try { await session?.unsubscribe(sub); @@ -690,7 +690,7 @@ class _MobileHomeScaffoldState extends State with TickerProv } } - Future _registerAndStoreResult(int index, BuildContext context) async { + Future _registerAndStoreResult(int index) async { final scaffoldMessenger = ScaffoldMessenger.of(context); var sessionProvider = Provider.of(context, listen: false); Registration? registration; @@ -744,7 +744,7 @@ class _MobileHomeScaffoldState extends State with TickerProv } } - Future _subscribe(int index, BuildContext context) async { + Future _subscribe(int index) async { final scaffoldMessenger = ScaffoldMessenger.of(context); var sessionProvider = Provider.of(context, listen: false); try { @@ -796,7 +796,7 @@ class _MobileHomeScaffoldState extends State with TickerProv } } - Future _call(int index, BuildContext context) async { + Future _call(int index) async { final scaffoldMessenger = ScaffoldMessenger.of(context); var resultProvider = Provider.of(context, listen: false); try {