This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
print(integralPart(2499,2)); | |
print(fractionalPart(2499,2)); | |
} | |
String? integralPart(int? centAmount, int? fractionDigits) { | |
final cent = ((centAmount?.toString().length ?? 0) - (fractionDigits ?? 0)); | |
return centAmount?.toString().substring(0, cent >= 0 ? cent : null); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:io'; | |
import 'package:blockmark_test/ui/common_widgets/platform_widget.dart'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/src/widgets/framework.dart'; | |
class PlatformAlertDialog extends PlatformWidget { | |
PlatformAlertDialog({ | |
@required this.title, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:cloud_firestore/cloud_firestore.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:rxdart/rxdart.dart'; | |
class FirestoreService { | |
FirestoreService._(); | |
static final instance = FirestoreService._(); | |
CollectionReference collectionReference(String path) { |