Skip to content

Instantly share code, notes, and snippets.

View slightfoot's full-sized avatar
💙
Fluttering

Simon Lightfoot slightfoot

💙
Fluttering
View GitHub Profile
@slightfoot
slightfoot / contacts_form_example.dart
Created March 26, 2025 20:15
Contacts Form Example - by SImon Lightfoot :: #HumpdayQandA on 26th March 2025 :: https://www.youtube.com/watch?v=HVMXJTxEDnw
// MIT License
//
// Copyright (c) 2025 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@slightfoot
slightfoot / drawing_area.dart
Last active March 22, 2025 00:27
Drawing Area Example - by Simon Lightfoot :: 21/03/2025
// MIT License
//
// Copyright (c) 2025 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

Stumbled upon this, the code at the bottom compiles, but there is no output, when I was thinking it might output something like >> list 123, 456

Was looking for a shorthand to

final cb = callback;
if (cb != null) {
  cb(['123','456']);
}
String intToString(int value) {
final chars = <int>[];
while (value > 0) {
// 0x30 == ASCII '0'
chars.add(0x30 + (value % 10));
value ~/= 10;
}
return String.fromCharCodes(chars.reversed);
}
@slightfoot
slightfoot / humpday_2025-02-26_soloman.dart
Last active February 26, 2025 20:31 — forked from Slozzyondul/screenTransition.dart
Wizard State Management - by Simon Lightfoot :: #HumpdayQandA on 26th February 2025 :: https://www.youtube.com/watch?v=wn_g2Z6RaZ8
// MIT License
//
// Copyright (c) 2025 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@slightfoot
slightfoot / humpday_2025-02-05_1.dart
Created February 5, 2025 19:35
Custom Navigator Example V3 - by Simon Lightfoot :: #HumpdayQandA on 5th February 2025 :: https://www.youtube.com/watch?v=894TQwZ8V0o
// MIT License
//
// Copyright (c) 2025 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@slightfoot
slightfoot / homepage.dart
Last active January 22, 2025 20:39 — forked from Slozzyondul/homepage.dart
Webpage Flutter Example / Code Review - by Simon Lightfoot :: #HumpdayQandA on 22nd January 2025 :: https://www.youtube.com/watch?v=Xyb2u5grptA
// MIT License
//
// Copyright (c) 2024 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@slightfoot
slightfoot / scaling_tab_text.dart
Created January 8, 2025 20:32
Scaling Tab Text (Incomplete) - by Simon Lightfoot :: #HumpdayQandA on 8th January 2025 :: https://www.youtube.com/watch?v=VJez9yUdg08
// MIT License
//
// Copyright (c) 2024 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@slightfoot
slightfoot / scaling_carousel.dart
Created January 8, 2025 20:31
Scaling Carousel - by Simon Lightfoot :: #HumpdayQandA on 8th January 2025 :: https://www.youtube.com/watch?v=VJez9yUdg08
@slightfoot
slightfoot / humpday_2024-12-18_1.dart
Created December 18, 2024 20:09
Labelled Slider - by Simon Lightfoot :: #HumpdayQandA on 18th December 2024 :: https://www.youtube.com/watch?v=kMVayNJwtsU
// MIT License
//
// Copyright (c) 2024 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: