menu page
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
part of 'extension.dart';
|
||||
|
||||
extension DoubleExt on double {
|
||||
String get currencyFormatRpV2 => NumberFormat.currency(
|
||||
locale: 'id',
|
||||
symbol: 'Rp ',
|
||||
decimalDigits: 0,
|
||||
).format(this);
|
||||
}
|
||||
|
||||
extension StringX on String {
|
||||
String get currencyFormatRp {
|
||||
final parsedValue = int.tryParse(this) ?? 0;
|
||||
return NumberFormat.currency(
|
||||
locale: 'id',
|
||||
symbol: 'Rp ',
|
||||
decimalDigits: 0,
|
||||
).format(parsedValue);
|
||||
}
|
||||
}
|
||||
|
||||
extension IntegerExt on int {
|
||||
String get currencyFormatRp => NumberFormat.currency(
|
||||
locale: 'id',
|
||||
symbol: 'Rp ',
|
||||
decimalDigits: 0,
|
||||
).format(this);
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import 'package:intl/intl.dart';
|
||||
import '../../domain/auth/auth.dart';
|
||||
|
||||
part 'date_extension.dart';
|
||||
part 'currency_extension.dart';
|
||||
|
||||
extension StringExt on String {
|
||||
CheckPhoneStatus toCheckPhoneStatus() {
|
||||
|
||||
Reference in New Issue
Block a user