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:flutter/material.dart'; | |
| import 'package:expansion_tile_card/expansion_tile_card.dart'; | |
| import 'package:gitexpo/single-card.dart'; | |
| import 'package:gitexpo/utils/styles.dart'; | |
| void main() { | |
| runApp(GitExpo()); | |
| } |
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 'dart:ui' as ui; | |
| import 'package:flutter/foundation.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter/rendering.dart'; | |
| import 'package:flutter/services.dart'; | |
| import 'package:logger/logger.dart'; | |
| import 'package:path_provider/path_provider.dart'; | |
| import 'package:permission_handler/permission_handler.dart'; |
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
| fun Modifier.conditional( | |
| condition: Boolean, | |
| ifTrue: Modifier.() -> Modifier, | |
| ifFalse: (Modifier.() -> Modifier)? = null, | |
| ): Modifier { | |
| return if (condition) { | |
| then(ifTrue(Modifier)) | |
| } else if (ifFalse != null) { | |
| then(ifFalse(Modifier)) | |
| } else { |
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
| The structural goal is that the raw two digit string exists in exactly one place in your codebase, and everything downstream works with a typed value. String comparison of ECI codes scattered across services is how the brand confusion described above gets into production. | |
| Start with the two enums. | |
| package com.example.payments.threeds; | |
| public enum CardBrand { | |
| VISA, | |
| MASTERCARD, | |
| AMERICAN_EXPRESS, | |
| DISCOVER, |