switchButton static method
Implementation
static Widget switchButton({String? text}) {
return GetBuilder<PWThemeController>(
init: PWThemeController(),
builder: (theme) {
return SizedBox(
width: 250,
child: SwitchListTile(
title: Text(text ?? (theme.isDark ? 'Light Mode' : 'Dark Mode')),
value: theme.isDark,
onChanged: theme.changeThemeMode,
activeColor: Colors.grey[600],
),
);
},
);
}