iconButton static method
Implementation
static Widget iconButton({String? text}) {
return GetBuilder<PWThemeController>(
init: PWThemeController(),
builder: (theme) {
return IconButton(
tooltip: text ?? (theme.isDark ? 'Tema Claro' : 'Tema Escuro'),
icon: Icon(
theme.isDark ? Icons.wb_sunny : Icons.brightness_2,
),
onPressed: () => theme.changeThemeMode(!theme.isDark),
);
},
);
}