Skip to content

Commit

Permalink
Controller added to Outlined button text in custom ringtone (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
sameermansoori1 authored Dec 6, 2023
1 parent cef44cb commit 221c393
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions lib/app/modules/settings/views/custom_ringtone.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,25 @@ class CustomRingtone extends StatelessWidget {
Utils.hapticFeedback();
await controller.saveCustomRingtone();
},
child: Text(
'Choose Ringtone',
style:
Theme.of(context).textTheme.bodyMedium!.copyWith(
color: kprimaryColor,
),
),
child: Obx(() {
bool isRingtoneSelected =
controller.customRingtoneName.value !=
'Custom Ringtone Disabled!' &&
controller.customRingtoneStatus.value ==
CustomRingtoneStatus.enabled;

return Text(
isRingtoneSelected
? 'Change Ringtone'
: 'Choose Ringtone',
style: Theme.of(context)
.textTheme
.bodyMedium!
.copyWith(
color: kprimaryColor,
),
);
}),
),
const SizedBox(
height: 10,
Expand Down

0 comments on commit 221c393

Please sign in to comment.