Skip to content

Instantly share code, notes, and snippets.

View AlexV525's full-sized avatar
🌍
typedef Day = πŸ› || πŸ–₯

Alex Li AlexV525

🌍
typedef Day = πŸ› || πŸ–₯
  • China, Shanghai
  • 11:23 (UTC +08:00)
  • X @AlexV525
View GitHub Profile
@AlexV525
AlexV525 / run.sh
Created August 17, 2020 03:37
Flutter iOS build/archive without BitCode
# Build
flutter build ios
cd build/ios/iphoneos/Runner.app/Frameworks
cd App.framework
xcrun bitcode_strip -r app -o app
cd ..
cd Flutter.framework
xcrun bitcode_strip -r Flutter -o Flutter
cd ../../../../../../
@AlexV525
AlexV525 / main.dart
Created August 21, 2020 06:46
Why 2 becomes 10?
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
@AlexV525
AlexV525 / main.dart
Created August 23, 2020 08:45
Get specific weekday in month (null-safety version)
void main() {
print(getSpecificWeekdayInMonth(
year: 2020,
month: 8,
whichWeek: 5,
whichWeekday: 7,
));
}
DateTime? getSpecificWeekdayInMonth({
@AlexV525
AlexV525 / main.dart
Created August 26, 2020 06:45
Split duration to string
void main() {
final Duration duration = Duration(hours: 12, minutes: 34, seconds: 56);
print(duration.splitToString(':'));
}
extension SplitDurationExtension on Duration {
String splitToString(
String divider, {
bool shouldPadLeft = false,
String padWith = '0',
@AlexV525
AlexV525 / main.dart
Created September 14, 2020 08:40
How do you make timeline without Intrinsic?
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
@AlexV525
AlexV525 / rules.md
Last active October 27, 2020 03:55
Flutter εΌ€ε‘θ§„θŒƒ
@AlexV525
AlexV525 / main.md
Created November 17, 2020 16:03
LGTM
β–ˆβ–ˆβ•—      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•β•β• β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘
β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β•    β•šβ•β•   β•šβ•β•     β•šβ•β•
@AlexV525
AlexV525 / create_images.dart
Last active December 21, 2025 10:02
How do we create images through `RepaintBoundary` or `Widget` in Flutter?
// Author: Alex Li (https://github.com/AlexV525)
// Date: 2025/10/10
import 'dart:typed_data';
import 'dart:ui' as ui;
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
/// Create an image from given [GlobalKey], which is attached to an exist
@AlexV525
AlexV525 / function_extension.dart
Created December 26, 2020 06:33
De-bounce and throttle
///
/// [Author] Alex (https://github.com/AlexV525)
/// [Date] 2020-12-26 11:51
///
import 'dart:async';
import 'package:flutter/foundation.dart';
/// ι˜²ζŠ–ε’ŒθŠ‚ζ΅
///