appBarUI method
dynamic
appBarUI( - dynamic context
)
Implementation
AppBar appBarUI(BuildContext context) {
return AppBar(
leading: IconButton(
onPressed: () {
// Hide Keyboard
SystemChannels.textInput.invokeMethod('TextInput.hide');
Navigator.pop(context);
},
icon: const Icon(Atlas.xmark_circle),
),
backgroundColor: selectedNewsPost == null
? Colors.transparent
: selectedNewsPost?.backgroundColor,
actions: selectedNewsPost == null
? []
: [
OutlinedButton.icon(
onPressed: () => selectActionItemDialog(context),
style: OutlinedButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 14),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
),
),
icon: const Icon(Icons.add),
label: Text(L10n.of(context).action),
),
IconButton(
key: NewsUpdateKeys.slideBackgroundColor,
onPressed: () {
ref
.read(newsStateProvider.notifier)
.changeTextSlideBackgroundColor();
},
icon: const Icon(Atlas.color),
),
],
);
}