Skip to content

Instantly share code, notes, and snippets.

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

Alex Li AlexV525

🌍
typedef Day = πŸ› || πŸ–₯
  • China, Shanghai
  • 20:18 (UTC +08:00)
  • X @AlexV525
View GitHub Profile
@AlexV525
AlexV525 / slide_menu_item.dart
Last active September 28, 2021 01:46
Slidable menu and item widget.
///
/// [Author] Alex (https://github.com/AlexV525)
/// [Date] 1/22/21 11:13 AM
///
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
class SlideMenuItem extends StatelessWidget {
const SlideMenuItem({
@AlexV525
AlexV525 / string_pattern_extension.dart
Last active February 15, 2021 14:55
Dart endsWithPattern extension on String
///
/// [Author] Alex (https://github.com/AlexV525)
/// [Date] 2/15/21 22:30 PM
///
import 'dart:math' as math;
extension StringEndsWithRegEx on String {
bool endsWithPattern(Pattern other) {
if (other is String) {
return endsWith(other);
@AlexV525
AlexV525 / model.dart
Last active June 12, 2024 21:08
Resolve response model with generic type and base model
///
/// [Author] Alex (https://github.com/AlexV525)
/// [Date] 11/26/20 4:31 PM
///
import 'dart:convert';
import 'dart:core';
import 'package:flutter/foundation.dart';
import 'package:equatable/equatable.dart';
@AlexV525
AlexV525 / test_icon_grid.dart
Last active April 2, 2021 07:58
Customized icon grid view
///
/// [Author] Alex (https://github.com/AlexV525)
/// [Date] 4/2/21 12:48 PM
///
import 'dart:math' as math;
import 'dart:ui';
import 'package:flutter/material.dart';
void main() {
@AlexV525
AlexV525 / main.dart
Last active June 6, 2021 05:04
CountdownButton
///
/// [Author] Alex (https://github.com/AlexV525)
/// [Date] 2021-04-30 12:41
///
import 'dart:math' as math;
import 'dart:ui';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
🌞 Morning 178 commits β–ˆβ–ˆβ–ˆβ–Žβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 15.8%
πŸŒ† Daytime 503 commits β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 44.6%
πŸŒƒ Evening 396 commits β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 35.1%
πŸŒ™ Night 51 commits β–‰β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 4.5%
@AlexV525
AlexV525 / init.gradle
Last active July 17, 2023 02:38
Gradle with Chinese mirrors
// Use https://gist.github.com/AlexV525/5aff2a1621482e11abc8e97d88200ac1 instead.
@AlexV525
AlexV525 / decorated_sliver.dart
Last active October 14, 2021 06:39
DecoratedSliver
///
/// [Author] Alex (https://github.com/AlexV525)
/// [Date] 2021/10/13 14:36
///
import 'dart:math' as math;
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
@immutable
@AlexV525
AlexV525 / main.dart
Created October 22, 2021 10:39
Subtypes filtering from Supertype stream.
///
/// [Author] Alex (https://github.com/AlexV525)
/// [Date] 2021/10/22 18:38
///
import 'dart:async';
import 'package:meta/meta.dart';
void main() {
_initObservers();
@AlexV525
AlexV525 / main.dart
Last active February 22, 2023 02:41
How to set the highest refresh rate on Android in Flutter using `flutter_displaymode`?
///
/// [Author] Alex (https://github.com/AlexV525)
/// [Date] 2022/03/07 23:25
///
import 'dart:async';
import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';