This file contains 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 'dart:math'; | |
void main() { | |
runApp(const MainApp()); | |
} | |
class MainApp extends StatelessWidget { | |
const MainApp({super.key}); |
This file contains 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:sofi_x_package/core/constants/dimensions.dart'; | |
import 'package:sofi_x_package/core/themes/pacific/pacific_colors.dart'; | |
import 'package:sofi_x_package/core/themes/sofi_theme.dart'; | |
import 'package:sofi_x_package/widgets/pacific/loaders/pacific_loading_shimmer.dart'; | |
import 'package:sofi_x_package/widgets/sofi_divider.dart'; | |
import 'package:sofi_x_package/widgets/utilities/theme_container.dart'; | |
/// Design Spec: https://www.figma.com/design/PV3yXSwydvnY2whzQO0pVG/Invest---Robo?node-id=3816-341443&t=pkroMz4fKn1cEQnK-4 | |
class SoFiPacificMarqueePerformanceInfo extends StatelessWidget { |
This file contains 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
bool isPalindrome(int number) { | |
// Core logic explained on an example 1234 | |
// 1234 == 4321 | |
// old new | |
// Default values | |
// 1234 0 | |
// Loop starts: | |
// 123 4 (0*10 +4) | |
// 12 43 (4*10+3) | |
// 1 432 (43*10 +2) |
This file contains 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
WEB CONFIG | |
flavor.dart: | |
``` | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter_dotenv/flutter_dotenv.dart'; | |
import 'package:package_info_plus/package_info_plus.dart'; | |
import 'package:today/models/enums.dart'; |
This file contains 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
class RomanNumbers { | |
int romanCharToInt(String romanChar) { | |
switch (romanChar) { | |
case 'I': | |
return 1; | |
case 'V': | |
return 5; | |
case 'X': | |
return 10; | |
case 'L': |
This file contains 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
class RomanNumbers { | |
static int romanToDecimal(String romanNumber) { | |
Map<String, int> romanMap = { | |
'I': 1, | |
'V': 5, | |
'X': 10, | |
'L': 50, | |
'C': 100, | |
'D': 500, | |
'M': 1000, |
This file contains 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
Reset: \x1B[0m | |
Cursive: \x1B[3m // new data from db | |
Black: \x1B[30m | |
Red: \x1B[31m // errors | |
Green: \x1B[32m // manager/controller | |
Yellow: \x1B[33m // db data | |
Blue: \x1B[34m // flutter | |
Magenta: \x1B[35m | |
Cyan: \x1B[36m | |
White: \x1B[37m // local helper functions |
This file contains 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:ambee2/models/animations/light_animation.dart'; | |
import 'package:audio_service/audio_service.dart'; | |
import 'package:flutter/material.dart'; | |
// import 'package:just_audio/just_audio.dart'; | |
import 'package:audioplayers/audioplayers.dart'; | |
// Two lines below: this is how I call the audio to start | |
// await lightAnimation.audioHandler.setRepeatMode(AudioServiceRepeatMode.all); | |
// await lightAnimation.audioHandler.playUrl(lightAnimation.audioUrl, volumeSetValue); |
This file contains 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:today/globals/constants.dart'; | |
import 'package:today/services/auth_service.dart'; | |
import 'package:today/style/style_constants.dart'; | |
import 'package:device_info_plus/device_info_plus.dart'; | |
import 'dart:io'; | |
import 'package:flutter_email_sender/flutter_email_sender.dart'; | |
import 'package:package_info_plus/package_info_plus.dart'; |
This file contains 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
// Call the method e.g. from initState like this: FetchListOfJsonsApi().getDecodedBody(); | |
// | |
// Install the http plugin here: https://pub.dev/packages/http | |
import 'package:http/http.dart' as http; | |
import 'dart:convert'; | |
class FetchListOfJsonsApi { | |
final String url; | |
FetchListOfJsonsApi({ |
NewerOlder