setAppBarTitle method
Set the app bar title dynamically.
This method allows you to change the app bar title at runtime.
Parameters:
title- The new title for the app bar
Returns true if the title was set successfully, false otherwise.
Implementation
@override
Future<bool> setAppBarTitle(String title) async {
try {
final result = await methodChannel.invokeMethod<bool>('setAppBarTitle', <String, String>{
'title': title,
});
return result ?? false;
} on PlatformException catch (e) {
debugPrint('Failed to set app bar title: ${e.message}');
return false;
}
}