Skip to content

Instantly share code, notes, and snippets.

@sdycode
sdycode / allsizes.dart
Last active August 19, 2022 11:42
lively-waterfall-4486
void main() {
List<String> l =[
"1920×1080", "1366×768 ", "360×640 ", "414×896 ", "1536×864 ",
"375×667 ",
];
l.forEach((e){
int a = int.parse(e.trim().split('×')[0]);
int b = int.parse(e.trim().split('×')[1]);
print(a/b);
@sdycode
sdycode / main.dart
Created October 13, 2022 07:55
malevolent-gust-7489
void main() {
String s =
'''Top 100
Birthday Messages for Your Friends
Birthday Messages
Wedding Anniversary Messages
Wake Up Messages
Tender alarm messages
Wake up messages for your girlfriend
Messages to wish good night
@sdycode
sdycode / main.dart
Created October 14, 2022 12:22
swift-dart-8553
void main() {
Map<String, List<String>> pandasSubCatNameFromCatName = {
"Boo and Bae": ["Birthday", "Good Morning", "Love"],
"Cranky Crocs": ["Birthday", "Good Morning", "Love"],
"Frosty Penguin": [
"Birthday",
"Good Morning",
"Good Night",
"Love",
"Missing You"
@sdycode
sdycode / main.dart
Created October 17, 2022 06:33
neapolitan-tulip-8016
import 'dart:math';
void main() {
List<String> lsl =[
"Boo and Bae__Birthday",
"Boo and Bae__Good Morning",
"Boo and Bae__Love",
"Cranky Crocs__Birthday",
"Cranky Crocs__Good Morning",
"Cranky Crocs__Love",
@sdycode
sdycode / main.dart
Created October 17, 2022 06:51
neapolitan-tulip-8016
import 'dart:math';
void main() {
List<String> lsl =[
"Boo and Bae__Birthday",
"Boo and Bae__Good Morning",
"Boo and Bae__Love",
"Cranky Crocs__Birthday",
"Cranky Crocs__Good Morning",
"Cranky Crocs__Love",
@sdycode
sdycode / Swtich_case_code_generator_for_enum.dart
Last active November 27, 2022 05:40
Swtich case code generator for enum
enum DefaultEnum {normal, arc, symmetric,angleSymmetric ,nonSymmetric}
/// Add your enum and replace defaultenum with your enum @ 2 places
void main(){
String enumName = "ArcTypeOnPoint";
List<DefaultEnum> values = DefaultEnum.values;
String total ="";
for (var i = 0; i < values.length; i++) {
total += '''
case ${values[i]}:
@sdycode
sdycode / fontPath.dart
Last active December 22, 2022 04:40
Font path making for pubsec yaml
class Fonts {
static String AbiahLight = "Abiah-Light";
static String ArchitectsDaughterRegular = "ArchitectsDaughter-Regular";
static String BrixtonSansOutlineRg = "BrixtonSansOutlineRg";
static String Buffalo = "Buffalo";
static String PoppinsMedium = "Poppins-Medium";
static String sunday = "sunday";
static String TrochutBold = "Trochut-Bold";
static String TrochutRegular = "Trochut-Regular";
static String ChunkFivePrint = "Chunk Five Print";
@sdycode
sdycode / readme.md
Created July 18, 2023 14:03
split_multiple_texts

avian-truth-1535

Created with <3 with dartpad.dev. split_multiple_texts

@sdycode
sdycode / main.dart
Last active August 28, 2023 10:50
create_static_image_paths_from_singlestring
void main(List<String> args) {
String ss =
'''assets/icons/add.png assets/icons/Calendar.png assets/icons/compass.png assets/icons/message.png assets/icons/profile1.png''';
List<String> sp= ss.trim().split(" ");
sp.forEach((e) {
@sdycode
sdycode / main.dart
Created August 23, 2023 14:40
jade-clover-4599
void main(List<String> args) {
List<String> types = [
"FootballModel",
"BasketBallModel",
"BadmintonModel",
"VolleyballModel",
"IceHockeyModel",
"CricketModel"
];